Page 1 of 1

MySensors V_TEXT variable two-way update

Posted: Monday 07 May 2018 12:04
by Sushukka
Have been around from the beginning of V_TEXT sensor presentation ~couple of years.
Linked from: https://github.com/domoticz/domoticz/issues/2380

If you define V_TEXT sensor in MySensors node:
  • It will show ok in utility tab on Domoticz
  • You can update it normally in the node and the update will be transferred to Domoticz
  • You can update this sensor in Domoticz via REST API, scripts etc, but the update will never be signaled back to the node.
For node to receive the update you need to (these are community made hacks I have seen so far):
  • Have a dummy loop in node sketch to periodically send a request command. When Domoticz receives this request command, it will send the current V_TEXT value changeg or not. This is against every good coding practices.
  • Create a script on Domoticz which sends (MySensors message) with a netcat command or MQTT publish directly to the node or gateway when the V_TEXT sensor is updated. Basically this is a diversion/bypass functionality to the very core of Domoticz logic.
  • Use dimmer as a dummy parameter passing sensor so that when dimmer value is something then the node does something eg. if dim value is 33% then send specific IR code. Problem is that this just looks plain stupid and is misleading from user perspective.
  • Classic dummy switch on Domo: If V_TEXT value is changed in Domo, change dummy switch status and when the node gets the dummy switch status update it knows to send the request command so that Domo will actually send V_TEXT value. Probably the most used work-around, but also complicated and requires extra dummy defintions in both ends.
Domoticz knows how to send the V_TEXT value (request command from node). Why in the earth it cannot send the update when the sensor is updated in it? For example I have one virtual selector where every level action is a REST API update to one V_TEXT sensor. These updates are just numbers telling to the node which led animation I want to run. The text sensor on Domo gets updated as it should, but the updates will never be signaled back to the node.

This is not a small nuance, but a quite big problem with many home automation projects. Basically it means that you cannot pass parameters to the nodes which is quite a mandatory functionality with any even little more advanced projects than basic switch/temp ones. From MySensors perspective everything is similar with other sensor types. I tested this with OpenHAB and V_TEXT updates on gui was transferred like any other sensor updates to the node.

After so long time having this problem around and people really struggling with it, it would be nice to hear even a short explanation why this is so complicated to implement? Of course updateable V_TEXT sensor field on Domo gui would be nice, but even having REST/Script V_TEXT sensor updates signaled back to the node would be a very welcome step forward with this.