Page 1 of 1

Central scene (via zwavejs2mqtt) ?

Posted: Sunday 20 February 2022 18:43
by jefft
Hi All,

Does anyone know of a way to use z-wave 'central scene' remote controls with domoticz via zwavejs2mqtt? I have 2 x Remotec ZRC-90 and 2 x Hank SCN04; all of these send a MQTT message 'zwave/RemoteName/##/0/scene/### when a button is pressed. Domoticz doesn't react to that, or even report it in the log as a received message.

With the old OZW binding, both these device types sent switch on/off commands, which created domoticz switch (button) devices.

I read somewhere, that the Hank has association groups for BASIC_SET commands, but right now zwjs2mqtt isn't setting up groups when I ask it to. In any event, the Remotec has no such ability; all it can send is scenes, so I need to find a solution to handle the scenes. Looking at my domoticz device list, I can see that mqtt AD has created some 'custom sensor' devices with names like 'Hank remote 1_scene_state_scene_003'. These are marked as in-use, but don't show up anywhere in the UI. There are no equivalents for the Remotec remotes; those only have a 'battery_islow' switch device each.

Far as I know, domoticz has never supported CENTRAL_SCENE, but with the simplicity of handling z-wave via MQTT, I would think it is now quite an easy enhancement to create. Maybe I'll ask @gizmocuz nicely... meanwhile, I need a solution before the rest of the family start complaining that 'nothing works'!

I'm thinking of two options...
(1) Tweaking the JSON definition of the devices in zwjs and locking it, if that's possible, so that the message sent is a BASIC_SET; the issue here would be how to send the discovery messages to create the switch devices. Anyone know how to do this / have an example?
(2) Catching the scene messages from the broker using a NodeRed flow and re-publishing them as domoticz/in to set some dummy switch states.
(3) Hoping someone else has a smart solution already!! :lol:

Any ideas?

Thanks!

Re: Central scene (via zwavejs2mqtt) ?

Posted: Sunday 20 February 2022 23:13
by jefft
So, a bit more playing around and I think I've found the solution, or at least most of it...

- domoticz does handle the scene messages; they trigger an update event to the custom sensors named for each scene/remote button;
- the custom sensor devices are only created after each button has been pressed for the first time (that's why the Hank showed them but the ZRCs didn't initially);
- an event with a 'device' trigger using the custom sensor devices will catch button presses (the state and level of the sensor are always 0,nil);
- the event occurs once only per button press;
- double-click and button held down appear to activate the same device as a single click and once only, so if you were using those, that might be an issue.

Hope that helps others as people migrate to zwavejs2mqtt :-)