I don’t see how the linked example could work if the light is already on (turned on by the motion sensor). Manually turning on a light that’s already on won’t trigger the State Trigger.
Or did I miss something?
I don’t see how the linked example could work if the light is already on (turned on by the motion sensor). Manually turning on a light that’s already on won’t trigger the State Trigger.
Or did I miss something?
Perhaps not, but the person could press the light switch again to turn it off, then again to turn it back on… not great but would supposedly work (I haven’t tried it).
A zwave noob talking.
Can’t the switch be unpaired with the light?
That way the switch only talks to HA and sitch actions will create an event in HA that can be used in an automation?
Maybe I’m completely lost but I know for sure that is possible with ZigBee.
As far as I know that isn’t possible with any of my zwave devices. Not to say that applies to all though.
Ok. I had no idea that was the case with zwave.
Thank you for clarifying for me
It could and is what I had originally used (I devised a way of doing it well before the State Object contained the user_id) but replaced it with brightness monitoring.
It worked but turning off a light, that is already on, and then turning it back on proved to be counter-intuitive, inconvenient, and disliked (in our home). Adjusting the brightness had much higher user-acceptance. Nevertheless, I didn’t delete my “How To” post in case someone else doesn’t mind that style of operation (but, for the record, I no longer use it).
What is the model of the zwave switch? Many new jasco switches, inovelli switches, and others will trigger a “central scene” command from the switch when it is pressed up or down manually.
You also can listen for this scene event by going to developer tools, and listen on zwave_js_value_notification. In this example, an event fires on my jasco switch when I press it but doesn’t fire when the light turns on or off by zwave command.
If this event fires from your switch, an automation can be made from it.
More info here:
Exactly. Some devices can report ‘button pressed’ events (in addition to reporting the load’s state). I use UPB dimmer switches and they’re capable of reporting the rocker button’s activities (single/double-press, etc).
What the OP wants to do is fairly easy to achieve if the device is capable of reporting button events. Just needs some coaching from Z-Wave users (which leaves me out).
It would be good if the dev tools page was updated to include events such as this. I could try and put together a PR for the docs at some point, however I don’t actually know the events that are missing. Any chance of someone helping out with an updated list of available events? (I realise this is off-topic, sorry)
I use Aeotec nano Z-Wave switches (with the old deprecated Z-Wave integration) and am able to get an event when a switch is toggled. This requires a bit of extra configuration of the switch - see this description here.
I just checked my Aeotec nano dimmers and that parameter (123) is ‘read only’ so I can’t follow that method.
Are you using the old integration? I have a dimmer where I use events from the second switch to switch off other lights. When I look at parameter 123 & 124 on my mobile, they look “dimmer” as if they may be read only, but I can change them. Screenshot_20210905-144039_Home Assistant|379x500
No, I’m using ZWaveJS
That’s why I haven’t upgraded yet - not sure if all the previous functionality is available
I’m not sure if it’s relative to Zwave JS or the actual device. Seems odd that I can’t alter it.
The control panel in zwavejs2mqtt allows you to change any config parameter you want with a “custom configuration”, even if the device isn’t in the database or the database listing in zwavejs for your device doesn’t list all the features/parameters.
I know some zwave devices have “hidden” config parameters that aren’t in the zwave alliance database. Older Jasco dimmers have hidden options to turn the device into an on/off switch or specify a minimum dim value, that weren’t listed in the database or device manual.
Zwavejs2mqtt has some more advanced config settings with its control panel vs just zwavejs. They keep adding features to zwavejs so its getting there, but this looks like a situation where if you’re trying to set an odd parameter for something like the Aeotec Nano it may be worth having those extra features in zwavejs2mqtt vs just zwavejs.
I have not personally used the old zwave integration, other then trying it once and thinking it was awful. The zwavejs2mqtt project is what pushed me over to Home Assistant, and I would say all the functionality the old integration had and more is in zwavejs2mqtt. The original zwave integration is deprecated and its database is not being updated, while zwavejs2mqtt is an actively developed project.
Here’s the screenshot of the config settings in the control panel:
Thanks Tim - I really need to spend the time to look at migrating to zwavejs2mqtt (around 30 switches). I did install it a while ago on a test system and it looks really good.
On a slight side but related topic - do you know if it is possible with zwavejs2mqtt to read a configuration parameter from a service call / automation? Using the legacy integration I can set a parameter in an automation but not read it back. (I use this to change the control of some of my switches to control a Zigbee bulb installed on that switch - then switch back to controlling the Z-wave switch if the Zigbee bulb loses connectivity. This automation would be more reliable if I could confirm the parameter setting by reading it back.)
Based on this post from someone very familiar with the program, it’s not currently possible to get the parameters directly through Home Assistant and the integration.
Setting the config parameters isn’t a problem, getting them is more difficult. Most of the time you set them from the controller to the device, but I’m guessing you are updating the config at the device itself, or it is updating it on its own? Out of curiosity whats the device and info you’re looking for?
Also, many zwave devices have a “notification class” that does report as an event you can listen for on zwave_js_value_notification. In addition, if it’s something like a power meter, an entity is usually created for that when the device is added.
If it’s just a value stored and no notification is sent by the device when it is changed, you pretty much have to call on the device to refresh the config
Parameter values. I know you can reinterview the device in the zwavejs2mqtt control panel and it will update the parameter values, but I don’t know how to automate and extract that info… There is a developer API in zwavejs where it should be possible to call on the API to report config parameters and create some output, but I’m not quite sure how you would put that together. Documentation on the API is here.
In 2021.9 you can use Device automations and/or trigger-based template sensors to read configuration parameter values, or in fact any value. The downside is that these are event based, so a template trigger would lose its state (at least for now) after an HA restart, and not update until it is refreshed or changes. You would need to manually refresh the parameter to get it in-sync.
Thanks @freshcoast , this is very useful and just shows the fast pace of development around zwavejs- Your other post that it wasn’t possible yet was only a few weeks old. I have 2021.9 and just checked it out, and seems pretty easy to setup right in the UI