Page 3 of 23

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 15:57
by AllesVanZelf
I notice that Qubino dimmers en shutters are different in ZwaveJS then in OPenZwave. In OpenZwave there is just 1 device with a slider, in ZwaveJS there is a seperated switch and a slider.
Iḿ not sure how to use these in DzVents. Do you see the same? And do you use these?

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 16:05
by heggink
AllesVanZelf wrote: Tuesday 17 August 2021 15:57 I notice that Qubino dimmers en shutters are different in ZwaveJS then in OPenZwave. In OpenZwave there is just 1 device with a slider, in ZwaveJS there is a seperated switch and a slider.
Iḿ not sure how to use these in DzVents. Do you see the same? And do you use these?
Could you post some pictures of what you mean? I don't have zwave shutters, only dimmers (I have zigbee shutters). I would not know what a zwave shutter would translate into in the plugin.

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 16:17
by AllesVanZelf
This is what I see in devices:
Image
If I add 1 switch, it expresses as a slider and the other as switch.

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 16:35
by heggink
Interesting. It looks like it exposes different devices than my fibaro dimmer which exposes 2 devices: 38/1/currentValue and 38/2/currentValue. Both are dimmer devices with a slider and switch.

Can you run the snooper utility (in the tools folder) and post the messages for this device? Interested to see what gets reported. Also, can you show a screenshot of zwavejs2mqtt showing the fields in the multilevel switch?

As mentioned before, we built in the base devices but there is a lot of variation so some devices may need changwes in order to function properly. Luckily, if the plugin gets adapted, deleting the old devices will get the plugin to recreate the right ones again.

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 17:05
by AllesVanZelf
Here is the screenshot of the multilevel switch:
Image
I have to find out how to use the snooper ;)

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 18:12
by IanDury
CO2 device is added but it does not communicate the value in PPM to Domoticz when using the correct type "Air Quality". If I change the type to "Usage" or "Illuminance" the value is communicated to the Domoticz UI correctly.

device_types.yml

Code: Select all

  Carbon_dioxide_CO_level:
    Enabled: true
    Primary_device: true
    Type: Air Quality
    factor: 1
    nValue: 0
    sValue: value
Domoticz log:

Code: Select all

2021-08-17 17:58:35.174 ZW: (ZW) zwave/34/49/0/Carbon_dioxide_CO_level
2021-08-17 17:58:35.174 ZW: (ZW) updateDevice called with topic: zwave/34/49/0/Carbon_dioxide_CO_level and payload b'{"time":1629215915139,"value":2000,"nodeName":"MCO Home","nodeLocation":""}'
2021-08-17 17:58:35.175 ZW: (ZW) zwave/34/49/0/Carbon_dioxide_CO_level
2021-08-17 17:58:35.175 ZW: (ZW) Updating unit 24 as device /34/49/0/Carbon_dioxide_CO_level of type Carbon_dioxide_CO_level with {'time': 1629215915139, 'value': 2000, 'nodeName': 'MCO Home', 'nodeLocation': ''}
2021-08-17 17:58:35.175 ZW: (ZW) Updating with typedef: {'Enabled': True, 'Primary_device': True, 'Type': 'Air Quality', 'factor': 1, 'nValue': 0, 'sValue': 'value'}
2021-08-17 17:58:35.175 ZW: (ZW) nValue: 0 sValue: 2000
2021-08-17 17:58:35.175 (ZW - MCO Home) Updating device from 0:'1757' to have values 0:'2000'. 
Needs some more debugging.

Btw. I removed the excluded nodes that still had retained messages from the broker using MQTT Explorer.

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 19:30
by IanDury
It works when assigning "nValue : value" in the devices_types.yml file. I've kept "sValue : value" but don't know if that is needed.
Where would I find this kind of domoticz device requirements (which Type, SubType, value field to use, etc.)?

Screenshot from 2021-08-17 19-19-40.png
Screenshot from 2021-08-17 19-19-40.png (66.85 KiB) Viewed 1637 times

Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 19:40
by heggink
The types are defined by/in domoticz but it would help if there was a good overview somewhere. The easiest is to refer to the domoticz python plugin wiki.

We also need to add some howto on the zwavejs2mqtt plugin page (wiki?) and how to add missing devices. Would be great if you could make a contribution there as well especially since you are one of the first who installed the plugin and configured it to add missing devices.

I would also love to hear about your experiences once you are switched over: ease to switch from OZW, ease of adding devices and so forth.

I am very pleased with my switch but feedback from others is important.

Sent from my SM-G980F using Tapatalk


Re: zwavejs2mqtt

Posted: Tuesday 17 August 2021 21:52
by waltervl
The best overview would be the Domoticz API JSON page.
https://www.domoticz.com/wiki/Domoticz_ ... .2Fsensors

MQTT of Domoticz and Python plugins are based on this API.

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 9:59
by AllesVanZelf
heggink wrote: Tuesday 17 August 2021 16:35 Interesting. It looks like it exposes different devices than my fibaro dimmer which exposes 2 devices: 38/1/currentValue and 38/2/currentValue. Both are dimmer devices with a slider and switch.

Can you run the snooper utility (in the tools folder) and post the messages for this device? Interested to see what gets reported. Also, can you show a screenshot of zwavejs2mqtt showing the fields in the multilevel switch?
How do I run the command mqtt-snooper.py?
As python ./mqtt-snooper.py 192.168.x.x
as the ip of the mqtt server? Or/and do I have to specify a specific device?

If I try this I get: "connected with code 5"

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:08
by heggink
you use authentication with mqtt, yes? the utility doesn't support that :-(. Sounds like another change that needs to be made.

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:18
by heggink
AllesVanZelf wrote: Tuesday 17 August 2021 16:17 This is what I see in devices:
Image
If I add 1 switch, it expresses as a slider and the other as switch.
When you go to the device itself (under the switches tab in domotocz) and select edit, what do you see? It should be a switch type dimmer. Can you check? If not, can you let m eknow what it is and change it to dimmer?

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:21
by AllesVanZelf
2786 is a dimmer and 2785 is a on/off switch. These where default on these devices.
I can change them, but then they do not work anymore.

And yes I do have a username and password on mosquitto.

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:29
by heggink
OK, so if 2786 is already a dimmer, you can switch it on/off by clicking on the icon and you can set the dim level with the slider, correct? I suspect the device type exposes an on/off as well but you would not need that device.

I can just click on the light bulb to switch it on/off and use the slider to dim. I can also use dzvents switchOn() and switchOff() as well as dimTo(level) on that device.

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:37
by AllesVanZelf
Well almost.
These domoticz qubino dimmer devices have: 'Set Level' and 'Off' option. No 'On'

Code: Select all

2021-08-18 10:31:34	Off
2021-08-18 10:31:31	Set Level: 21 %
2021-08-18 10:31:28	Set Level: 15 %
2021-08-18 10:31:18	Set Level: 13 %
2021-08-17 15:34:45	Off
2021-08-17 15:34:28	Set Level: 13 %
2021-08-17 15:34:24	Off
I can put it on by setting the level.
But that is a little inconvenient in DzVents.

Code: Select all

If dimmer.state == 'On'

Does not work then. I have to use something like:

Code: Select all

If dimmer.state ~= 'Off' or dimmer.level > 0

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:53
by IanDury
Instead of the bundled mqtt-snooper you can use mosquitto_sub which supports username/password :

mosquitto_sub -h <host-ip> -q 1 -v -u <username> -P <password> -t zwave/#

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 10:58
by heggink
Ah, OK. That may be a bit of a challenge since the plugin maps zwavejs messages onto domoticz devices 1:1 ie it (currently) does not map multiple messages onto one device. SInce there are a bunch of these 'many-in-one' devices (like these philio PST02 devices that have diffreent devices in one physical device), it would mean that the plugin would need to build in specific device aspects for that which, in turn, would make it rather convoluted and less maintainable (not generic).

But that the means that you can click on that device to switch it off but you cannot click it on? Weird. There's no setting in the device that will enable you to switch it on a swell? I found that zwavejs is much more effective in setting device parameters than OZW was (as long as you wake up the device ;-)).

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 11:31
by IanDury
If Domoticz registers this device as a separate dimmer (/38) and switch (/37) you will not be able to use them as a single devicename (dimmer) in dzVents. Use the names as you gave to each of them.

Re: zwavejs2mqtt

Posted: Wednesday 18 August 2021 12:03
by AllesVanZelf
Strange. I can switch the dimmer on in Domoticz. Then I see this is the Domoticz log:

Code: Select all

2021-08-18 11:57:37.351 Status: User: Admin (IP: 192.168.0.34) initiated a switch command (2776/Lamp Openslaande deuren dimmer/On)
But in the device log I do not see this 'On' action. There I see:

Code: Select all

2021-08-18 11:57:38	Set Level: 21 %

Re: zwavejs2mqtt

Posted: Thursday 19 August 2021 22:14
by PieterS
Tried to follow the instructions in the startpost:

On my Raspberry PI 4 with Domoticz Version 2021.1 (build 13360) I pasted in the cli:

Code: Select all

docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
and got this answer:

Code: Select all

docker: unknown server OS: .
See 'docker run --help'.

Help didn't give me the info I need.
--rm --> there are no other docker containers on my Pi
- it --> is not mentioned

Google told me to install Docker first. :(

So than I changed to my Synology. I am running Domoticz and Mosquitto and have already running two containers (Node-Red and InfluxDB) in Docker. So I prefer docker on the Syno. I searched for the term zwavejs2mqtt and got 14 items/hits. But none of Moroen about zwavejs2mqtt. I found out he has made serveral other images.

And now my question to moroen: Is it an option to make an image for docker in the Syno-community? :?: