image not found img not found

Getting homeassistant and lzw30-sn scenes working together

I think this is from when the zwave network was started:

2020-02-08 23:47:43.016 Detail, Node016, Query Stage Complete (Neighbors)
2020-02-08 23:47:43.016 Detail, Node016, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Session live=1
2020-02-08 23:47:43.016 Detail, Node016, QueryStage_Session
2020-02-08 23:47:43.016 Detail, Node016, Queuing (Query) SwitchAllCmd_Get (Node=16): 0x01, 0x09, 0x00, 0x13, 0x10, 0x02, 0x27, 0x02, 0x25, 0x2c, 0xdb
2020-02-08 23:47:43.016 Info, Node016, CentralScene RequestState: 2
2020-02-08 23:47:43.016 Info, Node016, CentralScene: Not a StaticRequest
2020-02-08 23:47:43.016 Detail, Node016, Queuing (Query) PowerlevelCmd_Get (Node=16): 0x01, 0x09, 0x00, 0x13, 0x10, 0x02, 0x73, 0x02, 0x25, 0x2d, 0x8e
2020-02-08 23:47:43.016 Detail, Node016, Queuing (Query) ProtectionCmd_Get (Node=16): 0x01, 0x09, 0x00, 0x13, 0x10, 0x02, 0x75, 0x02, 0x25, 0x2e, 0x8b
2020-02-08 23:47:43.016 Detail, Node016, Queuing (Query) Query Stage Complete (Session)

and this is from when I pressed the buttons:

2020-02-09 06:53:12.204 Detail, Node016,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x10, 0x05, 0x5b, 0x03, 0x11, 0x80, 0x02, 0x2e
2020-02-09 06:53:12.204 Detail,
2020-02-09 06:53:12.204 Info, Node016, Received Central Scene set from node 16: scene id=2 in 7680 seconds. Sending event notification.
2020-02-09 06:53:12.204 Detail, Node016, Refreshed Value: old value=7680, new value=7680, type=int
2020-02-09 06:53:12.204 Detail, Node016, Changes to this value are not verified
2020-02-09 06:53:12.205 Detail, Node016, Notification: ValueChanged
2020-02-09 06:53:12.304 Detail, Node016,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x10, 0x03, 0x25, 0x03, 0xff, 0x38
2020-02-09 06:53:12.304 Detail,
2020-02-09 06:53:12.304 Info, Node016, Received SwitchBinary report from node 16: level=On
2020-02-09 06:53:12.304 Detail, Node016, Refreshed Value: old value=false, new value=true, type=bool
2020-02-09 06:53:12.304 Detail, Node016, Changes to this value are not verified
2020-02-09 06:53:12.304 Detail, Node016, Notification: ValueChanged
2020-02-09 06:53:13.806 Detail, Node016,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x10, 0x05, 0x5b, 0x03, 0x12, 0x80, 0x01, 0x2e
2020-02-09 06:53:13.806 Detail,
2020-02-09 06:53:13.806 Info, Node016, Received Central Scene set from node 16: scene id=1 in 7680 seconds. Sending event notification.
2020-02-09 06:53:13.806 Detail, Node016, Refreshed Value: old value=7680, new value=7680, type=int
2020-02-09 06:53:13.806 Detail, Node016, Changes to this value are not verified
2020-02-09 06:53:13.806 Detail, Node016, Notification: ValueChanged
2020-02-09 06:53:13.976 Detail, Node016,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x10, 0x03, 0x25, 0x03, 0x00, 0xc7
2020-02-09 06:53:13.976 Detail,
2020-02-09 06:53:13.976 Info, Node016, Received SwitchBinary report from node 16: level=Off
2020-02-09 06:53:13.976 Detail, Node016, Refreshed Value: old value=true, new value=false, type=bool
2020-02-09 06:53:13.976 Detail, Node016, Changes to this value are not verified
2020-02-09 06:53:13.977 Detail, Node016, Notification: ValueChanged

This is not from right now but it is from this switch and from activating a scene by multi-pressing the button.

edit:
This is from just now. (I pressed config button once and double-clicked down button):

2020-02-09 11:44:21.941 Detail, Node016,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x10, 0x05, 0x5b, 0x03, 0x14, 0x80, 0x03, 0x2a
2020-02-09 11:44:21.941 Detail,
2020-02-09 11:44:21.941 Info, Node016, Received Central Scene set from node 16: scene id=3 in 7680 seconds. Sending event notification.
2020-02-09 11:44:21.941 Warning, Node016, No ValueID created for Scene 3
2020-02-09 11:44:26.542 Detail, Node016,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x10, 0x05, 0x5b, 0x03, 0x15, 0x83, 0x01, 0x2a
2020-02-09 11:44:26.542 Detail,
2020-02-09 11:44:26.542 Info, Node016, Received Central Scene set from node 16: scene id=1 in 7860 seconds. Sending event notification.
2020-02-09 11:44:26.542 Detail, Node016, Refreshed Value: old value=7680, new value=7860, type=int
2020-02-09 11:44:26.542 Detail, Node016, Changes to this value are not verified
2020-02-09 11:44:26.543 Detail, Node016, Notification: ValueChanged

It looks like OZW is detecting the scenes, so it could just be something wrong with your automation. Here are the various scene ids for HA/OZW 1.4:

Button Press Scene ID Scene Data
1 x Up 2 7680
2 x Up 2 7860
3 x Up 2 7920
4 x Up 2 7980
5 x Up 2 8040
HOLD Up 2 7800
Release Up (after hold) 2 7740
1 x Down 1 7680
2 x Down 1 7860
3 x Down 1 7920
4 x Down 1 7980
5 x Down 1 8040
HOLD Down 1 7800
Release Down (after hold) 1 7740
1 x Config 3 7680

I believe your automation trigger should look something like this:

automation
  - alias: 'Dining room dimmer - double tap up'
    trigger:
      - event_type: zwave.scene_activated
        platform: event
        event_data:
          entity_id: zwave.dining_room_cans
          scene_id: 2
          scene_data: 7860
1 Like

Maybe I am missing (understanding) something. I didn’t make an automation yet because when I go to hass:8123/developer-tools/event there is no event listed as zwave.scene_activated. I thought (think?) that it is supposed to be there if there is such an event possible.

Unfortunately, I have switched to OpenZwave 1.6 (using zwave2MQTT instead of the version of OZW built-in to HA), so I don’t have a way to check the events on my own setup.

Did you make sure HA was shut down before editing your zwcfg*.xml file? I believe HA overwrites this file on shutdown, and only reads it at startup. If you edited this file while HA was running, perhaps not everything has loaded.

I would also recommend setting an an automation anyway, just in case. There is always a possibility that HA just isnt logging the zwave scene events.

OK I will ask in HASS forums maybe. Yes I did make sure hass was shutdown and the config change is sticking (and I was able to add the configs to change the led settings etc because of that).
I also did add an automation but I don’t have a good way to test so I’m not sure if htere is a mistake in the automation.
BTW:
Is there any noticeable delay by using zwave2mqtt instead of builtin hass pyozw?

I havent noticed any delays. It took a bit longer to get everything configured, but I like it a lot more than the built-in method.

Ok I found this:


It has the openzwave 1.4 (the version HASS still uses which is old, hopefully they’ll catch up one day) configuration files. I didn’t check the diff but the files I was using were apparently for ozw 1.6.

I think this should be documented somewhere for homeassistant users…
Maybe @EricM_Inovelli can help with that.

1 Like

Yeah, looks like you might have skimmed over the step that said to grab the 1.4 branch and not the master branch from github. If you run into anything else, feel free to mention me, I’m running the native HA OZW manager (plus node red) with no issues at this point.

1 Like

Exactly. Thank you. I didn’t process it fully.

@jtronicus could you share how you got scene’s working in Zwave2MQTT running OZW 1.6

I can not for the life of me figure out how to get them working.
if i Refresh Node Info the device for a brief period is a generic dimmer device and scenes show up under User in the node config - however as soon as the device is detected as LZW31 the scene options disappear and it seems no scenes are being detected.

LZW31.xml does not include the central scene command class=91 section.
Bit baffled where the scenes are generated. Thanks in advanced :slight_smile:

I believe lzw31.xml is for the black series dimmer, which doesnt support scenes. You would want to check the lzw32-sn.xml file to make sure the scene section is removed.

Also, sometimes when I refresh a node info, OZW re-downloads it, or renames it to something like lzw32-sn.xml.1

If that happens, I just rename it back and refresh the node info again.

OZW 1.6 automatically detects scenes, but if the scene info for 1.4 is present in the config file, the scenes stop working

that’s weird - ok i think i see the problem, although not sure of the fix yet (thanks for the reply too).

My red series dimmer is being detected as a black series - i’ll check the manufacturer_specific.xml and see if that fixes it.

ok got the switch reporting as the correct one now but i get this:

OpenZWave Info, Node067, ApplicationCommandHandler - Unhandled Command Class 0x5b
OpenZWave Detail, Node067, Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x43, 0x05, 0x5b, 0x03, 0x17, 0x83, 0x01, 0x7b
OpenZWave Detail,

0x5b is the hex for 91 which is the central scene command class

progress (another refresh node info)

OpenZWave Info, Node067, Received Central Scene set from node 67: scene id=1 with key Attribute 3. Sending event notification.
OpenZWave Warning, Node067, No ValueID created for Scene 1
OpenZWave Warning, Node067, CommandClass COMMAND_CLASS_CENTRAL_SCENE HandlerMsg Returned False

EDIT: cant seem to progress past here - do you have scenes in your user config under node? @jtronicus
image

@Jaburges yes, scenes do appear in my user config section, just like in your screenshot.

It sounds OZW is detecting that a scene was sent (id=1 means Off button was pressed, attribute 3 means the key was held down?). Perhaps there is missing information in your ozwcache.xml file?

the relevant section in my ozwcache.xml file looks like this (and it was automatically generated. I did not make any edits to this file):

			<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE">
				<Compatibility />
				<State>
					<CCVersion>3</CCVersion>
					<InNif>true</InNif>
					<SceneCount>3</SceneCount>
					<StaticRequests>2</StaticRequests>
				</State>
				<Instance index="1" />
				<Value type="list" genre="user" instance="1" index="1" label="Scene 1" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="0">
					<Help></Help>
					<Item label="Inactive" value="0" />
					<Item label="Pressed 1 Time" value="1" />
					<Item label="Key Released" value="2" />
					<Item label="Key Held down" value="3" />
					<Item label="Pressed 2 Times" value="4" />
					<Item label="Pressed 3 Times" value="5" />
					<Item label="Pressed 4 Times" value="6" />
					<Item label="Pressed 5 Times" value="7" />
				</Value>
				<Value type="list" genre="user" instance="1" index="2" label="Scene 2" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="0">
					<Help></Help>
					<Item label="Inactive" value="0" />
					<Item label="Pressed 1 Time" value="1" />
					<Item label="Key Released" value="2" />
					<Item label="Key Held down" value="3" />
					<Item label="Pressed 2 Times" value="4" />
					<Item label="Pressed 3 Times" value="5" />
					<Item label="Pressed 4 Times" value="6" />
					<Item label="Pressed 5 Times" value="7" />
				</Value>
				<Value type="list" genre="user" instance="1" index="3" label="Scene 3" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="2">
					<Help></Help>
					<Item label="Inactive" value="0" />
					<Item label="Pressed 1 Time" value="1" />
				</Value>
				<Value type="int" genre="user" instance="1" index="256" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3">
					<Help></Help>
				</Value>
				<Value type="int" genre="config" instance="1" index="257" label="Scene Reset Timeout" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="1000">
					<Help></Help>
				</Value>
			</CommandClass>

Here is some sample output from my OZW_Log.txt file:

2020-04-02 20:21:08.414 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x0e, 0x82, 0x01, 0x33
2020-04-02 20:21:08.414 Info, Node019, Received Central Scene set from node 19: scene id=1 with key Attribute 2. Sending event notification.
2020-04-02 20:21:08.414 Detail, Node019, Refreshed Value: old value=0, new value=3, type=list
2020-04-02 20:21:08.414 Detail, Node019, Changes to this value are not verified
2020-04-02 20:21:08.414 Info, Node019, Automatically Clearing Scene 1 in 1000ms
2020-04-02 20:21:08.415 Detail, Node019, Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 1
2020-04-02 20:21:09.415 Detail, Node019, Refreshed Value: old value=3, new value=0, type=list
2020-04-02 20:21:09.415 Detail, Node019, Changes to this value are not verified
2020-04-02 20:21:09.415 Detail, Node019, Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 1
2020-04-02 20:21:12.268 Detail, Node019,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x13, 0x05, 0x5b, 0x03, 0x0f, 0x81, 0x01, 0x31
2020-04-02 20:21:12.268 Info, Node019, Received Central Scene set from node 19: scene id=1 with key Attribute 1. Sending event notification.
2020-04-02 20:21:12.268 Detail, Node019, Refreshed Value: old value=0, new value=2, type=list
2020-04-02 20:21:12.269 Detail, Node019, Changes to this value are not verified
2020-04-02 20:21:12.269 Info, Node019, Automatically Clearing Scene 1 in 1000ms
2020-04-02 20:21:12.269 Detail, Node019, Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 1
2020-04-02 20:21:13.269 Detail, Node019, Refreshed Value: old value=2, new value=0, type=list
2020-04-02 20:21:13.269 Detail, Node019, Changes to this value are not verified
2020-04-02 20:21:13.269 Detail, Node019, Notification: ValueChanged CC: COMMAND_CLASS_CENTRAL_SCENE Instance: 1 Index: 1

thanks for checking and adding the ozwcache file contents - I have all that in ozwcache
really cant figure out what is missing to enable scenes :frowning:

Could you post the relevant sections of your ozecache.xml and lzw31-sn.xml file? Perhaps its a minor typo somewhere, and a second set of eyes might spot it.

1 Like

ozwcache:

<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE">
				<Compatibility />
				<State>
					<CCVersion>3</CCVersion>
					<InNif>true</InNif>
					<SceneCount>3</SceneCount>
					<StaticRequests>2</StaticRequests>
				</State>
				<Instance index="1" />
				<Value type="list" genre="user" instance="1" index="1" label="Scene 1" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="0">
					<Help></Help>
					<Item label="Inactive" value="0" />
					<Item label="Pressed 1 Time" value="1" />
					<Item label="Key Released" value="2" />
					<Item label="Key Held down" value="3" />
					<Item label="Pressed 2 Times" value="4" />
					<Item label="Pressed 3 Times" value="5" />
					<Item label="Pressed 4 Times" value="6" />
					<Item label="Pressed 5 Times" value="7" />
				</Value>
				<Value type="list" genre="user" instance="1" index="2" label="Scene 2" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="0">
					<Help></Help>
					<Item label="Inactive" value="0" />
					<Item label="Pressed 1 Time" value="1" />
					<Item label="Key Released" value="2" />
					<Item label="Key Held down" value="3" />
					<Item label="Pressed 2 Times" value="4" />
					<Item label="Pressed 3 Times" value="5" />
					<Item label="Pressed 4 Times" value="6" />
					<Item label="Pressed 5 Times" value="7" />
				</Value>
				<Value type="list" genre="user" instance="1" index="3" label="Scene 3" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="2">
					<Help></Help>
					<Item label="Inactive" value="0" />
					<Item label="Pressed 1 Time" value="1" />
				</Value>
				<Value type="int" genre="user" instance="1" index="256" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3">
					<Help></Help>
				</Value>
				<Value type="int" genre="config" instance="1" index="257" label="Scene Reset Timeout" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="1000">
					<Help></Help>
				</Value>
			</CommandClass>

lzw31-sn.xml here
to save a wall of code.
EDIT: i used diff checker on the ozwcache and the code was the same

The only real difference I see is that I removed the commandclass = 91 section from my lzw31-sn.xml file, and you commented it out. That should cause this issue though.

Even though it gives you an error in your logs, does it post anything to MQTT when you try to trigger a scene?

zwave/19/91/1/1 {"value_id":"19-91-1-1","node_id":19,"class_id":91,"type":"list","genre":"user","instance":1,"index":1,"label":"Scene 1","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Inactive","Pressed 1 Time","Key Released","Key Held down","Pressed 2 Times","Pressed 3 Times","Pressed 4 Times","Pressed 5 Times"],"value":"Inactive","lastUpdate":1585858873270}
zwave/19/91/1/1 {"value_id":"19-91-1-1","node_id":19,"class_id":91,"type":"list","genre":"user","instance":1,"index":1,"label":"Scene 1","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Inactive","Pressed 1 Time","Key Released","Key Held down","Pressed 2 Times","Pressed 3 Times","Pressed 4 Times","Pressed 5 Times"],"value":"Pressed 1 Time","lastUpdate":1585874859473}
zwave/19/91/1/1 {"value_id":"19-91-1-1","node_id":19,"class_id":91,"type":"list","genre":"user","instance":1,"index":1,"label":"Scene 1","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Inactive","Pressed 1 Time","Key Released","Key Held down","Pressed 2 Times","Pressed 3 Times","Pressed 4 Times","Pressed 5 Times"],"value":"Inactive","lastUpdate":1585874860473}
zwave/19/91/1/1 {"value_id":"19-91-1-1","node_id":19,"class_id":91,"type":"list","genre":"user","instance":1,"index":1,"label":"Scene 1","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Inactive","Pressed 1 Time","Key Released","Key Held down","Pressed 2 Times","Pressed 3 Times","Pressed 4 Times","Pressed 5 Times"],"value":"Pressed 2 Times","lastUpdate":1585874863804}
zwave/19/91/1/1 {"value_id":"19-91-1-1","node_id":19,"class_id":91,"type":"list","genre":"user","instance":1,"index":1,"label":"Scene 1","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"values":["Inactive","Pressed 1 Time","Key Released","Key Held down","Pressed 2 Times","Pressed 3 Times","Pressed 4 Times","Pressed 5 Times"],"value":"Inactive","lastUpdate":1585874864804}

Scenes are automatically set back to “Inactive” 1 second after being triggered by default

IN order to have scene from the LZW31-SN I added automations in HASS that are triggered from the scene activated message from the LZW31-SN. This is described at Home Assistant - 2nd Gen Switch RGB working!

Basically you trigger off the event zwave.scene_activated with the LZW31-SN node_id or entity_id and the scene_data and scene_id for that event. Then the automation acitvated the scene you want.