zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
982 stars 202 forks source link

Fibaro Smoke Detector FGSD002 additional devices #2811

Closed roblomq closed 1 year ago

roblomq commented 1 year ago

In OZW I had several more devices, now I only have

Is it possible to add a device that switched when the alarm goes? And maybe also a switch that could turn it off again.

The debug info of the smoke detector is:

{ "id": 11, "name": "Rookmelder WK", "loc": "Woonkamer", "values": [ { "id": "11-49-0-Air temperature", "nodeId": 11, "commandClass": 49, "commandClassName": "Multilevel Sensor", "endpoint": 0, "property": "Air temperature", "propertyName": "Air temperature", "type": "number", "readable": true, "writeable": false, "label": "Air temperature", "ccSpecific": { "sensorType": 1, "scale": 0 }, "stateless": false, "commandClassVersion": 8, "unit": "°C", "list": false, "value": 21.5, "lastUpdate": 1668875302854, "newValue": 21.5 }, { "id": "11-114-0-manufacturerId", "nodeId": 11, "commandClass": 114, "commandClassName": "Manufacturer Specific", "endpoint": 0, "property": "manufacturerId", "propertyName": "manufacturerId", "type": "number", "readable": true, "writeable": false, "label": "Manufacturer ID", "stateless": false, "commandClassVersion": 2, "min": 0, "max": 65535, "list": false, "value": 271, "lastUpdate": 1668875302865, "newValue": 271 }, { "id": "11-114-0-productType", "nodeId": 11, "commandClass": 114, "commandClassName": "Manufacturer Specific", "endpoint": 0, "property": "productType", "propertyName": "productType", "type": "number", "readable": true, "writeable": false, "label": "Product type", "stateless": false, "commandClassVersion": 2, "min": 0, "max": 65535, "list": false, "value": 3074, "lastUpdate": 1668875302871, "newValue": 3074 }, { "id": "11-114-0-productId", "nodeId": 11, "commandClass": 114, "commandClassName": "Manufacturer Specific", "endpoint": 0, "property": "productId", "propertyName": "productId", "type": "number", "readable": true, "writeable": false, "label": "Product ID", "stateless": false, "commandClassVersion": 2, "min": 0, "max": 65535, "list": false, "value": 4099, "lastUpdate": 1668875302878, "newValue": 4099 }, { "id": "11-128-0-level", "nodeId": 11, "commandClass": 128, "commandClassName": "Battery", "endpoint": 0, "property": "level", "propertyName": "level", "type": "number", "readable": true, "writeable": false, "label": "Battery level", "stateless": false, "commandClassVersion": 1, "min": 0, "max": 100, "unit": "%", "list": false, "value": 100, "lastUpdate": 1668875302884, "newValue": 100 }, { "id": "11-128-0-isLow", "nodeId": 11, "commandClass": 128, "commandClassName": "Battery", "endpoint": 0, "property": "isLow", "propertyName": "isLow", "type": "boolean", "readable": true, "writeable": false, "label": "Low battery level", "stateless": false, "commandClassVersion": 1, "list": false, "value": false, "lastUpdate": 1668875302890, "newValue": false }, { "id": "11-134-0-libraryType", "nodeId": 11, "commandClass": 134, "commandClassName": "Version", "endpoint": 0, "property": "libraryType", "propertyName": "libraryType", "type": "number", "readable": true, "writeable": false, "label": "Library type", "stateless": false, "commandClassVersion": 2, "list": true, "states": [ { "text": "Unknown", "value": 0 }, { "text": "Static Controller", "value": 1 }, { "text": "Controller", "value": 2 }, { "text": "Enhanced Slave", "value": 3 }, { "text": "Slave", "value": 4 }, { "text": "Installer", "value": 5 }, { "text": "Routing Slave", "value": 6 }, { "text": "Bridge Controller", "value": 7 }, { "text": "Device under Test", "value": 8 }, { "text": "N/A", "value": 9 }, { "text": "AV Remote", "value": 10 }, { "text": "AV Device", "value": 11 } ], "value": 3, "lastUpdate": 1668875302897, "newValue": 3 }, { "id": "11-134-0-protocolVersion", "nodeId": 11, "commandClass": 134, "commandClassName": "Version", "endpoint": 0, "property": "protocolVersion", "propertyName": "protocolVersion", "type": "string", "readable": true, "writeable": false, "label": "Z-Wave protocol version", "stateless": false, "commandClassVersion": 2, "list": false, "value": "4.24", "lastUpdate": 1668875302904, "newValue": "4.24" }, { "id": "11-134-0-firmwareVersions", "nodeId": 11, "commandClass": 134, "commandClassName": "Version", "endpoint": 0, "property": "firmwareVersions", "propertyName": "firmwareVersions", "type": "string[]", "readable": true, "writeable": false, "label": "Z-Wave chip firmware versions", "stateless": false, "commandClassVersion": 2, "list": false, "value": [ "3.3", "3.3" ], "lastUpdate": 1668875302910, "newValue": [ "3.3", "3.3" ] }, { "id": "11-134-0-hardwareVersion", "nodeId": 11, "commandClass": 134, "commandClassName": "Version", "endpoint": 0, "property": "hardwareVersion", "propertyName": "hardwareVersion", "type": "number", "readable": true, "writeable": false, "label": "Z-Wave chip hardware version", "stateless": false, "commandClassVersion": 2, "list": false, "value": 2, "lastUpdate": 1668875302917, "newValue": 2 } ], "groups": [], "neighbors": [], "ready": true, "available": true, "hassDevices": { "sensor_temperature_air": { "type": "sensor", "object_id": "temperature_air", "discovery_payload": { "value_template": "{{ value_json.value }}", "device_class": "temperature", "unit_of_measurement": "°C", "state_topic": "zwave/Rookmelder_WK/49/0/Air_temperature", "json_attributes_topic": "zwave/Rookmelder_WK/49/0/Air_temperature", "device": { "identifiers": [ "zwavejs2mqtt_0xce6518d0_node11" ], "manufacturer": "Fibargroup", "model": "Smoke Detector (FGSD002)", "name": "Rookmelder WK", "sw_version": "3.3" }, "name": "Rookmelder WK - temperature_air", "unique_id": "zwavejs2mqtt_0xce6518d0_11-49-0-Air_temperature" }, "discoveryTopic": "sensor/Rookmelder_WK/temperature_air/config", "values": [ "49-0-Air temperature" ], "persistent": false, "ignoreDiscovery": false }, "sensor_battery_level": { "type": "sensor", "object_id": "battery_level", "discovery_payload": { "value_template": "{{ value_json.value }}", "device_class": "battery", "unit_of_measurement": "%", "state_topic": "zwave/Rookmelder_WK/128/0/level", "json_attributes_topic": "zwave/Rookmelder_WK/128/0/level", "device": { "identifiers": [ "zwavejs2mqtt_0xce6518d0_node11" ], "manufacturer": "Fibargroup", "model": "Smoke Detector (FGSD002)", "name": "Rookmelder WK", "sw_version": "3.3" }, "name": "Rookmelder WK - battery_level", "unique_id": "zwavejs2mqtt_0xce6518d0_11-128-0-level" }, "discoveryTopic": "sensor/Rookmelder_WK/battery_level/config", "values": [ "128-0-level" ], "persistent": false, "ignoreDiscovery": false }, "binary_sensor_battery_islow": { "type": "binary_sensor", "object_id": "battery_islow", "discovery_payload": { "payload_on": true, "payload_off": false, "value_template": "{{ value_json.value }}", "device_class": "battery", "state_topic": "zwave/Rookmelder_WK/128/0/isLow", "json_attributes_topic": "zwave/Rookmelder_WK/128/0/isLow", "device": { "identifiers": [ "zwavejs2mqtt_0xce6518d0_node11" ], "manufacturer": "Fibargroup", "model": "Smoke Detector (FGSD002)", "name": "Rookmelder WK", "sw_version": "3.3" }, "name": "Rookmelder WK - battery_islow", "unique_id": "zwavejs2mqtt_0xce6518d0_11-128-0-isLow" }, "discoveryTopic": "binary_sensor/Rookmelder_WK/battery_islow/config", "values": [ "128-0-isLow" ], "persistent": false, "ignoreDiscovery": false } }, "failed": false, "inited": true, "eventsQueue": [ { "time": "2022-11-19T16:28:22.816Z", "event": "sleep", "args": [ 0 ] }, { "time": "2022-11-19T16:28:23.001Z", "event": "ready", "args": [] } ], "hexId": "0x010f-0x0c02-0x1003", "dbLink": "https://devices.zwave-js.io/?jumpTo=0x010f:0x0c02:0x1003:3.3", "manufacturerId": 271, "productId": 4099, "productType": 3074, "deviceConfig": { "filename": "/usr/src/app/store/.config-db/devices/0x010f/fgsd002.json", "isEmbedded": true, "manufacturer": "Fibargroup", "manufacturerId": 271, "label": "FGSD002", "description": "Smoke Detector", "devices": [ { "productType": 3074, "productId": 4098 }, { "productType": 3074, "productId": 4099 }, { "productType": 3074, "productId": 16386 } ], "firmwareVersion": { "min": "0.0", "max": "255.255" }, "paramInformation": { "_map": {} } }, "productLabel": "FGSD002", "productDescription": "Smoke Detector", "manufacturer": "Fibargroup", "firmwareVersion": "3.3", "protocolVersion": 3, "zwavePlusVersion": 1, "zwavePlusNodeType": 0, "zwavePlusRoleType": 6, "nodeType": 1, "endpointsCount": 0, "endpointIndizes": [], "isSecure": true, "security": "S0_Legacy", "supportsSecurity": false, "supportsBeaming": true, "isControllerNode": false, "isListening": false, "isFrequentListening": false, "isRouting": true, "keepAwake": false, "maxDataRate": 100000, "deviceClass": { "basic": 4, "generic": 7, "specific": 1 }, "deviceId": "271-4099-3074", "status": "Asleep", "interviewStage": "Complete", "minBatteryLevel": 100, "batteryLevels": [ 100 ], "_name": "Rookmelder WK (Woonkamer)", "statistics": false }

robertsLando commented 1 year ago

@roblomq are you using home assistant integration? If so you should open an issue in their repo, I have no control on devices created there

roblomq commented 1 year ago

I'm using the auto discovery function in Domoticz. But in the home assistant settings in Zwave-JS-UI are only 3 devices, battery level, battery empty and temperature. So I assumed that as the smoke alarm switch is not in this menu it will not be created in auto discovery and therefore the source it's missing is in Zwave-JS-UI.

robertsLando commented 1 year ago

Ok so you are using mqtt discovery (you didn't mention it on your issue). In that case you can do a manual discovery of missing devices, check: https://zwave-js.github.io/zwave-js-ui/#/homeassistant/homeassistant-mqtt

roblomq commented 1 year ago

I'm sorry, I've red the documentation several times and also googled on it but I have no clue what to do. The device works fine and the battery status and temperature is updated regularly but I'm missing the switches (one for the Enclosure opening and one for the actual smoke alarm). I think I have to look in the custom components section of the above link. But where is the customDevices.js located (I used docker for the installation of zwavejs2mqtt)?

I have the node ID (271-4099-3074) but then what?

I found most surprising that this isn't already working. The Fibaro smoke sensors are widely used and for me it's quite logic to have something triggered in your home automation system when there is a fire detected....

robertsLando commented 1 year ago

Sorry for my late reply.

Click on a node in the table and go to home hassistant tab, there you should find all the sensors discovered, if them are there you should ask to domoticz devs to help you understand why them are not present in domoticz as I never used it

roblomq commented 1 year ago

The ones that are listed there are shown in Domoticz. But there are only 3 devices listed on the Homeassistant tab, as shown below.

2022-12-23_14h48_35

robertsLando commented 1 year ago

COud you tell me the exact valueId that you would like to have discovered? Maybe it is handled as a notification, in that case a discovered value is not created automatically for that valueId.

Check https://zwave-js.github.io/zwave-js-ui/#/guide/mqtt?id=node-notifications

roblomq commented 1 year ago

I don't know what the valueId is because it is not listed, or is there another way to find this besides the debug info? What Would be nice is if the things below where discovered

robertsLando commented 1 year ago

I don't know what the valueId is because it is not listed

As I said, if it's not listed, it's a node notification. You should handle it manually, If you go to node events tab you will see the events that are triggered by the node, then identify the topic using mqtt explorer and create the entity on domoticz

roblomq commented 1 year ago

There are moments that I feel stupid, this is such a moment. You are trying to make things clear for me but I don't understand what. You suggest I need to do something manually but if there are no values other than the above shown 3, what do I need to handle manually?

When I go to the ZWaveJS2MQTT control panel, scroll to the Fibaro Smoke sensor and click on the events tab, there is only the "Air temperature" listed. No other values are listed even when I remove the sensor from it's socket so the "Enclosure open" is triggered. Also not when I rediscover the node or update the values. 2022-12-27_16h27_19

So because there is nothing shown in ZWaveJS2MQTT I doubt highly there is something send to MQTT ut to be sure I checked also but as expected only the 3 values that are listed in the "Home assistant" tab are shown in MQTT Explorer. 2022-12-27_16h32_03

robertsLando commented 1 year ago

When I go to the ZWaveJS2MQTT control panel, scroll to the Fibaro Smoke sensor and click on the events tab, there is only the "Air temperature" listed.

If so there must be a problem and the notification is not correctly handled/catched by zwave-js driver. Could you upload zwave-js driver logs please?

@AlCalzone @kpine is there any known bugs with fibaro smoke sensor?

roblomq commented 1 year ago

zwavejs_2022-12-27.zip NodeID 4 and 11 are Fibaro smoke sensors.

kpine commented 1 year ago

These logs don't contain any information. You should preform a re-interview of one of the problematic devices and upload the logs that capture that. Also, you probably should also upload the Node Debug Info for one of the devices (after the re-interview).

roblomq commented 1 year ago

zwavejs2mqtt-store.zip I hope this one is better... I re-interviewed node 011

kpine commented 1 year ago

The device does not report any support for Notification CC, which would be how smoke alarms are reported:

2022-12-27T17:16:11.880Z CNTRLR « [Node 011] node info received
                                  supported CCs:
                                  · Z-Wave Plus Info
                                  · Version
                                  · Manufacturer Specific
                                  · Association Group Information
                                  · Powerlevel
                                  · Battery
                                  · Application Status
                                  · Multilevel Sensor
                                  · CRC-16 Encapsulation
                                  · Security
                                  · Firmware Update Meta Data
                                  controlled CCs:

But it could be because of this failure:

2022-12-27T17:16:11.914Z CNTRLR » [Node 011] Querying securely supported commands (S0)...
2022-12-27T17:16:11.963Z SERIAL » 0x010900130b029840254253                                            (11 bytes)
<...>
2022-12-27T17:16:13.205Z CNTRLR   [Node 011] Timed out while waiting for a response from the node (ZW0201)
2022-12-27T17:16:13.208Z CNTRLR   [Node 011] Querying securely supported commands (S0) timed out

Notification CC might only be supported with Security if included that way, I don't know. But the device is failing to respond.

Did you change your security keys or anything? How did you include it, by Default strategy, or did you force inclusion? You might try excluding and re-including. I'm not sure why the device would fail to respond to the S0 supported commands request, other than a key mismatch.

roblomq commented 1 year ago

I added it with the option "Force security", I did a test, when I use that option then I only get the 3 devices I mentioned earlier. When I include it without the "Force security" I get all the devices I expected (see below). 2022-12-27_19h54_47 But now there is no security used, I'm not sure if that's a problem but it sounds less secure :-) I also included the logs. zwavejs2mqtt-store (2).zip

robertsLando commented 1 year ago

There should be a way to put device in secure inclusion mode instead normal inclusion mode (at least some devices could work like this), do you have all the Security keys correctly set on settings?

roblomq commented 1 year ago

Yes I have all 4 security keys set (generated at installation of zwavejs2mqtt). Other devices work with security on.

robertsLando commented 1 year ago

Try to check in device manual if there is a special combination of keys to press in order to put it in secure inclusion

AlCalzone commented 1 year ago

Another thing I can imagine is that the device does not reset its stored security keys after excluding, but they are different than the ones configured in Z-Wave JS. Try exclusion, factory reset, then include again.