Home Assistant - 2nd Gen Switch RGB working!

Perfect! Thank you. I’ve got it working 100%
Now I just need a couple of those dimmers :wink:

Although I’ll probably self justify needing another switch with the LED Notification before then :crazy_face:

1 Like

2 more questions…
Does the “Config Button” send a scene ID and Data similar to the up/down scenes?

Also, out of curiosity, is there a similar method to the LED Notification to enable and disable the led on the Gen 1 scene switches/dimmers?
I have several in “smart/always powered” mode and a couple are next to a GE switch. It would be nice to turn the “blue led” on when the lights are off, etc…

FYI, I liked the notification so much, it didn’t take long to justify a second switch (got it yesterday).

I received my 2nd switch but I’m stuck trying to get the scenes to work.
I’m looking to use it to control a few smart lights.
I’ve got several of the Gen 1’s with scenes controlling smart lights in Home Assistant.
I checked the zwcfg_…xml file and noticed the central scene section for the 2 switches seemed to be missing a couple of lines, so I edited it to match the gen 1’s, but that didn’t help. Below is the section from the xml file.

		<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" issecured="true" innif="true" scenecount="0">
			<Instance index="1" />
			<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
			<Value type="int" genre="user" instance="1" index="1" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="7860" />
			<Value type="int" genre="user" instance="1" index="2" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="7860" />
		</CommandClass>

Any suggestions?

The Notifications are working great though :laughing:

–Edit–
Never mind, I had a light bulb moment right after typing the question and was able to pull it from the Zwave logs.
The above works, but the “scene_data” for a single press up or down is “7680” for the Gen2 where it was “0” for the Gen1’s.

Is there a list of the scene data for the other scenes?

Let me check with Eric M – Home Assistant is like a whole new level for me!

Hey @platup, other Eric here. I honestly am not sure what scene data each scene creates. I only played with a couple scenes and just recorded what was in the log, but didn’t make a list. I’ll try to make one when I get a chance, but if you beat me too it, feel free to post it. :wink:

Ok, I’ve pulled a list of the scenes:

Button Press Scene ID Scene Data
1 x Up 2 7680
1 x Down 1 7680
2 x Up 2 7860
2 x Down 1 7860
3 x Up 2 7920
3 x Down 1 7920
4 x Up 2 7980
4 x Down 1 7980
5 x Up 2 8040
5 x Down 1 8040
1 x Config 3 7680

I also had to add a 3rd line in the zwcfg_xxxxxx.xml file.

Mine now looks like:

  	<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="4" issecured="true" innif="true" scenecount="0">
  		<Instance index="1" />
  		<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
  		<Value type="int" genre="user" instance="1" index="1" label="Top Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
  		<Value type="int" genre="user" instance="1" index="2" label="Bottom Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
  		<Value type="int" genre="user" instance="1" index="3" label="Config Button Scene" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
  	</CommandClass>

Notes - For anyone wanting to setup scene support in Home Assistant
Since Home Assistant doesn’t support Central Scenes by default (yet), a file has to manually be edited to add support.

  1. The file that needs to be edited is /config/xmlcfg_(some random chars).xml
  2. You’ll need to Stop the Zwave Network while editing the file. This can be done in the Zwave configuration section of Home Assistant.
  3. The last 3 “<Value type=“int”…” lines in the example above will need to be added to the “COMMAND_CLASS_CENTRAL_SCENE” section of the Inovelli controller. Assuming it was just added, it should be the last device in the xml file.
  4. Once all that is done, start the Zwave network again.

Now an Event Trigger can be setup in HASS for the Event Type “zwave.scene_activated”
And the Event Data can look something like:

entity_id: zwave.inovelli_unknown_type_0002_id_0001
scene_data: 7680
scene_id: 2

Edit with the values from table above to trigger different scenes.
4th post down describes setting up the Notifications.

8 Likes

@platup Awesome, thanks for posting! Can you mark your post as the “solution” so it will be referenced in your first post?

I was able to trigger a notification but I’m not sure how to clear it. Is there a special “clear” value?

Nevermind, I read the manual. It’s 0.

For people using node-red I created a node “node-contrib-inovelli-status-manager” (you can npm install it if it isn’t published and installable from the palette). It is meant to be used before a svc: zwave:set_config_parameter node.

It doesn’t do much but it makes selecting the parameters (especially the color) for the status led much easier. LMK if you run into any problems via github issues (this is my first time making a node)

4 Likes

Do u mind attaching the flow json file ?

Hey @mattp - glad you found it. You can also double-tap the config button (granted this is a temporary clear as the notification will trigger again, but just wanted to throw it out there).

Sure. I just published a new version that fixes a duration issue (I set the max too high, 255 should turn it on indefinitely until changed) as well as displaying a node status w/ the current color that it sent downstream for reference (the number representation of it at least).

Basic scene setting (trigger the node and set it directly to one switch)
[{“id”:“f651da8c.4816f8”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:""},{“id”:“e23e089f.6aecb8”,“type”:“inject”,“z”:“f651da8c.4816f8”,“name”:"",“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:680,“y”:240,“wires”:[[“b38bd8b8.5a2af8”]]},{“id”:“b38bd8b8.5a2af8”,“type”:“inovelli-status-manager”,“z”:“f651da8c.4816f8”,“name”:"",“nodeid”:“1”,“color”:“107”,“level”:10,“duration”:30,“display”:“2”,“x”:910,“y”:240,“wires”:[[“531f74fb.6c3d3c”]]},{“id”:“531f74fb.6c3d3c”,“type”:“api-call-service”,“z”:“f651da8c.4816f8”,“name”:"",“server”:"",“service_domain”:“zwave”,“service”:“set_config_parameter”,“data”:"",“mergecontext”:"",“x”:1200,“y”:240,“wires”:[[]]}]

Setting multiple switches w/ the same scene (e.g. if your garage door is open and you want the status on all your inovelli switches to be red)
[{“id”:“f651da8c.4816f8”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:""},{“id”:“e23e089f.6aecb8”,“type”:“inject”,“z”:“f651da8c.4816f8”,“name”:"",“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:680,“y”:240,“wires”:[[“b38bd8b8.5a2af8”]]},{“id”:“b38bd8b8.5a2af8”,“type”:“inovelli-status-manager”,“z”:“f651da8c.4816f8”,“name”:"",“nodeid”:"",“color”:“107”,“level”:10,“duration”:30,“display”:“2”,“x”:910,“y”:240,“wires”:[[“531f74fb.6c3d3c”,“7c297c51.a04874”,“b723e1f.8abd12”,“d010294e.c69128”]]},{“id”:“531f74fb.6c3d3c”,“type”:“api-call-service”,“z”:“f651da8c.4816f8”,“name”:“node 1”,“server”:"",“service_domain”:“zwave”,“service”:“set_config_parameter”,“data”:"{ “node_id”: 1 }",“mergecontext”:"",“x”:1150,“y”:200,“wires”:[[]]},{“id”:“7c297c51.a04874”,“type”:“api-call-service”,“z”:“f651da8c.4816f8”,“name”:“node 2”,“server”:"",“service_domain”:“zwave”,“service”:“set_config_parameter”,“data”:"{ “node_id”: 2 }",“mergecontext”:"",“x”:1150,“y”:240,“wires”:[[]]},{“id”:“b723e1f.8abd12”,“type”:“api-call-service”,“z”:“f651da8c.4816f8”,“name”:“node 3”,“server”:"",“service_domain”:“zwave”,“service”:“set_config_parameter”,“data”:"{ “node_id”: 1 }",“mergecontext”:"",“x”:1150,“y”:280,“wires”:[[]]},{“id”:“d010294e.c69128”,“type”:“api-call-service”,“z”:“f651da8c.4816f8”,“name”:“node 4”,“server”:"",“service_domain”:“zwave”,“service”:“set_config_parameter”,“data”:"{ “node_id”: 1 }",“mergecontext”:"",“x”:1150,“y”:320,“wires”:[[]]},{“id”:“2f9b477.d2230b8”,“type”:“comment”,“z”:“f651da8c.4816f8”,“name”:"",“info”:“Note: node id is not set on the status manager, it is set on the svc calls and the svc call only inherits the value and other params”,“x”:860,“y”:200,“wires”:[]}]

example flow where you want to programatically override settings (e.g. in a certain case you want to set a different color or blink/pulse instead of solid or whatever)
[{“id”:“f651da8c.4816f8”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:""},{“id”:“b38bd8b8.5a2af8”,“type”:“inovelli-status-manager”,“z”:“f651da8c.4816f8”,“name”:"",“nodeid”:"",“color”:“107”,“level”:10,“duration”:30,“display”:“2”,“x”:910,“y”:240,“wires”:[[“531f74fb.6c3d3c”]]},{“id”:“531f74fb.6c3d3c”,“type”:“api-call-service”,“z”:“f651da8c.4816f8”,“name”:“node 1”,“server”:"",“service_domain”:“zwave”,“service”:“set_config_parameter”,“data”:"{ “node_id”: 1 }",“mergecontext”:"",“x”:1110,“y”:240,“wires”:[[]]},{“id”:“2f9b477.d2230b8”,“type”:“comment”,“z”:“f651da8c.4816f8”,“name”:"",“info”:“You can send payload parameters to override status manager settings (e.g. programatically setting a color or pulse type)”,“x”:700,“y”:200,“wires”:[]},{“id”:“e23e089f.6aecb8”,“type”:“inject”,“z”:“f651da8c.4816f8”,“name”:"",“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:540,“y”:240,“wires”:[[“35c95880.f6fe18”]]},{“id”:“35c95880.f6fe18”,“type”:“function”,“z”:“f651da8c.4816f8”,“name”:"",“func”:“return {\n payload: {\n color: 1,\n display: 3,\n }\n}”,“outputs”:1,“noerr”:0,“x”:690,“y”:240,“wires”:[[“b38bd8b8.5a2af8”]]}]

Wow… this is cool stuff. I will try out today… thanks…

Dang this is next level. Really cool @pdong!

I took a slightly different approach to setting LED colors. I am not familiar with node-RED, so I created a script in home assistant that I can just call when needed.

When the script is called from an automation, I can just pass some variables to the script, and it will calculate the correct value.

  • Color = red, orange, green, blue, yellow, cyan, or 0-255
  • duration =0-255, or “on”
  • effect = off, solid, fast_blink, strobe, slow_blink, pulse
  • level = 1-10
  • node_id = the node# to pass the parameter to
3 Likes

For those of you not using node-red I put together a simple visual calculator web app that can be accessed here: https://nathanfiscus.github.io/inovelli-notification-calc/ . Still a work in progress, but gives you an idea of what the output will look like before sending the notification to the switch.

17 Likes

Here’s a more complete list of scene event data. This includes the hold/release events.

Button Press Scene ID Scene Data
1 x Up 2 7680
1 x Down 1 7680
2 x Up 2 7860
2 x Down 1 7860
3 x Up 2 7920
3 x Down 1 7920
4 x Up 2 7980
4 x Down 1 7980
5 x Up 2 8040
5 x Down 1 8040
1 x Config 3 7680
Hold Up 2 7800
Release Up 2 7740
Hold Down 1 7800
Release Down 1 7740
6 Likes

Dude… just seeing this… holy crap this is next level man. Even @EricM_Inovelli was blown away and he’s hard to impress!

Do you mind if we direct people here from our site?

We have a cool spreadsheet we put together, but this really makes it easier to visualize what the switch looks like.

Nice job and thanks again!

2 Likes

Thank you. And I do not mind at all. :+1: