openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.58k forks source link

Including ZWave Fibaro door sensor and smoke sensor in openhab2 #1003

Closed davidiluvatar closed 8 years ago

davidiluvatar commented 8 years ago

Hello!

First of all, thank you for your work in this project.

My message is about the problems I'm facing when trying to include Fibaro door sensor and smoke sensor in my openhab2 installation (with Aeotec ZStick series 2 as Zwave controller). I've been searching your issues and the Internet, but I haven't been able to find a solution, that's why I have started this thread.

I handle the controller and sensors as specified, and when I get back to the Habmin UI, I can see I have 2 new things. However, when I try to add them, they just appear as "Unknown devices", and I can see no property. I try to wake the devices up just in case the interview hasn't been completed, but no progress.

So, my questions:

If you need logs, just tell me.

Thank you, David.

cdjackson commented 8 years ago

Does openhab2 support these devices?

That's a tough question to answer without information on the device. Fibaro make extensive use of different IDs in their devices, so we need to know what IDs are in the device you own. Probably the answer is "it should work" though...

If not, can I add support by editing some configuration file?

You need to edit the online database at www.cd-jackson.com to update the database.

However...

I think there is probably a bug with the discovery - I've not managed to replicate it, but a few people have mentioned this. I will look into this issue - I tried to resolve it a week or so back though - can you advise what version of the binding you are using?

If you can supply the log, that would also be useful.

Something to try is to delete the thing, then press the discovery button, and re-add the thing back. DO NOT touch the device - do not exclude the device - just delete the thing, and add it back in and see if that helps.

davidiluvatar commented 8 years ago

About the binding, I suppose it's this one:

./runtime/karaf/system/org/openhab/binding/org.openhab.binding.zwave/2.0.0-SNAPSHOT/org.openhab.binding.zwave-2.0.0-SNAPSHOT.jar

About the workaround you suggest, this is what I have tried:

1 - In Habmin UI - Configuration - Thing configuration, I have selected the two devices and deleted them.

2016-06-07 23:02:12.313 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:2a8161de:node14' changed from OFFLINE to UNINITIALIZED (HANDLER_MISSING_ERROR) 2016-06-07 23:02:12.344 [INFO ] [smarthome.event.ThingRemovedEvent ] - Thing 'zwave:device:2a8161de:node14' has been removed. 2016-06-07 23:02:12.565 [INFO ] [smarthome.event.ItemRemovedEvent ] - Item 'zwave_device_2a8161de_node14' has been removed. 2016-06-07 23:02:12.752 [INFO ] [home.event.ItemThingLinkRemovedEvent] - Link 'zwave_device_2a8161de_node14-zwave:device:2a8161de:node14' has been removed. 2016-06-07 23:02:22.281 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:device:2a8161de:node13' changed from ONLINE to UNINITIALIZED (HANDLER_MISSING_ERROR) 2016-06-07 23:02:22.301 [INFO ] [smarthome.event.ThingRemovedEvent ] - Thing 'zwave:device:2a8161de:node13' has been removed. 2016-06-07 23:02:22.533 [INFO ] [smarthome.event.ItemRemovedEvent ] - Item 'zwave_device_2a8161de_node13' has been removed. 2016-06-07 23:02:23.078 [INFO ] [home.event.ItemThingLinkRemovedEvent] - Link 'zwave_device_2a8161de_node13-zwave:device:2a8161de:node13' has been removed.

2 - In Paper UI > Inbox > Z-Wave Binding > Search I find both sensors. The smoke sensor (Device 14) still Unknown, but the Door sensor (Device 13) is recognized as FGK101 Door Opening Sensor.

2016-06-07 23:04:59.136 [ERROR] [ve.internal.protocol.ZWaveController] - Neither inclusion nor exclusion was active! 2016-06-07 23:04:59.166 [WARN ] [wave.discovery.ZWaveDiscoveryService] - NODE 2: Device could not be resolved to a thingType! 7FFFFFFF:7FFFFFFF:7FFFFFFF::0.0 2016-06-07 23:04:59.381 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'zwave:device:2a8161de:node2' to inbox. 2016-06-07 23:04:59.384 [INFO ] [smarthome.event.InboxAddedEvent ] - Discovery Result with UID 'zwave:device:2a8161de:node2' has been added. 2016-06-07 23:04:59.453 [WARN ] [wave.discovery.ZWaveDiscoveryService] - NODE 11: Device could not be resolved to a thingType! 7FFFFFFF:7FFFFFFF:7FFFFFFF::0.0 2016-06-07 23:04:59.660 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'zwave:device:2a8161de:node11' to inbox. 2016-06-07 23:04:59.661 [INFO ] [smarthome.event.InboxAddedEvent ] - Discovery Result with UID 'zwave:device:2a8161de:node11' has been added. 2016-06-07 23:04:59.870 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'zwave:device:2a8161de:node13' to inbox. 2016-06-07 23:04:59.870 [INFO ] [smarthome.event.InboxAddedEvent ] - Discovery Result with UID 'zwave:device:2a8161de:node13' has been added. 2016-06-07 23:04:59.877 [WARN ] [wave.discovery.ZWaveDiscoveryService] - NODE 14: Device could not be resolved to a thingType! 7FFFFFFF:7FFFFFFF:7FFFFFFF::0.0 2016-06-07 23:05:00.079 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'zwave:device:2a8161de:node14' to inbox. 2016-06-07 23:05:00.080 [INFO ] [smarthome.event.InboxAddedEvent ] - Discovery Result with UID 'zwave:device:2a8161de:node14' has been added.

3 - In Paper UI > Configuration > Things, when editing the Channels, I think the device is not correctly recognized, because I can see command classes that the device lacks: Water, CO, smoke, CO2, heat.

4 - I interact with the door sensor, and there seems to be a mess. The recognized device is sensor 13, but when I open and close the door, the log refers to device 10:

2016-06-08 00:57:06.757 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_device_2a8161de_node10_sensor_door changed from OPEN to CLOSED 2016-06-08 00:57:08.185 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_device_2a8161de_node10_sensor_door changed from CLOSED to OPEN 2016-06-08 00:57:27.915 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_device_2a8161de_node10_sensor_door changed from OPEN to CLOSED

However, device 10 is not shown on the discovered devices. When I first got this problem, I excluded devices, then included them again; then delected in Habmin... So I'm not sure the real state of the Aeontec stick devices database, but it seems device 10 is stored in the stick, but not correctly informed to openhab.

About devices IDs, how can I know them?

Hope to be helpful. If you need something else, please tell me.

Regards, David.

cdjackson commented 8 years ago

Please can you provide a full debug log. INFO level logs are of no use for debugging.

In Paper UI > Inbox > Z-Wave Binding > Search I find both sensors. The smoke sensor (Device 14) still Unknown, but the Door sensor (Device 13) is recognized as FGK101 Door Opening Sensor. Have you woken these devices up. The 7ffff business normally happens when the device hasn’t woken up and the binding doesn’t know what it is.

In Paper UI > Configuration > Things, when editing the Channels, I think the device is not correctly recognized, because I can see command classes that the devices lacks: Water, CO, smoke, CO2, heat. This would be VERY surprising - I’ve NEVER seen such a thing. It’s more likely that the node numbers are not what you think. Again, a log file is necessary, but I really can’t see how incorrect command classes can be detected. Note that “Water/CO/Smoke etc” are NOT command classes. I don’t know what you are referring to, but they are likely alarms that devices support in some way or another. Often devices support notifications so they can do something if another device sends out such an alarm.

4, In interact with the door sensor, and there seems to be a mess. The recognized device is sensor 13, but when I open and close the door, the log refers to device 10:

Again, this is unlikely. It’s more likely that you have the node numbers mixed up but a full startup log is really needed.

davidiluvatar commented 8 years ago

OK, I've been reviewing code I developed some time ago for the RaZberry, and, though it might sound impossible, I concluded that Fibaro smoke sensor and door sensor (at least the ones I have tested) send the same ID: 271:4096. I think this could be the problem. I should try a door sensor from a different manufacturer.

As soon as I have the logs I will send them to you. Just a doubt: is it enough to execute ./start_debug.sh?

Thank you.

cdjackson commented 8 years ago

I don’t think the door sensor and smoke sensor use the same IDs. Certainly I’ve not seen this before and we have many people using these devices (I have them both myself and don’t see this issue).

davidiluvatar commented 8 years ago

I'm attaching what I see regarding Node 13 (Door sensor) in my UIs. Node13.docx

davidiluvatar commented 8 years ago

Regarding devices IDs, is there any way in openhab I can see the IDs?

cdjackson commented 8 years ago

Yes - the IDs are shown in the Atributes section in HABmin, or by looking in the XML files. You need to make sure that this initialisation has completed though since the IDs are only available once the binding has initialised the device.

davidiluvatar commented 8 years ago

I have rescued my old RPi B+ with the RaZberry to check the Fibaro IDs issue. This is what I have done:

1 - Include the door sensor, appearing device 6. I have queried the ZWave.me / Z-Way API about the device 6. In the file DoorFibaro.txt you can see all the information returned by the RaZberry.

2 - Exclude the door sensor, just to make sure there's no interaction between both devices.

3 - Include the smoke sensor, appearing device 7. I have queried the ZWave.me / Z-Way API about the device 7. In the file SmokeFibaro.txt you can see all the information returned by the RaZberry.

4 - Exclude the smoke sensor.

In short, both sensors have the same pair manufacturerId:manufacturerProductId, but there are other values that are actually different (manufacturerProductType), so, depending on which fields are used to identify (I used manufacturerId:manufacturerProductId), they appear like the same device:

DoorFibaro.txt SmokeFibaro.txt

DOOR SENSOR "manufacturerId": 271 "vendorString": "Fibar Group" "manufacturerProductType": 1792 "manufacturerProductId": 4096

commandClasses: "48": "SensorBinary" "112": "Configuration" "114": "ManufacturerSpecific" "122": "FirmwareUpdate" "128": "Battery" "132": "Wakeup" "133": "Association" "134": "Version" "156": "AlarmSensor"

SMOKE SENSOR "manufacturerId": 271 "vendorString": "Fibar Group" "manufacturerProductType": 3072 "manufacturerProductId": 4096

commandClasses: "49": "SensorMultilevel" "86": "CRC16" "112": "Configuration" "114": "ManufacturerSpecific" "115": "PowerLevel" "122": "FirmwareUpdate" "128": "Battery" "132": "Wakeup" "133": "Association" "134": "Version" "139": "TimeParameters" "142": "MultiChannelAssociation" "156": "AlarmSensor"

cdjackson commented 8 years ago

Exactly - we use the product type and product ID to differentiate products, so this is fine. They will NOT be detected as the same device.

I don't understand what the files are that you've attached but all I need are the IDs so I'll check if these are in the database.

davidiluvatar commented 8 years ago

These files are JSON returned by RaZberry (ZWave.me / Z-Way API) when querying information about an included ZWave device. It's very useful when I want to know everything about a new device.

Could you review the Node13.docx file I uploaded yesterday?

Thank you again for your support.

cdjackson commented 8 years ago

It's very useful when I want to know everything about a new device.

Ok - thanks. The information is the same as the OH XML files, just in json format. OH format files are better for me as I can process them automatically.

Could you review the Node13.docx file I uploaded yesterday?

Sure. It's as per the current definition http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/125.

davidiluvatar commented 8 years ago

I see, but isn't it a bit strange that the door sensor exposes CO, smoke, water... alarms, that it really doesn't implement?

And back to my original problem including some devices, what is the best way to get a full debug log? ./start_debug.sh?

cdjackson commented 8 years ago

I see, but isn't it a bit strange that the door sensor exposes CO, smoke, water... alarms, that it really doesn't implement?

No, it's not strange - this is what the device implements.

what is the best way to get a full debug log

You need to enable debug in the console using the log command. Take a look on my website - there's a short explanation there somewhere (I can't access it now so can't provide the pointer).

davidiluvatar commented 8 years ago

Update. I have been trying to reboot, delete+discover... but the smoke detector (node 14), have always re-appeared as Unknown device with no command classess/channels. When I enabled the debug log in ZWave binding, and rebooted the RPi, then the device has been recognized as Smoke Detector with all its channels. Not really sure if the debug log has helped in any way, but my problem has dissapeared. So now, I don't have the problems I reported.