Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zwave flood sensor #1145

Closed
BornTKill opened this issue Feb 6, 2016 · 36 comments
Closed

zwave flood sensor #1145

BornTKill opened this issue Feb 6, 2016 · 36 comments

Comments

@BornTKill
Copy link

Hello!

I've just purchased Fibaro z-wave flood sensor. Flood alarm works well with domoticz but not with HA.
None of this entities states change during flood simulation :

sensor.fibaro_system_fgfs101_flood_sensor_alarm_level_X
sensor.fibaro_system_fgfs101_flood_sensor_alarm_type_X
sensor.fibaro_system_fgfs101_flood_sensor_sensor_X
sensor.fibaro_system_fgfs101_flood_sensor_temperature_X

Here is OZW_Log.txt when I simulate flood :

2016-02-06 11:21:19.136 Detail, Node010,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x0a, 0x07, 0x9c, 0x02, 0x0a, 0x05, 0xff, 0x00, 0x00, 0x95
2016-02-06 11:21:19.137 Detail, Node010, Initial read of value
2016-02-06 11:21:19.137 Info, Node010, Received alarm state report from node 10: **Flood = 255**
2016-02-06 11:21:19.155 Detail, Node010,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0a, 0x03, 0x20, 0x01, 0xff, 0x25
2016-02-06 11:21:19.171 Info, Node010, Received Basic set from node 10: level=255.  Sending event notification.
2016-02-06 11:21:34.404 Detail, Node010,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x0a, 0x07, 0x9c, 0x02, 0x0a, 0x05, 0x00, 0x00, 0x00, 0x6a
2016-02-06 11:21:34.404 Detail, Node010, Refreshed Value: old value=255, new value=0, type=uint8
2016-02-06 11:21:34.404 Detail, Node010, Changes to this value are not verified
2016-02-06 11:21:34.404 Info, Node010, Received alarm state report from node 10: **Flood = 0**
2016-02-06 11:21:34.423 Detail, Node010,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0a, 0x03, 0x20, 0x01, 0x00, 0xda
2016-02-06 11:21:34.423 Info, Node010, Received Basic set from node 10: level=0.  Sending event notification.

Thank you for you big help.

@pavoni
Copy link
Contributor

pavoni commented Feb 6, 2016

I also just set one of these up in HA. Very nice looking device. Afraid I use Vera - so can't help out on the issue I'm afraid.

@BornTKill
Copy link
Author

@pavoni : can you give me some advice in order to try debugging by myself ?

@pavoni
Copy link
Contributor

pavoni commented Feb 7, 2016

@BornTKill Integrating zwave devices into Vera (as long as they are supported) is just a matter of adding them to Vera and re-starting HA. I expected that I might have to change the HA vera code for the flood sensor - but turns out it just worked.

So afraid I can't do much to help (except to suggest that for the moment Vera seems like an easier way to integrate zwave devices that OpenZwave). Haven't been brave enough to try OZW yet.

@partofthething
Copy link
Contributor

That's interesting. I implemented a handler for the COMMAND_CLASS_ALARM a month ago in HA so I'm surprised it's not firing for you.

Can you see in your OZW_log what command class is being sent?

@BornTKill
Copy link
Author

@partofthething & @pavoni : Thank you for your answers.
@partofthething : I'm not sure to know how to find the command class but here is my log when i simulated flood :

--> Detect flood (sensor is placed on a sponge) :
2016-02-08 10:24:49.119 Detail, Node010, Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x0a, 0x07, 0x9c, 0x02, 0x0a, 0x05, 0xff, 0x00, 0x00, 0x95
2016-02-08 10:24:49.119 Detail,
2016-02-08 10:24:49.119 Detail, Node010, Refreshed Value: old value=0, new value=255, type=uint8
2016-02-08 10:24:49.119 Detail, Node010, Changes to this value are not verified
2016-02-08 10:24:49.119 Info, Node010, Received alarm state report from node 10: Flood = 255

--> Send Event Notification :
2016-02-08 10:24:49.137 Detail, Node010, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0a, 0x03, 0x20, 0x01, 0xff, 0x25
2016-02-08 10:24:49.137 Detail,
2016-02-08 10:24:49.153 Info, Node010, Received Basic set from node 10: level=255. Sending event notification.

--> Detect no flood (sensor is removed from the sponge)
2016-02-08 10:24:52.588 Detail, Node010, Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x0a, 0x07, 0x9c, 0x02, 0x0a, 0x05, 0x00, 0x00, 0x00, 0x6a
2016-02-08 10:24:52.588 Detail,
2016-02-08 10:24:52.588 Detail, Node010, Refreshed Value: old value=255, new value=0, type=uint8
2016-02-08 10:24:52.588 Detail, Node010, Changes to this value are not verified
2016-02-08 10:24:52.589 Info, Node010, Received alarm state report from node 10: Flood = 0

--> Send Event Notification :
2016-02-08 10:24:52.607 Detail, Node010, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x0a, 0x03, 0x20, 0x01, 0x00, 0xda
2016-02-08 10:24:52.607 Detail,
2016-02-08 10:24:52.607 Info, Node010, Received Basic set from node 10: level=0. Sending event notification.

--> Movement détection :
2016-02-08 10:24:52.636 Detail, Node010, Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x0a, 0x07, 0x9c, 0x02, 0x0a, 0x00, 0xff, 0x00, 0x00, 0x90
2016-02-08 10:24:52.636 Detail,
2016-02-08 10:24:52.636 Detail, Node010, Refreshed Value: old value=255, new value=255, type=uint8
2016-02-08 10:24:52.637 Detail, Node010, Changes to this value are not verified
2016-02-08 10:24:52.637 Info, Node010, Received alarm state report from node 10: General = 255
2016-02-08 10:24:52.656 Detail, Node010, Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x0a, 0x07, 0x9c, 0x02, 0x0a, 0x00, 0xff, 0x00, 0x00, 0x90
2016-02-08 10:24:52.656 Detail,
2016-02-08 10:24:52.656 Detail, Node010, Refreshed Value: old value=255, new value=255, type=uint8
2016-02-08 10:24:52.656 Detail, Node010, Changes to this value are not verified
2016-02-08 10:24:52.656 Info, Node010, Received alarm state report from node 10: General = 255

I hope it help.

@partofthething
Copy link
Contributor

Ok, interesting. With this log, and additionally with the config file for your device, it appears that the alarms are communicated using a COMMAND_CLASS_BASIC set command, which is not currently supported by HA. However, your device has a configurable option where you can tell it to either send COMMAND_CLASS_BASIC alerts, or to send COMMAND_CLASS_ALARM alerts, which HA does support.

Try to get into your z-wave configuration system and read configuration parameter number 5. The default is either 255 or -127, I'm not sure which and you probably have it set to that. If you set it to 0, then I'm pretty sure your device will send ALARMs and HA will register them.

EDIT: Though it's weird that your log is also showing alarm reports. I guess I'm not entirely sure what's going on.

@BornTKill
Copy link
Author

Hi!

Sorry for my late answer but i was quite busy :/
So I changed param #5 but it's still not working.

Any suggestions ?
I can arrange remote session to debug if needed.

@BornTKill
Copy link
Author

param #5 :

  1. Type of alarm frame sent to 1-st association group (FLOOD)
    Available settings:
    0 - ALARM WATER command frame
    255 - BASIC SET command frame
    Default setting: 255
    Parameter size: 1 [byte]
    The parameter determines a type of command frame sent by the Sensor in case flooding has been detected or cancelled.

@brianpanneton
Copy link

So I have an AEOTEC water sensor which defaults to the BASIC from what I can tell. I see the event notifications within the OZW_Log.txt:

2016-02-15 13:12:20.395 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x08, 0x02, 0x03, 0x20, 0x01, 0xff, 0x25
2016-02-15 13:12:20.395 Detail,
2016-02-15 13:12:20.395 Info, Node002, Received Basic set from node 2: level=255. Sending event notification.
2016-02-15 13:12:20.400 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x02, 0x03, 0x20, 0x01, 0xff, 0x2d
2016-02-15 13:12:20.400 Detail,
2016-02-15 13:12:20.400 Info, Node002, Received Basic set from node 2: level=255. Sending event notification.
2016-02-15 13:28:50.002 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x08, 0x02, 0x03, 0x20, 0x01, 0x00, 0xda
2016-02-15 13:28:50.002 Detail,
2016-02-15 13:28:50.002 Info, Node002, Received Basic set from node 2: level=0. Sending event notification.
2016-02-15 13:28:50.007 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x02, 0x03, 0x20, 0x01, 0x00, 0xd2
2016-02-15 13:28:50.007 Detail,
2016-02-15 13:28:50.007 Info, Node002, Received Basic set from node 2: level=0. Sending event notification.

From what I can tell the COMMAND_CLASS_BASIC would act identical to how COMMAND_CLASS_ALARM has been implemented. I was going to implement it but I'm guessing my assumption is wrong. Is there something I am missing?

I am very new to ZWave and HA so I'm sure I am missing something important and that is why it hasn't been added.

@partofthething
Copy link
Contributor

Well, in the spirit of testing, I implemented a handler for COMMAND_CLASS_BASIC in my zwave-basic branch over at my fork: https://github.com/partofthething/home-assistant/commits/zwave-basic. Try it out and see if you get anything registering.

One concern I have about this commit is that I think most devices send COMMAND_CLASS_BASIC signals in addition to their more meaningful commands so this kind of change might dirty up someone's list of devices.

Anyway, worth a try. Let me know.

@BornTKill
Copy link
Author

Thank you @partofthething !

So, I manually modify the 2 files from your fork https://github.com/partofthething/home-assistant/commits/zwave-basic (Added z-wave sensor for COMMAND_CLASS_BASIC devices
) into my HA installation.
But it still not OK with both BASIC_SET or ALARM_WATER param #5 value.

Do I miss something ?

@brianpanneton
Copy link

@partofthething Ah, you beat me to it! I was implementing the Aeotec Water Sensor in openzwave. I'll test it out soon.

@brianpanneton
Copy link

I tried the patch without success.

Perhaps I'm missing something, but I can't get it to update any of the badges. I see the change occur within the OZW log. I don't see any events occur within the HA log which is likely the issue with the badges not updating. I think I might have to just configure the device to use the Alarm or Binary. Perhaps it has something to do with my sensor being on a battery.

On a side note, I end up with 5 badges (value):
Aeon Labs Water Sensor Alarm Level (0)
Aeon Labs Water Sensor Alarm Type (0)
Aeon Labs Water Sensor Flood (0)
Aeon Labs Water Sensor Sensor (off)
Aeon Labs Water Sensor SourceNode (0)

Should I have a badge for each?

@partofthething
Copy link
Contributor

For testing it's nice that you have all of them (it'll be more likely to see one start working if we figure it out). In production, you can hide all the ones except for the one or two you actually care about.

You probably both aren't missing something... I guess the test just didn't work. I don't fully grok how the zwave signals get passed down to the components yet so I'm going to have to study it a bit more. But your logs clearly show COMMAND_CLASS_BASIC setting values to 255 and then 0.

2016-02-15 13:12:20.400 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x02, 0x03, 0x20, 0x01, 0xff, 0x2d

0x20 -- COMMAND_CLASS_BASIC
0x01 -- set
0xff -- 255

Sorry it didn't work.

@brianpanneton
Copy link

No worries. I'm trying to figure out an easy way to manage the nodes. I was originally going to write up a python script or use something like openzwave control panel. I figure if I can get it to work with alarm or binary then I can work on the basic.

@brianpanneton
Copy link

I finally got my nodes working. I have the AEOTEC Water Sensors. I sent the config param with the following to turn on Alarm, Binary, Basic and Battery.

(With python-openzwave)
network.nodes[2].set_config_param(121, 0x00001111, 4)

One issue I hit was that the config wouldn't update until I pressed the zwave button on the back. This was after I sent the config param.

Hopefully this helps anyone else with a similar issue. Now to finally get these integrated!

@robbiet480
Copy link
Member

For anyone still having issues with this, try finding the configuration entry in OpenZWave for your device and adding <CommandClass id="32" setasreport="true"/> which will map a BasicSet to the correct value(s).

@joemcmonagle
Copy link

@robbiet480 Thanks for adding to this. I have the AEOTEC Water sensor, but I'm not sure exactly where to add the line item. I'm editing /usr/local/share/python-openzwave/config/aeotec/watersensor.xml
It looks like http://hastebin.com/atasabovon.xml after I edited it. I commented out <CommandClass id="112">and replaced with <CommandClass id="32" setasreport="true">. Is that right?

@robbiet480
Copy link
Member

You shouldn't be replacing the CommandClass. Put my line above yours and I believe it will work @joemcmonagle

@joemcmonagle
Copy link

@robbiet480 Thanks for the quick response. I've now got http://hastebin.com/laxexopudu.xml
But still no luck. I've restarted the hass service. Is there anything I need to be restarting with python-openzwave after making a config update? Sorry, pretty late the zwave game

@robbiet480
Copy link
Member

@joemcmonagle May need to do <CommandClass id="112" setasreport="true"> but I'm not sure that will work. If it doesn't, then you may not be able to use setasreport with your Aeotec water sensors. The fix I posted should work for the original posters Fibaro sensors

@brianpanneton
Copy link

I had to send the device itself the command I posted above to change what
it reports.
On Apr 8, 2016 2:11 AM, "Robbie Trencheny" notifications@github.com wrote:

@joemcmonagle https://github.com/joemcmonagle May need to do but I'm not sure that will work. If it
doesn't, then you may not be able to use setasreport with your Aeotec water
sensors. The fix I posted should work for the original posters Fibaro
sensors


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1145 (comment)

@deisi
Copy link
Contributor

deisi commented Apr 9, 2016

I have a Everspring ST812 flood sensor. I see exactly the same as the others. The zwave config file is Here. In its default version it is without the <CommandClass id="32" setasreport="true"/> but addig it doesn't help. The sensor itself shows up in the HA web interface but never reports any state changes. Adding <CommandClass id="112" setasreport="true"> kills half my z-wave setup.

A flood event shows up as can be seen here in the OZW_log.txt

The important part of zwcfg_*.xml is here

I don't know how to follow @brianpanneton suggestion and set network.nodes[2].set_config_param(121, 0x00001111, 4) manually. I assumed I should use ozwsh but this seems not to be ready for python3 because it has python2 style print commands in it.

@partofthething
Copy link
Contributor

You use the python3 branch of the python-openzwave library that home-assistant is using to update configuration on devices over the radio. See, for example, the commands run under the Configuring heading here.

@snizzleorg
Copy link

I have the same problem, with the Fibaro Flood sensor.

2016-05-12 15:26:21.670 Detail, Node055,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x37, 0x07, 0x9c, 0x02, 0x37, 0x00, 0xff, 0x00, 0x00, 0x90
2016-05-12 15:26:21.670 Detail, 
2016-05-12 15:26:21.670 Info, Node055, ApplicationCommandHandler - Unhandled Command Class 0x9c
2016-05-12 15:26:21.685 Detail, Node055,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x37, 0x07, 0x9c, 0x02, 0x37, 0x00, 0xff, 0x00, 0x00, 0x90
2016-05-12 15:26:21.685 Detail, 
2016-05-12 15:26:21.686 Info, Node055, ApplicationCommandHandler - Unhandled Command Class 0x9c
2016-05-12 15:26:21.832 Detail, Node055,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x37, 0x07, 0x9c, 0x02, 0x37, 0x00, 0xff, 0x00, 0x00, 0x90
2016-05-12 15:26:21.834 Detail, 
2016-05-12 15:26:21.834 Info, Node055, ApplicationCommandHandler - Unhandled Command Class 0x9c
2016-05-12 15:26:23.483 Detail, Node055,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x37, 0x07, 0x9c, 0x02, 0x37, 0x05, 0xff, 0x00, 0x00, 0x95
2016-05-12 15:26:23.483 Detail, 
2016-05-12 15:26:23.484 Info, Node055, ApplicationCommandHandler - Unhandled Command Class 0x9c
2016-05-12 15:26:23.585 Detail, Node055,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x37, 0x03, 0x20, 0x01, 0xff, 0x18
2016-05-12 15:26:23.585 Detail, 
2016-05-12 15:26:23.585 Info, Node055, Received Basic set from node 55: level=255.  Sending event notification.
2016-05-12 15:26:23.585 Detail, Node055, Notification: NodeEvent
2016-05-12 15:26:23.631 Detail, Node055,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x37, 0x03, 0x20, 0x01, 0xff, 0x18
2016-05-12 15:26:23.631 Detail, 
2016-05-12 15:26:23.631 Info, Node055, Received Basic set from node 55: level=255.  Sending event notification.
2016-05-12 15:26:23.631 Detail, Node055, Notification: NodeEvent
2016-05-12 15:26:26.278 Detail,   Received: 0x01, 0x05, 0x00, 0x13, 0x5c, 0x01, 0xb4
2016-05-12 15:26:26.278 Detail,   ZW_SEND_DATA Request with callback ID 0x5c received (expected 0x00)
2016-05-12 15:26:26.278 Warning, WARNING: Unexpected Callback ID received
2016-05-12 15:26:27.141 Detail, Node055,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x37, 0x07, 0x9c, 0x02, 0x37, 0x05, 0x00, 0x00, 0x00, 0x6a
2016-05-12 15:26:27.141 Detail, 
2016-05-12 15:26:27.141 Info, Node055, ApplicationCommandHandler - Unhandled Command Class 0x9c
2016-05-12 15:26:27.155 Detail, Node055,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x37, 0x03, 0x20, 0x01, 0x00, 0xe7
2016-05-12 15:26:27.155 Detail, 
2016-05-12 15:26:27.155 Info, Node055, Received Basic set from node 55: level=0.  Sending event notification.
2016-05-12 15:26:27.156 Detail, Node055, Notification: NodeEvent

So did adding

<CommandClass id="32" setasreport="true"/>

to

zwcfg_0xde8a79e6.xml

resolved the issue?

@snizzleorg
Copy link

interestingly I changed the sensors config in z-wave.me (for example LED behaviour) but when switching back to hass the LED behaviour returned to the old way. Is the configuration of the sensor updated by hass?

@dcrypt3d
Copy link
Contributor

dcrypt3d commented Jun 1, 2016

Using Fibaro Flood Sensor. Added and I'm seeing the same as @snizzleorg in OZWCP logs. But no values change in HA.

@snizzleorg
Copy link

I got frustrated with the z-wave stuff and switched to veraedge. The home-assistant binding for veraedge is not perfect but the z-wave stuff works more reliably.

@dcrypt3d
Copy link
Contributor

dcrypt3d commented Jun 17, 2016

@snizzleorg sorry, that's not an acceptable answer

I added:

<CommandClass id="32" setasreport="true"/>

<CommandClass id="112" setasreport="true"/>

to fgfs101.xml

In both cases I still do not have an change in state from any of the sensors that show up other than temperature. The sensor is correctly identified in HA and in ozwcp.

@partofthething
Copy link
Contributor

Again, changing xml files does not change the configuration of the device. Those files are just caches of the configurations.

To change the settings of a device, you must go into a python3 command line, import openzwave libraries, and send configuration-editing commands through the z-wave network. An example on a multisensor is done on this blog. .

You can also try using the command-line control panel that comes with python-openzwave.

@snizzleorg
Copy link

@devdelay, sorry I know it won't help with this issue. but I'm happy now and the thing just works as expected with home-assistant via vera. I now have other problems but the z-wave config is much much easier this way.

@dcrypt3d
Copy link
Contributor

@snizzleorg 😜 I ended up using domoticz to add this device for now. @partofthething I understand but is it possible to change a device to use a command class it doesn't support? ozwcp shows this device supports alarm and basic command classes... I'm not sure how to make it use another command class that is not listed. I've tried adding the basic command class support to the zwave and zwave/sensor components with no luck either. HA wants to recognize it as alarm and binary sensor regardless of the settings changed in ozwcp.

@turbokongen
Copy link
Contributor

This is working now. Tested by @ktpx
Parameter #5 must be set to 0 for the fibaro sensor.
Regarding other brands, there is a setting for which commandclass used for alarm. It should not be basic. Change that setting to whatever other is.
It will show as a alarm badge in the ui and will change from 0(NO FLOOD) to 255(FLOOD)
It might not update in the UI, because there is also settings for how long the alarm shuould be transmitted. Check those too. You should see the state change in the hass logfile.
I will close this, in a day or two if no other problems arise :)

@InblEric
Copy link

@turbokongen What is parameter 5? I have no idea how to find it or change it.

@turbokongen
Copy link
Contributor

Check the device's manual 😉

@InblEric
Copy link

I was able to find the parameter 5 and I changed it from 255 to 0, but still nothing happens when the device is in a simulated flood. None of the sensor values that are displayed in the HA dashboard are ever updated actually.

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests