zwavejs2mqtt

For Z-Wave related questions in Domoticz

Moderator: leecollings

Post Reply
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

The webgui displays the devices it gets from the zwave hardware (your RaZberry controller?).

If you configure the webgui, as per the github plugin page, to connect to the mosquitto broker (use the correct IP address or system name, not localhost since localhost is inside the container and the mosquitto broker is running OUTSIDE the container) then any subscriber can interface with it.

That's what the plugin does: it interfaces to zwavejs2mqtt through the mosquitto broker. If domoticz is running on the same system as the mosquitto broker then you can indeed use localhost. If you were to run domoticz in a docker container (as some do) then you CANNOT use localhost as localhos is, again, inside the container. I make it a practice to always use the machine name rather than assume localhost. That way, I can run anything anywhere without having to make any changes.

Zwavejs2mqtt, the mosquitto broker and domoticz can all run on different systems, and run containerised or not, without any issues.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

The Broker is the mosquitto/MQTT broker.
ZwaveJS2MQTT drops its data in MQTT and The ZwaveJS2MQTT-plugin picks it up again from the MQTT broker.
Have you set up a MQTT broker?
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

I'm running Zigbee2MQTT on my Pi as well.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

Varazir wrote: Thursday 26 August 2021 16:16 I can see the devices in the webGUI
Korrekt me but that is the broker ?
What is your question?
Varazir wrote: Thursday 26 August 2021 16:16 So in the plugin settings I use localhost as adress ?
Localhost will not work, you have to use the ip-address of the pi. Something like: 192.168. .
As Heggink stated.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

AllesVanZelf wrote: Thursday 26 August 2021 17:39
Varazir wrote: Thursday 26 August 2021 16:16 I can see the devices in the webGUI
Korrekt me but that is the broker ?
What is your question?
Varazir wrote: Thursday 26 August 2021 16:16 So in the plugin settings I use localhost as adress ?
Localhost will not work, you have to use the ip-address of the pi. Something like: 192.168. .
As Heggink stated.
Question now is how do I get them into Domoticz as I can see the devices in docker installed "app"
I have Zigbee2MQTT running so I should have a MQTT broker running I guess.

I added the Pis IP adress into the plugin but I get this error

Code: Select all

2021-08-26 17:46:49.591 Status: zwavemqtt: (zwavemqtt) Stop directive received.
2021-08-26 17:46:49.592 Status: zwavemqtt: (zwavemqtt) Stopping threads.
2021-08-26 17:46:49.592 Status: zwavemqtt: (zwavemqtt) Exiting work loop.
2021-08-26 17:46:49.592 Status: zwavemqtt: (zwavemqtt) Stopping python interpreter.
2021-08-26 17:46:49.734 Status: zwavemqtt: (zwavemqtt) Stopped.
2021-08-26 17:46:49.735 Status: zwavemqtt: (zwavemqtt) Started.
2021-08-26 17:46:49.735 Status: zwavemqtt: (zwavemqtt) Entering work loop.
2021-08-26 17:46:50.067 Error: zwavemqtt: (ZWave-MQTT) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/ZWave-MQTT/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) Module Import failed, exception: 'ModuleNotFoundError'
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) Module Import failed: ' Name: yaml'
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) Error Line details not available.
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) Exception traceback:
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) ----> Line 58 in '/home/pi/domoticz/plugins/ZWave-MQTT/plugin.py', function <module>
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) ----> Line 6 in '/home/pi/domoticz/plugins/ZWave-MQTT/api/devices.py', function <module>
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) ----> Line 5 in '/home/pi/domoticz/plugins/ZWave-MQTT/api/device_types.py', function <module>
2021-08-26 17:46:50.067 Error: zwavemqtt: (zwavemqtt) ----> Line 1 in '/home/pi/domoticz/plugins/ZWave-MQTT/api/config.py', function <module>
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: zwavejs2mqtt

Post by AllesVanZelf »

Did you add the MQTT broker settings in the settings page in ZwaveJS2MQTT webpage?

Did you install the requirements?

Code: Select all

Module Import failed, exception: 'ModuleNotFoundError'
Last edited by AllesVanZelf on Thursday 26 August 2021 17:55, edited 1 time in total.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

Unless you installed the mqtt broker, it's not installed by default. If you, like me, also run zigbee2mqtt, then it's installed indeed.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

AllesVanZelf wrote: Thursday 26 August 2021 17:52 Did you add the MQTT broker settings in the settings page in ZwaveJS2MQTT webpage?

Did you install the requirements?

Code: Select all

Module Import failed, exception: 'ModuleNotFoundError'
I ran the pip3 install -r requirements.txt command

Did it again

Code: Select all

pi@zwave2:~/domoticz/plugins/ZWave-MQTT $ pip3 install -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: PyYAML==5.4.1 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (5.4.1)
pi@zwave2:~/domoticz/plugins/ZWave-MQTT $
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

I added to the plugin.py file: import yaml
Now it starts but I see this in the log

Code: Select all

2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Stop directive received.
2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Stopping threads.
2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Exiting work loop.
2021-08-26 18:05:21.914 Status: zwavemqtt: (zwavemqtt) Stopping python interpreter.
2021-08-26 18:05:22.085 Status: zwavemqtt: (zwavemqtt) Stopped.
2021-08-26 18:05:26.015 zwavemqtt hardware started.
2021-08-26 18:05:26.015 Status: zwavemqtt: (zwavemqtt) Entering work loop.
2021-08-26 18:05:26.015 Status: zwavemqtt: (zwavemqtt) Started.
2021-08-26 18:05:26.653 Status: zwavemqtt: (zwavemqtt) Initialized version 0.0.1, author 'moroen / heggink'
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.451 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.451 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.451 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.452 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.452 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.452 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.453 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.453 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.453 zwavemqtt: (zwavemqtt) Command Class None with type None i
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

Varazir wrote: Thursday 26 August 2021 18:06 I added to the plugin.py file: import yaml
Now it starts but I see this in the log

Code: Select all

2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Stop directive received.
2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Stopping threads.
2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Exiting work loop.
2021-08-26 18:05:21.914 Status: zwavemqtt: (zwavemqtt) Stopping python interpreter.
2021-08-26 18:05:22.085 Status: zwavemqtt: (zwavemqtt) Stopped.
2021-08-26 18:05:26.015 zwavemqtt hardware started.
2021-08-26 18:05:26.015 Status: zwavemqtt: (zwavemqtt) Entering work loop.
2021-08-26 18:05:26.015 Status: zwavemqtt: (zwavemqtt) Started.
2021-08-26 18:05:26.653 Status: zwavemqtt: (zwavemqtt) Initialized version 0.0.1, author 'moroen / heggink'
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.451 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.451 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.451 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.452 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.452 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.452 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.453 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.453 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:05:27.453 zwavemqtt: (zwavemqtt) Command Class None with type None i
That seems to indicate that it's running. You can ignore the command class none messages. These are not errors.
You should have devices that you can now add. They should be in setup->devices.
Did you name all your devices in the zwavejs2mqtt web interface up front? Otherwise, you will get very cryptic names and need to then match these with the web interface to understand what they are.
Also, you can easily switch on full debugging and then you will see all the messages coming from the mqtt broker!

Herman
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

heggink wrote: Thursday 26 August 2021 18:31
Varazir wrote: Thursday 26 August 2021 18:06 I added to the plugin.py file: import yaml
Now it starts but I see this in the log

Code: Select all

2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Stop directive received.
2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Stopping threads.
2021-08-26 18:05:21.913 Status: zwavemqtt: (zwavemqtt) Exiting work loop.
2021-08-26 18:05:21.914 Status: zwavemqtt: (zwavemqtt) Stopping python interpreter.
2021-08-26 18:05:22.085 Status: zwavemqtt: (zwavemqtt) Stopped.
2021-08-26 18:05:26.015 zwavemqtt hardware started.
2021-08-26 18:05:26.015 Status: zwavemqtt: (zwavemqtt) Entering work loop.
2021-08-26 18:05:26.015 Status: zwavemqtt: (zwavemqtt) Started.
2021-08-26 18:05:26.653 Status: zwavemqtt: (zwavemqtt) Initialized version 0.0.1, author 'moroen / heggink'
2021-08-26 18:05:27.450 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
That seems to indicate that it's running. You can ignore the command class none messages. These are not errors.
You should have devices that you can now add. They should be in setup->devices.
Did you name all your devices in the zwavejs2mqtt web interface up front? Otherwise, you will get very cryptic names and need to then match these with the web interface to understand what they are.
Also, you can easily switch on full debugging and then you will see all the messages coming from the mqtt broker!

Herman
Enabled more debuglogging and I get this

Code: Select all

2021-08-26 18:50:08.691 Status: zwavemqtt: (zwavemqtt) Stopped.
2021-08-26 18:50:08.692 Status: zwavemqtt: (zwavemqtt) Started.
2021-08-26 18:50:08.691 Status: zwavemqtt: (zwavemqtt) Entering work loop.
2021-08-26 18:50:08.651 Error: (FindModule) Domoticz/DomoticzEx modules not found in interpreter.
2021-08-26 18:50:09.299 Status: zwavemqtt: (zwavemqtt) Initialized version 0.0.1, author 'moroen / heggink'

Code: Select all

2021-08-26 18:50:10.197 zwavemqtt: (zwavemqtt) zwave/nodeID_6/50/4/value/66049
2021-08-26 18:50:10.197 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/nodeID_6/50/4/value/66049
2021-08-26 18:50:10.197 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:50:10.197 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) zwave/nodeID_6/50/5/value/66049
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/nodeID_6/50/5/value/66049
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) zwave/nodeID_6/50/6/value/66049
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/nodeID_6/50/6/value/66049
2021-08-26 18:50:10.198 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) zwave/nodeID_7/50/0/value/66049
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/nodeID_7/50/0/value/66049
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) zwave/nodeID_8/50/0/value/66049
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/nodeID_8/50/0/value/66049
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:50:10.199 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:50:10.200 zwavemqtt: (zwavemqtt) zwave/nodeID_9/50/0/value/66049
2021-08-26 18:50:10.200 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/nodeID_9/50/0/value/66049
2021-08-26 18:50:10.200 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:50:10.200 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:50:10.200 zwavemqtt: (zwavemqtt) zwave/nodeID_4/50/0/value/66561
And

Code: Select all

2021-08-26 18:51:48.096 zwavemqtt: (zwavemqtt) onHeartbeat called
2021-08-26 18:51:55.817 zwavemqtt: (zwavemqtt) Received 76 bytes of data
2021-08-26 18:51:55.817 zwavemqtt: (zwavemqtt) 30 4a 00 28 7a 77 61 76 65 2f 52 75 6c 6c 67 61 72 64 69 6e 0J.(zwave/Rullgardin
2021-08-26 18:51:55.817 zwavemqtt: (zwavemqtt) 5f 53 6f 76 72 75 6d 2f 35 30 2f 30 2f 76 61 6c 75 65 2f 36 _Sovrum/50/0/value/6
2021-08-26 18:51:55.817 zwavemqtt: (zwavemqtt) 36 30 34 39 7b 22 74 69 6d 65 22 3a 31 36 32 39 39 39 36 37 6049{"time":16299967
2021-08-26 18:51:55.817 zwavemqtt: (zwavemqtt) 31 35 37 36 38 2c 22 76 61 6c 75 65 22 3a 30 7d .. .. .. .. 15768,"value":0}
2021-08-26 18:51:55.818 zwavemqtt: (zwavemqtt) onMessage called: Verb: PUBLISH
2021-08-26 18:51:55.818 zwavemqtt: (zwavemqtt) zwave/Rullgardin_Sovrum/50/0/value/66049
2021-08-26 18:51:55.819 zwavemqtt: (zwavemqtt) Unparsable topic received: zwave/Rullgardin_Sovrum/50/0/value/66049
2021-08-26 18:51:55.819 zwavemqtt: (zwavemqtt) Command Class None with type None is unknown
2021-08-26 18:51:58.081 zwavemqtt: (zwavemqtt) onHeartbeat called
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

It looks like you may not have followed all instructions on the github page. Especially with respect to the configuration of zwavejs2mqtt, you need to follow those precisely as, otherwise, zwavejs will send messages in the wrong format! Messages like nodeID_6 look unfamiliar to me but it's been a while since I las saw them in debug.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

heggink wrote: Thursday 26 August 2021 18:59 It looks like you may not have followed all instructions on the github page. Especially with respect to the configuration of zwavejs2mqtt, you need to follow those precisely as, otherwise, zwavejs will send messages in the wrong format! Messages like nodeID_6 look unfamiliar to me but it's been a while since I las saw them in debug.
hehe ops. you was right.
All is up and running now. just need to fixa devices so they get the correct name and so on.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
hestia
Posts: 357
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: zwavejs2mqtt

Post by hestia »

heggink wrote: Wednesday 25 August 2021 18:54 Outside of that, things working OK?
So far, I've made some testing with some switches, a sensor (temp, movement, lux): I've on/off , dimmer , temp and lux.
With some difference with OZW:
* the icon for the movement sensor could not be changed
* an "on/off" switch on a dimmer node (FIBARO FGD212) show 99% when on instead of On with OZW
I'm going to finish the rename and the classification in order to perform more testing.
I need also to understand more the Zwave To MQTT Control Panel to manage the network. At the present time, I have some issues and don't know how to do
Screenshot 2021-08-26 231823.png
Screenshot 2021-08-26 231823.png (148.6 KiB) Viewed 1661 times
lost
Posts: 617
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by lost »

solarboy wrote: Tuesday 24 August 2021 16:52
lost wrote: Tuesday 24 August 2021 15:32I really hope someone will take the missing lead for OZW, or maybe Silabs will provide something as free software & easier to merge for free projects like Domoticz than existing Z-IP stack.
I wonder how likely that is.
Looks it's on the way... From Dr-Zwave blog:

"Silicon Labs has Z/IP Gateway and we will be announcing some new choices later this year as a supported interface layer for DIY platforms. Since the Z-Wave specification is now openly available via the Z-Wave Alliance it is much easier to properly design and execute a quality interface."
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

Found a issue,

Domoticz/plugin don't report the kWh value.

Image


Image
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
IanDury
Posts: 47
Joined: Wednesday 08 April 2015 15:22
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by IanDury »

Can you remove the semi-colon on the line "sValue: ;value" in the file device_types.yml and restart domoticz?
Or try: sValue: value;

Code: Select all

/50/:
  value/65537:
    Enabled: true
    Primary_device: true
    Type: kWh
    factor: 1000
    nValue: 0
    sValue: ;value
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: zwavejs2mqtt

Post by Varazir »

IanDury wrote: Friday 27 August 2021 16:27 Can you remove the semi-colon on the line "sValue: ;value" in the file device_types.yml and restart domoticz?
Or try: sValue: value;

Code: Select all

/50/:
  value/65537:
    Enabled: true
    Primary_device: true
    Type: kWh
    factor: 1000
    nValue: 0
    sValue: ;value
I guess it was for me now I seeing this on

Image
Image
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
hestia
Posts: 357
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: zwavejs2mqtt

Post by hestia »

heggink wrote: Wednesday 25 August 2021 18:54 In terms of removing the plugin name from the device name, please file that separately as an enhancement and we'll look into that as well.
I've written a python script to rename the devices, based on the names in zwavejs2mqtt + some rules (that could be changed in the script)
I'm not a coder and it's my 2nd python script, so perhaps not perfect.
Anyway I've renamed all the devices and I have less to do manually
Screenshot 2021-08-29 122618.png
Screenshot 2021-08-29 122618.png (191.97 KiB) Viewed 1566 times

Code: Select all

#!/usr/bin/python
# -*- coding: ISO-8859-1 -*-
# rename devicesd with hardware info

import sys
import requests
from requests.auth import HTTPBasicAuth
import json


#~~~~~~~~~~ Parameters Domoticz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
domoticz_ip='hestiatest' #IP or DNS
domoticz_port='8080'
user=''
password=''
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Input
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NODES = {
  "11": {
    "name": "Portail"
  },
  "17": {
    "name": "Terrasse"
  },
  "30": {
    "name": "Prise HKZW"
  },
  "47": {
    "name": "Chauffe-eau Studio"
  },
  "53": {
    "name": "Radiateur Salon Studio"
  },
  "54": {
    "name": "Détecteur Salon"
  },
  "55": {
    "name": "Détecteur Couloir"
  },
  "59": {
    "name": "Allée"
  },
  "61": {
    "name": "Haut escalier"
  },
  "62": {
    "name": "Escalier Studio"
  },
  "72": {
    "name": "Détecteur Fumées Couloir"
  },
  "76": {
    "name": "Dégagement"
  },
  "78": {
    "name": "Entrée"
  },
  "80": {
    "name": "Détecteur Portail"
  },
  "87": {
    "name": "Balcon Studio"
  },
  "94": {
    "name": "SdB Studio"
  },
  "95": {
    "name": "LED Terrasse"
  },
  "99": {
    "name": "Détecteur Portillon"
  },
  "102": {
    "name": "Portillon"
  },
  "104": {
    "name": "VMC Studio"
  },
  "106": {
    "name": "Garage"
  },
  "107": {
    "name": "s/Balcon"
  },
  "108": {
    "name": "Atelier Cave"
  },
  "111": {
    "name": "Couloir"
  },
  "113": {
    "name": "Escalier Cave"
  },
  "119": {
    "name": "LED s/ Balcon"
  },
  "120": {
    "name": "Radiateur SdB Studio"
  },
  "121": {
    "name": "Détecteur Allée"
  },
  "122": {
    "name": "Sonnette"
  },
  "123": {
    "name": "Prise NEO1",
    "loc": ""
  },
  "124": {
    "name": "Prise NEO2"
  },
  "126": {
    "name": "Détecteur Terrasse"
  },
  "127": {
    "name": "Détecteur Cave"
  },
  "128": {
    "name": "Détecteur Studio"
  },
  "130": {
    "name": "Cave Vin"
  },
  "131": {
    "name": "Salon Studio"
  }
}


DEVICES = (
1915,
1917,
1918,
1919,
1920,
1921,
1922,
1923,
1924,
1925,
1926,
1927,
1928,
1929,
1930,
1931,
1932,
1933,
1934,
1935,
1936,
1937,
1938,
1939,
1940,
1941,
1942,
1943,
1944,
1945,
1946,
1947,
1948,
1949,
1950,
1951,
1952,
1953,
1954,
1955,
1956,
1957,
1958,
1959,
1960,
1961,
1962,
1963,
1964,
1965,
1966,
1967,
1968,
1969,
1970,
1971,
1972,
1973,
1974,
1975,
1976,
1977,
1978,
1979,
1980,
1981,
1982,
1983,
1984,
1985,
1986,
1987,
1988,
1989,
1990,
1991,
1992,
1993,
1994,
1995,
1996,
1997,
1998,
1999,
2000,
2001,
2002,
2003,
2004,
2005,
2006,
2007,
2008,
2009,
2010,
2011,
2012,
2013,
2014,
2015,
2016,
2017,
2018,
2019,
2020,
2021,
2022,
2023,
2024,
2025,
2026,
2027,
2028,
2029,
2030,
2031,
2032,
2033,
2034,
2035,
2036,
2037,
2038,
2039,
2040,
2041,
2042,
2043,
2044,
2045,
2046,
2047,
2048,
2049,
2050,
2051,
2052,
2053,
2054,
2055,
2056,
2057,
2058,
2059,
2060,
2061,
2062
)

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Functions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

### rename the device
def rename_device(idx, name):
    #print "rename_device idx: " +idx+ " name: "  +name
    req='http://'+domoticz_ip+':'+domoticz_port+'/json.htm?type=command&param=renamedevice&idx='+idx+'&name='+name
    print req
    requests.get(req,auth=HTTPBasicAuth(user,password)) 
###

### get attribute value from a device
def get_device_attrib(idx, attrib):
    r = requests.get('http://'+domoticz_ip+':'+domoticz_port+'/json.htm?type=devices&rid='+str(idx),auth=HTTPBasicAuth(user,password))
    status=r.status_code
    if status == 200:
        r=r.json()
        result={}
        attrib_val =r['result'][0][attrib]
        #print "get_device_attrib "+attrib+" IDX: "+str(idx)
        #print attrib_val
        return attrib_val
    else:
        print "get_device_attrib " +attrib+" IDX:"+str(idx)+" not found ?"
###


#-----------------------------------### MAIN ###--------------------------------------------#


for Dz_IDX in DEVICES:
	print " "
	#print Dz_IDX

	Dz_Name=get_device_attrib(str(Dz_IDX), "Name")
	#print "Dz_Name: "+str(Dz_IDX)+" "+Dz_Name

	Dz_HardwareName=get_device_attrib(str(Dz_IDX), "HardwareName")
	#print Dz_HardwareName

	Dz_ID=get_device_attrib(str(Dz_IDX), "ID")
	#print Dz_ID
	ZW_ID=Dz_ID[1:4]
	#print ZW_ID
	tempID=ZW_ID[-1]
	#print tempID
	if tempID == '/':
		#print 'slash'
		ZW_ID=ZW_ID[0:2]
		#print ZW_ID
	#print "ZW_ID: "+ZW_ID
	
	ZW_MS=Dz_ID[-20:]
	#print ZW_MS

	Dz_Unit=get_device_attrib(str(Dz_IDX), "Unit") # to have unique device name
	#print Dz_Unit

	Dz_Type=get_device_attrib(str(Dz_IDX), "Type")
	#print Dz_Type

	Dz_SubType=get_device_attrib(str(Dz_IDX), "SubType")
	#print Dz_SubType

	Dz_Used=get_device_attrib(str(Dz_IDX), "Used")
	#print "Dz_Used: "+str(Dz_Used)
	
	ZW_Name=NODES[ZW_ID]['name']
	#print ZW_Name
	
	New_Name = "!"
	Name_Add = '?'
	if Dz_Type == 'Light/Switch':
		New_Name = ZW_Name+" "+str(Dz_Unit)
	else:
		if Dz_Type == 'Temp':
			Name_Add = 'Temp'
		elif Dz_Type == 'Usage' and Dz_SubType == 'Electric':
			Name_Add = 'W'
		else:
			Name_Add = str(Dz_SubType)
		
		New_Name = ZW_Name+" "+Name_Add+" "+str(Dz_Unit)
	print str(Dz_IDX)+" "+Dz_Name
	print "=> "+New_Name
	
	rename_device(str(Dz_IDX), New_Name)
the NODES is the extract of zwavejs2mqtt
the DEVICES is the list of the devices to rename
When I use a device, I remove the number (unit) at the end of the name and eventually add something; easier for me to change the end than the beginning
hestia
Posts: 357
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: zwavejs2mqtt

Post by hestia »

I've 2 issues with FIBARO FGRGBWM441 RGBW Controller
1/ there is no longer a device to change the color
Screenshot 2021-08-29 124643.png
Screenshot 2021-08-29 124643.png (101.78 KiB) Viewed 1563 times
2/ with OZW in dz, I have a script to launch a LED animation based on the "zwave hardware" and there is no longer an hardware inside dz

Code: Select all

http://localhost:8080/json.htm?type=command&param=applyzwavenodeconfig&idx=10&valuelist=72_Ng%3D%3D
Is Domoticz able to activate RGBW animation programs?
Perhaps it is possible to do it directly on zwavejs2mqtt? How?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest