Vibration sensor dzvents (zigbee2mqtt) [Solved]
Moderator: leecollings
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Vibration sensor dzvents (zigbee2mqtt)
Dear friends,
I am trying to make a dzevents script with a xiaomi vibration sensor with zigbee2mqtt. In the domoticz i can see te following info:
'strenght' : 77 , 'action' : vibration ,,angle_x_absolute' :165 and more values,
How i can use this values in a dzvents script? I test:
If dz.devices('mysensor').state == 'vibration' then
If dz.devices('mysensor').value == 'vibration' then
If dz.devices('mysensor').level == 'vibration' then
If dz.devices('mysensor').actice == 'vibration' then
Any commands works with my sensor. I need also use 'strenght' value for close my awinds but i don't know the command. I have test:
If dz.devices('mysensor').strenght >= 150 then
I have readed the dzvents wiki but no appears any info about this sensor. My domoticz and the zigbee2mqtt only detects 1 device ( vibration sensor ).
Would it be needed that domoticz detect more devices strenght, vibration,tilt.... ) i don't know more. Any idea?
If is not possible currently use a vibration or strenght value, Could you please add this feature for zigbee2mqtt in the following updates?
Thanks in advanced
I am trying to make a dzevents script with a xiaomi vibration sensor with zigbee2mqtt. In the domoticz i can see te following info:
'strenght' : 77 , 'action' : vibration ,,angle_x_absolute' :165 and more values,
How i can use this values in a dzvents script? I test:
If dz.devices('mysensor').state == 'vibration' then
If dz.devices('mysensor').value == 'vibration' then
If dz.devices('mysensor').level == 'vibration' then
If dz.devices('mysensor').actice == 'vibration' then
Any commands works with my sensor. I need also use 'strenght' value for close my awinds but i don't know the command. I have test:
If dz.devices('mysensor').strenght >= 150 then
I have readed the dzvents wiki but no appears any info about this sensor. My domoticz and the zigbee2mqtt only detects 1 device ( vibration sensor ).
Would it be needed that domoticz detect more devices strenght, vibration,tilt.... ) i don't know more. Any idea?
If is not possible currently use a vibration or strenght value, Could you please add this feature for zigbee2mqtt in the following updates?
Thanks in advanced
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Can you please addkitopopo wrote: Sunday 03 May 2020 17:55 I am trying to make a dzevents script with a xiaomi vibration sensor with zigbee2mqtt. In the domoticz i can see te following info:
How i can use this values in a dzvents script? I test:
If is not possible currently use a vibration or strenght value, Could you please add this feature for zigbee2mqtt in the following updates?
Code: Select all
domoticz.devices('vibration sensor name').dump()
That might help in identifying how a dzVents script could work for this type of device.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Dear friend,
The problem is related with my old post about vibration sensor , viewtopic.php?f=6&t=31134
I have managed to configure the a notification for the vibration sensor using domoticz.devices('myvibrationsensor'). state == 'Vibration' , the notification works correctly, but as I commented in my previous post to which no one responded, when a vibration occurs physical vibration sensor the notification does not arrive, it is only shown in the general log of domoticz.
2020-05-03 23:48:44.171 (zigbe2mqtt) MQTT message: zigbee2mqtt/0x00158d0002a51c0a {'battery': 100, 'voltage': 3025, 'linkquality': 115, 'angle': 5, 'angle_x': 9, 'angle_y': -68, 'angle_z': 20, 'angle_x_absolute': 81, 'angle_y_absolute': 158, 'strength': 24}
The vibration is not registered in the individual registry of domoticz. I only get the notification to work by pressing the vibration sensor on domoticz by selecting vibration, this notification if it is marked as admin within the individual domoticz record:
2020-05-03 23:45:06 Vibration Admin
2020-05-03 23:45:02 Off Admin
2020-05-03 23:44:18 Vibration Admin
2020-05-03 23:44:03 Off Admin
A physical vibration not is recorded in the individual log, i have 20 devices zigbe2mqtt and this device only have individual log problem, The log works correctly in other sensors, I have tried everything, empty cache and cockies of browser, unpair and re-pair ... etc but the problem persist.
as you commented in your previous answer this is the result of --> domoticz.devices('vibration sensor name').dump() . with this information i can see thet this sensor is a selector switch, i can not see the strenght value.
I've been asking to include the value of strenght for almost 1 year (https://github.com/domoticz/domoticz/issues/3300). @gizmocuz answered to the request.
I'm not sure if this post should move to the bugs and problems section.
Thanks in advance and for your work, receive a coridal greeting
The problem is related with my old post about vibration sensor , viewtopic.php?f=6&t=31134
I have managed to configure the a notification for the vibration sensor using domoticz.devices('myvibrationsensor'). state == 'Vibration' , the notification works correctly, but as I commented in my previous post to which no one responded, when a vibration occurs physical vibration sensor the notification does not arrive, it is only shown in the general log of domoticz.
2020-05-03 23:48:44.171 (zigbe2mqtt) MQTT message: zigbee2mqtt/0x00158d0002a51c0a {'battery': 100, 'voltage': 3025, 'linkquality': 115, 'angle': 5, 'angle_x': 9, 'angle_y': -68, 'angle_z': 20, 'angle_x_absolute': 81, 'angle_y_absolute': 158, 'strength': 24}
The vibration is not registered in the individual registry of domoticz. I only get the notification to work by pressing the vibration sensor on domoticz by selecting vibration, this notification if it is marked as admin within the individual domoticz record:
2020-05-03 23:45:06 Vibration Admin
2020-05-03 23:45:02 Off Admin
2020-05-03 23:44:18 Vibration Admin
2020-05-03 23:44:03 Off Admin
A physical vibration not is recorded in the individual log, i have 20 devices zigbe2mqtt and this device only have individual log problem, The log works correctly in other sensors, I have tried everything, empty cache and cockies of browser, unpair and re-pair ... etc but the problem persist.
as you commented in your previous answer this is the result of --> domoticz.devices('vibration sensor name').dump() . with this information i can see thet this sensor is a selector switch, i can not see the strenght value.
- Spoiler: show
I've been asking to include the value of strenght for almost 1 year (https://github.com/domoticz/domoticz/issues/3300). @gizmocuz answered to the request.
I'm not sure if this post should move to the bugs and problems section.
Thanks in advance and for your work, receive a coridal greeting
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Quite a long story already but from what I understand the situation is that when using the zigate plugin it all works and when using zigbee2mqtt or the native Xiaomi hardware module you do not see the strength of the vibration.kitopopo wrote: Monday 04 May 2020 0:36 The problem is related with my old post about vibration sensor , viewtopic.php?f=6&t=31134
Not quite clear for me from your post if the zigbee2mqtt does switch the selector to "Vibrate" and if so why the notification is not send.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Hello, thank you very much for your response and for your attention, summary:
I don't use zigate. A colleague commented that with zigate if you could see the strenght value, as he could ask @koenkk to include the strenght value in zigbee2mqtt, that was at the beginning. I summarize the problem in 5 steps:
- The main log from Domoticz detects correctly the vibration and the strenght value ( physical vibration detected from the sensor)
domoticz main.log
-the individual vibration sensor log does not record the physical vibrations caused by the vibration sensor, it only records the vibrations pressing the vibration selector of my switch in my sensor in domoticz (Vibration admin) --> red power button icon in domoticz vibration switch
vibration sensor.log
-due to these vibrations are only detected in the domoticz main log but not in the individual log of my sensor, my script not trigger with a physical vibration from the sensor. My script only triggers with a manually triggered vibration on the domoticz switch.
If dz.devices('mysensor').status == 'Vibration' then --> send a notification --> works only with a forced vibration (manual vibration from domoticz switch)
- If my script does not trigger with a simple physical vibration coming from the sensor, due to the individual vibration sensor log does not detect any value vibrations, i think that my script will not trigger with the strenght value either, anyway I don't know how to use the strenght value in my script, that's why I wrote you the dump () values in my previous answer:
If dz.devices('mysensor').strenght >= 150 --> then close my awings ( I don't know what would be the correct command that would work with my sensor, but if this command were the correct command it would never work because the log of my vibration sensor does not record data, they only appear in the main log of domoticz.
I hope it is understood, it is quite difficult to explain, thanks for your attention again, kind regards
I don't use zigate. A colleague commented that with zigate if you could see the strenght value, as he could ask @koenkk to include the strenght value in zigbee2mqtt, that was at the beginning. I summarize the problem in 5 steps:
- The main log from Domoticz detects correctly the vibration and the strenght value ( physical vibration detected from the sensor)
domoticz main.log
Code: Select all
2020-05-03 23:48:44.171 (zigbe2mqtt) MQTT message: zigbee2mqtt/0x00158d0002a51c0a {'battery': 100, 'voltage': 3025, 'linkquality': 115, 'angle': 5, 'angle_x': 9, 'angle_y': -68, 'angle_z': 20, 'angle_x_absolute': 81, 'angle_y_absolute': 158, 'strength': 24}vibration sensor.log
Code: Select all
2020-05-03 23:45:06 Vibration Admin
2020-05-03 23:45:02 Off Admin
2020-05-03 23:44:18 Vibration Admin
2020-05-03 23:44:03 Off AdminIf dz.devices('mysensor').status == 'Vibration' then --> send a notification --> works only with a forced vibration (manual vibration from domoticz switch)
- If my script does not trigger with a simple physical vibration coming from the sensor, due to the individual vibration sensor log does not detect any value vibrations, i think that my script will not trigger with the strenght value either, anyway I don't know how to use the strenght value in my script, that's why I wrote you the dump () values in my previous answer:
If dz.devices('mysensor').strenght >= 150 --> then close my awings ( I don't know what would be the correct command that would work with my sensor, but if this command were the correct command it would never work because the log of my vibration sensor does not record data, they only appear in the main log of domoticz.
I hope it is understood, it is quite difficult to explain, thanks for your attention again, kind regards
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Sorry but that does not answer my question: "Does zigbee2mqtt switch the selector to "Vibrate" ?kitopopo wrote: Monday 04 May 2020 12:42 I hope it is understood, it is quite difficult to explain, thanks for your attention again, kind regards
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Sorry, I hadn't read your question.
The answer is today yes but not yesterday night.
I put the vibration switch off, I move the awning and the switch goes into vibration mode. Now if you have registered in the individual log and the notification has arrived.
It seems that when the first vibration occurs the switch kept vibrating and then it no longer detects any more vibrations, should it go back to off so that it continues to detect more vibrations? maybe I can do this using scripts
Now I just need to know how I can use the strenght value in my script. what could be the correct command of the strenght value?
If dz.devices('mysensor').strenght >= 150
something similar to this?
Thank you for your attention
The answer is today yes but not yesterday night.
I put the vibration switch off, I move the awning and the switch goes into vibration mode. Now if you have registered in the individual log and the notification has arrived.
It seems that when the first vibration occurs the switch kept vibrating and then it no longer detects any more vibrations, should it go back to off so that it continues to detect more vibrations? maybe I can do this using scripts
Now I just need to know how I can use the strenght value in my script. what could be the correct command of the strenght value?
If dz.devices('mysensor').strenght >= 150
something similar to this?
Thank you for your attention
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
The notification will only be send when the selector device switches to "Vibrate".kitopopo wrote: Monday 04 May 2020 13:06 It seems that when the first vibration occurs the switch kept vibrating and then it no longer detects any more vibrations.
So yes a script that will set the selector back to Off is necessary. You might as well do the notification task in the script as well.
From what I see in the dump() and by what you describe the strength value is not send to any domoticz device or variable. dzVents can only do something with a strength value when it knows where to find it.Now I just need to know how I can use the strength value in my script. what could be the correct command of the strength value?
What component (hardware / software) sets the selector switch to "Vibrate"?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Again, thank you very much,
I have already made a script and the vibration switch now correctly goes to Off. Perfect.
The vibration sensor vibrates and zigbee2mqtt detects this vibration in the log:
The usb zigbe2mqtt (cc2531) itself sends the information to domoticz. Domoticz generates 3 devices:
Zigbee2mqtt cc2531 detects the vibration and send this info to domoticz and the vibration switch set to vibration mode.
A Mr@koenkk (zigbee2mqtt developer) to which I am very grateful it took work to implement this value, since it was hidden within the information that it sent, and it was under another name. in the end he managed to replace the error in the name
Maybe we need add in domoticz a fourth device with the streengt value name?
It should not be difficult if the value strenght appears in the main log the domoticz
It would be very interesting to use it to close the awnings since this value goes from 0 to 999 and measures the wind force very well at a very affordable price. I and many other domoticz users of the telegram group would be very grateful for this implementation.
Thanks in advanced.
I have already made a script and the vibration switch now correctly goes to Off. Perfect.
The vibration sensor vibrates and zigbee2mqtt detects this vibration in the log:
Code: Select all
may 04 13:30:02 raspberrypi npm[426]: zigbee2mqtt:info 2020-05-04 13:30:02: MQTT publish: topic 'zigbee2mqtt/0x00158xxxxxxxxxxxx', payload '{"battery":100,"voltage":3025,"linkquality":115,"angle":5,"angle_x":9,"angle_y":-68,"angle_z":20,"angle_x_absolute":81,"angle_y_absolute":158,"strength":20}'Code: Select all
4xx zigbe2mqtt 0x00158d000xxxxx_signal 54 zigbe2mqtt - 0x00158d000xxxxx (Link Quality) General Custom Sensor 115
4xx zigbe2mqtt 0x00158d000xxxxx_cell 60 zigbe2mqtt - 0x00158d000xxxxx (Battery Voltage) General Voltage 3.025 V
4xx zigbe2mqtt 0x00158d000xxxxx_action 64 sensor vibra Light/Switch Selector Switch OffA Mr@koenkk (zigbee2mqtt developer) to which I am very grateful it took work to implement this value, since it was hidden within the information that it sent, and it was under another name. in the end he managed to replace the error in the name
Maybe we need add in domoticz a fourth device with the streengt value name?
It should not be difficult if the value strenght appears in the main log the domoticz
Code: Select all
2020-05-04 13:49:39.335 (zigbe2mqtt) MQTT message: zigbee2mqtt/0x00158d0002a51c0a {'battery': 100, 'voltage': 3025, 'linkquality': 113, 'angle': 5, 'angle_x': 9, 'angle_y': -68, 'angle_z': 20, 'angle_x_absolute': 81, 'angle_y_absolute': 158, 'strength': 9, 'action': 'vibration'}Thanks in advanced.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
The point is that domoticz only create these devices because it is instructed to do so by the zigbee2mqtt module. So if you want a 4th device to be created the zigbee2mqtt module must be updated to add that request.kitopopo wrote: Monday 04 May 2020 13:47 The usb zigbe2mqtt (cc2531) itself sends the information to domoticz. Domoticz generates 3 devices:
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
And due to the value of strenght appears in the domoticz log, is there no other way to use this value without the need to generate a fourth device? If there is no other solution then I will contact @koenkk.
Thank you
Thank you
Re: Vibration sensor dzvents (zigbee2mqtt)
I added a flow in Nodered. This way you can get the data into Domoticz in a Custom sensor.
I made a request in https://github.com/stas-demydiuk/domoti ... gin/issues to support at minimum the 'strength'
I made a request in https://github.com/stas-demydiuk/domoti ... gin/issues to support at minimum the 'strength'
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
other options:kitopopo wrote: Monday 04 May 2020 14:05 And due to the value of strenght appears in the domoticz log, is there no other way to use this value without the need to generate a fourth device? If there is no other solution then I will contact @koenkk.
- extend the Selector device with more Vibrate levels (vibrate_low, vibrate_moderate, vibrate_strong, vibrate_extreme);
- send the strength value to a separate variable;
- send the strength value to the current signal device;
- send the strength value as customEvent and trigger a dzVents script with it;
- send the strength value to the description field of the selector device;
- use an external MQTT broker to intercept the MQTT and send additional data to domoticz;
- use a script to monitor the log file every xx seconds to see if a line with strength in it was logged.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Vibration sensor dzvents (zigbee2mqtt)
This is not really a BAD workaround, it is customizing my Domoticz.waaren wrote: Monday 04 May 2020 14:21In my book these are all bad workarounds for something that should be fixed using a new device
- use an external MQTT broker to intercept the MQTT and send additional data to domoticz;
I do it several times, for instance when a device generated Temp/Hum/Pressure (Xiaomi)
I do not want such a device, but just a Temp/Hum and a Barometer device.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
I agree and changed the wording in my postEddyG wrote: Monday 04 May 2020 14:35 This is not really a BAD workaround, it is customizing my Domoticz.![]()
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
Now i have the vibration sensor in the vibration_extreme and the sensor detects a vibration every 5 minutes aproxx, i need use the strenght value.
What would be the easiest solution on your list for a user who does not have much experience? customEvent or separate variable?
How i can send the strenght value to a separate variable? where i can found information?
Thanks again
What would be the easiest solution on your list for a user who does not have much experience? customEvent or separate variable?
How i can send the strenght value to a separate variable? where i can found information?
Thanks again
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt) [Solved]
These alternatives require an update of zigbee2MQTT so probably easier to ask directly for the creation of a device to receive the strength.kitopopo wrote: Monday 04 May 2020 14:53 What would be the easiest solution on your list for a user who does not have much experience? customEvent or separate variable?
- send the strength value to a separate variable;
- send the strength value to the current signal device;
- send the strength value as customEvent and trigger a dzVents script with it;
- send the strength value to the description field of the selector device;
- use an external MQTT broker to intercept the MQTT and send additional data to domoticz;
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
kitopopo
- Posts: 59
- Joined: Monday 03 December 2018 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Vibration sensor dzvents (zigbee2mqtt)
thanks, I will request this to @koenkk,
Thanks for your help.
Best regards
Thanks for your help.
Best regards
Who is online
Users browsing this forum: Google [Bot] and 1 guest