Smart SPA Shower at home

         · · ·      · · · · ·


I recently bought 4 small smart bulbs - the latest one you most probably decide to buy for your smart home 😂😂 I think it’s useless talk about what you can do: I will only focus on the important things.

But most important you can build your small SPA in your bathroom. If you are interested, go ahead!

And no, I will not transform your bathroom in the one shown in the picture: and no, that is not my bathroom unfortunately XD

What you need

Before going ahead with this, this is what you need:

Setup your bulb

Buy your bulb - pay attention to choose the correct socket for your lamp! - and setup your bulb with Smart Life. Then, sync your device with google home by asking him to “sync device”. I suggest to not setup rooms inside the app to avoid collision with rooms you can easily and more efficiently setup in your Google home app.

The ID, KEY and IP

Before setup your node server, you need to discover some hidden information about your bulb. To retrieve needed ID and KEY of your bulb, just follow the instruction given there. Everywhere it is suggested to fix an IP to your bulb.

How to discover the colors

I retrieved them by looking at the change of status after every click over the colors available in the Google Home application

The White color looks like that:


The Color looks like that:


If you need to discover yours, or want to experiment with voltage etc, you can do it by changing the JSON just in case.

Wrap everything in a loop

And now my stupid and bad written code to give your bathroom some colors in a loop of 3 seconds over the colors file provided above (Gist just in case)

const TuyAPI = require('tuyapi');
var sleep = require('sleep');

const device = new TuyAPI({
  id: "<YOUR_BULB_ID>",
  key: "<YOUR_BULB_KEY>",
  ip: "<YOUR_IP_KEY>",
  persistentConnection: true});

device.on('connected',() => {
  console.log('Connected to device.');

device.on('disconnected',() => {
  console.log('Disconnected from device.');

device.on('data', data => {
  console.log('Data from device:', data);

device.on('error',(err) => {
  console.log('Error: ' + err);


var fs = require('fs');
var colours = JSON.parse(fs.readFileSync('./colours.json', 'utf8'));

function applyColour(info) {
  return device.set({
    multiple: true,
    data: {
      '1': true,
      '2': info["2"],
      '5': info["5"]

const funcs = => () => applyColour(info))

const promiseSerial = funcs =>
  funcs.reduce((promise, func) =>
    promise.then(result => func().then(Array.prototype.concat.bind(result), sleep.sleep(3))),


setTimeout(() => { device.disconnect(); }, 1000000);

One more thing

To have a more relaxing experience you can even listen to The Relaxing Sounds of Swedish Nature with your Google Home or any other device you want!

Thank you everybody for reading and have a good shower!!

comments powered by Disqus