New here, apologies if I break any rules. I searched as best I could before posting.
So I’m finally getting around to setting up notifications for my Inovelli dimmers and switches. However, I’m using Home Assistant and Zwavejs2MQTT, which means that there is no service named “zwave.set_config_parameter” (in HA).
So my main question is how do I set notifications in Home Assistant, through Zwavejs2MQTT?
My first goal would be to manually set the notification though MQTT. This (temporarily) takes Home Assistant out of the equation. I used the calculator to get the “Configuration Value (Parameter 16)”. And from this post on Reddit, in the very last image, the poster is suggesting that publishing the Configuration Value to the MQTT topic “zwavejs2mqtt/<node_name>/112/0/16/set” is how to get this to work.
But when I do this, nothing happens. Here’s my MQTT broker. One thing I noticed is that all of the other topics have JSON formatted messages with a timestamp, and what I published was just a unformatted number. Issue?
My second goal is to get this working with Home Assistant. My question is how this would work. Am I going to have to manually publish a MQTT value to a particular topic? And if so, how would I send several notifications out at once? My concern is that there is no “mapping” between the name of the dimmer in HA and the MQTT topic I’d need to publish to. Does that make sense?
I would be very glad to provide any additional information that may be needed. Thanks in advance!
Can’t help with MQTT, but the HA service you need with ZWAVE2MQTT is zwave_js.set_config_parameter. It appears that service requires you to use the bitmask to set each part of the LED effect, rather than the calculated value for the entire parameter. (At least that’s what works for me.)
That’s one of the issues I am running into. I do not believe that I have the “zwave_js.set_config_parameter” available in Home Assistant. In HA, if I go to Developer Tools, and then the Services tab, I type in “zw” in the box and there are no results.
I am running Zwavejs2MQTT on a completely separate machine than HA. I’m not using the Zwavejs2MQTT addon.
You said you wanted to do it in HA. If you do add the Zwavejs2MQTT addon, you’ll zwave_js.set_config_parameter, not zwave.set_config_parameter that you were trying.
Maybe I am missing something. I tried installing the Zwavejs2MQTT addon but I still did not have the zwave_js.set_config_parameter service available in the Developer Tools. I did restart HA after installing. Shouldn’t the service be listed?
Yes, it should be. Did you install the Zwave JS integraton as well as the addon? If not, you need to install and configure that as well. The installation process has a checkbox that says something like “Use the ZWAVE supervisor addon”. Uncheck that to allow you to use the ZWAVE2MQTT addon instead.
(BTW: Since this is more of a general HA issue rather than than an Inovelli issue, you may get better support on the HA forums.)
You need to be using the Z-Wave JS integration in HA to get that service. This communicates with ZJS2M via websockets, not MQTT (you disable MQTT on the ZJS2M side).
If you want to stick with MQTT, setting notifications will have to be through node red or direct calls. I am unaware how to do this.
ZJS Integration + ZJS2M via websockets is the preferred solution for most, and you can have the server and integration on different computers on the LAN.
As suggested, go to the zwavejs2MQTT web interface and in the settings disable the MQTT and enable the HA web sockets. It’s not called that, but it’s the switch when you click on and expand the HA bar.
Then, in HA add the zwaveJS integration.
As a hint, I would suggest renaming each device and assigning the location in zwavejs2MQTT. I personally disable HA while doing this because otherwise the entity and nice names for the devices don’t match making it more difficult to use the entities. With the renaming done with HA off, the new entity copied into HA would be named for example “light.living_room” and “Living Room”.
Ooop, that’s what I missed. I didn’t install the integration. So obvious in hindsight.
This really helps my understanding of how this fits together. So the Zwavejs2MQTT integration can speak over WebSockets to a separate Zwavejs2MQTT instance running on a separate computer?
If so, that’s exactly what I want. Right now, HA only using MQTT to talk to all my Zwave devices. I didn’t understand how HA could use the zwave_js.set_config_parameter service, because to my knowledge, that’s not done over MQTT.
One moment, let me try this out.
Edit: Do I need the ZwaveJS2MQTT addon? If I point the Zwave2MQTT integration to my Zwave2MQTT instance on another computer, then I don’t need the addon, right?
Close. The Zwave JS Integration speaks to ZwaveJS2MQTT over websockets. You are just using the 2MQTT for the nice dashboard and look/feel, but it talks just like any other ZwaveJS server would by using websockets.
There are 2 parts to the install. The zwaveJS integration and a gateway.
The integration talks to the gateway and allows HA to control the devices. You go to the config circle bottom of the tool bar, pick the integrations or second choice in the newest version with the boxes then click the add at the bottom to install the integration.
There are 2 gateways you can use - zwaveJS or zwaveJS2MQTT. I use the second one because it has a full user interface and when I started the zwaveJS gateway had no interface. I understand the zwaveJS gateway now has a web interface too but I’ve never tried it. You’ve got the MQTT one running, so in it’s setup turn off MQTT and turn on the HA gateway.
The gateway can be run on a completely different computer compared to HA. Doesn’t matter as long as the integration can network access it.
I run core HA so the integration installs by itself. I understand that if you run a HA OS that installing the integration tries to also install a gateway. What you’re really doing on HA OS when you install the gateway is running the gateway as a docker container.
zwave2MQTT is yet another gateway and it’s not what you want. It more or less does what you were doing with zwaveJS2MQTT, that is bring the zwave devices to HA via MQTT.
In hindsight, my very first post doesn’t make a lot of sense because I misunderstood some things.
I am running Zwavejs2MQTT on a separate computer. HomeAssistant picked up all my Zwave devices though MQTT autodiscovery. So all HA to Zwave device communication was happening over MQTT. Because of that, I thought that I also had to (somehow) set notifications using MQTT, because that’s the only way HA was communicating with my Zwave devices.
I was also under the impression that the zwave_js.set_config_parameter service came from the Zwavejs2MQTT addon. And since I wasn’t using the addon, I thought there was no way for me to get the zwave_js.* services.
What I learned is that the Zwavejs2MQTT integration can speak to any Zwavejs2MQTT instance using WebSockets. So that’s how I can use the zwave_js.* services with my remote Zwavejs2MQTT instance.
So in response to my first post, setting notifications over MQTT is not needed. I should instead be using the Zwave2MQTT integration and using WebSockets for communication.
I’m going to make another post in a sec about the specific HA automations I tried. (Spoiler: it’s working!)
But I kept searching and I read about the zwave_js.bulk_set_partial_config_parameters service. That service allows you to more easily specify the individual parts of the notification, which I think is much easier to read and adjust. Source of code here So the following code works:
- service: zwave_js.bulk_set_partial_config_parameters
target:
entity_id:
- light.master_bedroom_lights
data:
parameter: '16'
value:
'255': Red
'65280': 100%
'16711680': 10
'2130706432': Fast Blink