Wakeuplight, all in the node or in the controller? Also some bits about serial api 1.5

  • I noticed that 'S_Dimmer' has V_STATUS (on/off) and V_DIMMER (dimmer level 0-100) as possible values in table 1, but both are deprecated and replaced with V_STATUS and V_PERCENTAGE according to the next table.

    Also a question.

    If I want to create a RGBW Wakeup light. I could create a node that does all the thinkering by itself. It will have 3 virtual childs. "Wakeup Light" is a type of S_Dimmer but with a color scene to mimic a full sunset in 30 minutes and the dimmer value is the end value. Normal light (just white) als S_DIMMER. Perhaps a Nightlight, with less blue in it but also an type S_DIMMER.

    I could also make an RGBW node and program scenes in my controller (domoticz) although this sounds more flexible it also means more controller programming.

    I think it's preferable if the node would do the thinking. If another family member want the same function, I only have to use the same sketch, and the person only has to tell when it wants to wakeup.

    The question is: What do you advise me to do?

  • Contest Winner

    @Joerideman it depends on what you want to achieve. I've put all the logics in my wakeup light node, because at the time Domoticz didn't support RGB yet.

    Now here are the things you need to think about. From an architectural point of view, it's better to put the logic in the node. That way you have a separation of concern. Meaning Domoticz has no knowledge of the fact that the lamp it is controlling is a Wakeup light. This makes it kind of loose coupled, since Domoticz only needs to do what it's good at. Switching on/off lamps.

    But if you'd want to have more wakeuplights, than removing the logic out of the nodes makes more sence. However. Domoticz is a home automation system. Meaning it's able to read values from sensors and control actuators. So centralizing the wakeup knowledge is something I wouldn't do. But to be able to synchronize multiple wakeuplights, it's a good architectural idea to centralize the wakeup functionality. With this I mean, one place who knows about when to change colors.

    I think it's better to achieve this with MQTT. MQTT contains the knowlegde and instucts Domoticz to change to color of your wakeup lights. It just makes more sense to do it this way. MQTT was designed to contain knowledge like this, home automation wasn't.

    I think if I'd redo my Wakeuplights I'd put the centralized knowledge in MQTT. Because it's so much easier to tweak the Wakeuplight cycle in MQTT if you don't have OTA enabled mysensor nodes. And with MQTT things are more scalable, which is a buzz word in the development team I'm part of.

    But these are just my thoughts, and the way I desgin things. Keep in mind there's no best solution. Only the one you prefer. Good luck!

  • Hero Member

    If you decide to put the logic part in the node, I recommend to use Over-the-Air (OTA) updates, as it will make life easier by not having to physically connect the node to a computer in case you/your wife didn't like the colors you initially choose.

    Only recent nodes were flashed with OTA, so I still preferring keep all logic into the controller.

    My two cents ....

  • Thank you both for your considerations so far.

    I have no need to synchronize multiple lights. At home there are multiple LED Strips used as central lighting. Living room, workspace and almost the bedroom.

    In every room I would like a dimmer, but I figured why not always make a 4 channel dimmer and just tell in what mode to behave. (keep the intelligence embedded) This way, It doesn't matter what is controlling it it would do a very predictable set of things.

    In the living room only the normal light function would be used. Workroom the same. But I only have to create one type of print and one type of housing.

    I asked on Domoticz if they could make an option to start something 30 minutes ( or custom) before a set time. I'm really looking for the simplicity of a normal wakeup light in a digital modes. Not just for the tech savvy ones.

    If the wive doesn't like the colour scheme, then it might be better to use only white led.

    I have yet to understand OTA, maybe I try it one make make the home functional and then adapt.

  • Contest Winner

    @Joerideman triggering a wakeuplight 30 minutes ahead of wakeup time isn't the hardest part for domoticz. It's actually quiet easy. I have some pictures of that on my blog www.houtbewerken-voor-dummies.com

    Good luck and I'd love to see some pictures of the final result.

  • I have to admit TheoL I've spend some time looking and admiring your work. But I have not found your examples.

    I will look into the OTA programming, sounds great. My holiday is over, and the next one starts in july. This topic will probably sink down during this period ;-).

Log in to reply

Suggested Topics

  • 3
  • 9
  • 1
  • 4
  • 7
  • 5
  • 7
  • 30