zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
775 stars 703 forks source link

Please add support for Namron stoveguard #2519

Open bthovda opened 1 year ago

bthovda commented 1 year ago

Problem description

Please add ZHA support for Namron Stoveguard. https://www.elektroimportoren.no/docs/lib/1402793-Brukerveiledning-5.pdf Currently it is added ok but not all sensors are working.

  1. Switch (Possible to turn off, but not ON) Possibly supposed to be like this. (Only local reset) Should it be a toggle switch then? button?
  2. Power consumption (Watt) OK, working without problems.
  3. Power factor, displaying (Unknown)
  4. Temperature showing −327,7 °C when cooking top is not used. When in use it is measuring temperatures 100 - 120 degrees Celcius.

Solution description

  1. Fix Power factor and temperature sensor
  2. Change switch to button and a sensor showing ON/OFF.

Screenshots/Video

https://www.elektroi 1402793-Brukerveiledning-5.pdf mportoren.no/docs/lib/1402793-Brukerveiledning-5.pdf

Device signature

Device signature ```json { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4660, maximum_buffer_size=108, maximum_incoming_transfer_size=0, server_mask=10752, maximum_outgoing_transfer_size=0, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0051", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0006", "0x0402", "0x0702", "0x0b04" ], "output_clusters": [ "0x0003" ] }, "10": { "profile_id": "0x0104", "device_type": "0xfff0", "input_clusters": [ "0x0000" ], "output_clusters": [ "0x0019" ] } }, "manufacturer": "NAMRON AS", "model": "1402790", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.8.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.4", "docker": true, "arch": "x86_64", "timezone": "Europe/Oslo", "os_name": "Linux", "os_version": "6.1.39", "supervisor": "2023.08.1", "host_os": "Home Assistant OS 10.4", "docker_version": "23.0.6", "chassis": "vm", "run_as_root": true }, "custom_components": { "mold_risk_index": { "version": "1.0.1", "requirements": [] }, "hpprinter": { "version": "1.0.8", "requirements": [ "xmltodict==0.12.0" ] }, "powercalc": { "version": "v1.8.8", "requirements": [ "numpy>=1.21.1" ] }, "biketrax": { "version": "1.1.0", "requirements": [ "aiobiketrax==1.1.0" ] }, "min_renovasjon": { "version": "2.1.0", "requirements": [] }, "files": { "version": "1.5", "requirements": [] }, "frigate": { "version": "4.0.0", "requirements": [ "pytz==2022.7" ] }, "priceanalyzer": { "version": "1.3", "requirements": [ "nordpool>=0.2" ] }, "nest_protect": { "version": "0.3.12", "requirements": [] }, "metnowcast": { "version": "v2.3.0", "requirements": [] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "pyscript": { "version": "1.5.0", "requirements": [ "croniter==1.3.8", "watchdog==2.3.1" ] }, "teamtracker": { "version": "0.1", "requirements": [ "arrow", "aiofiles" ] }, "ble_monitor": { "version": "12.3.2", "requirements": [ "pycryptodomex>=3.14.1", "janus>=1.0.0", "aioblescan>=0.2.14", "btsocket>=0.2.0", "pyric>=0.1.6.3" ] }, "browser_mod": { "version": "2.3.0", "requirements": [] }, "posten": { "version": "0.1.5.2", "requirements": [] }, "multiscrape": { "version": "6.5.0", "requirements": [ "lxml==4.9.1", "beautifulsoup4==4.11.1" ] }, "truenas": { "version": "0.0.0", "requirements": [] }, "blitzortung": { "version": "1.0.1", "requirements": [ "paho-mqtt>=1.5.0" ] }, "xplora_watch": { "version": "v2.8.3", "requirements": [ "pyxplora_api==2.8.3", "geopy==2.2.0", "dataclasses-json", "pydub", "marshmallow-enum" ] }, "webrtc": { "version": "v3.2.1", "requirements": [] }, "nordpool": { "version": "0.0.14", "requirements": [ "nordpool>=0.2", "backoff" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "requirements": [ "bellows==0.35.8", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.102", "zigpy-deconz==0.21.0", "zigpy==0.56.4", "zigpy-xbee==0.18.1", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.4" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 592, "manufacturer": "NAMRON AS", "model": "1402790", "name": "NAMRON AS 1402790", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4660, "power_source": "Mains", "lqi": 255, "rssi": -57, "last_seen": "2023-08-09T15:34:26", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4660, maximum_buffer_size=108, maximum_incoming_transfer_size=0, server_mask=10752, maximum_outgoing_transfer_size=0, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0051", "input_clusters": [ "0x0000", "0x0001", "0x0003", "0x0006", "0x0402", "0x0702", "0x0b04" ], "output_clusters": [ "0x0003" ] }, "10": { "profile_id": "0x0104", "device_type": "0xfff0", "input_clusters": [ "0x0000" ], "output_clusters": [ "0x0019" ] } }, "manufacturer": "NAMRON AS", "model": "1402790" }, "active_coordinator": false, "entities": [ { "entity_id": "button.komfyrvakt_identify", "name": "NAMRON AS 1402790" }, { "entity_id": "sensor.komfyrvakt_power_factor", "name": "NAMRON AS 1402790" }, { "entity_id": "sensor.komfyrvakt_temperature", "name": "NAMRON AS 1402790" }, { "entity_id": "sensor.komfyrvakt_active_power", "name": "NAMRON AS 1402790" }, { "entity_id": "switch.komfyrvakt_switch", "name": "NAMRON AS 1402790" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "SMART_PLUG" }, { "name": "undefined_0xfff0" } ], "user_given_name": "Komfyrvakt", "device_reg_id": "6ff0141e5c92ae4a17304f790c2e3fe4", "area_id": "kjokken", "cluster_details": { "1": { "device_type": { "name": "SMART_PLUG", "id": 81 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "NAMRON AS" }, "0x0005": { "attribute_name": "model", "value": "1402790" } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0xfffd": { "attribute_name": "cluster_revision", "value": 1 }, "0x0000": { "attribute_name": "on_off", "value": 1 } }, "unsupported_attributes": { "0x4003": { "attribute_name": "start_up_on_off" } } }, "0x0702": { "endpoint_attribute": "smartenergy_metering", "attributes": { "0x0000": { "attribute_name": "current_summ_delivered", "value": 0 }, "0x0302": { "attribute_name": "divisor", "value": 10 }, "0x0306": { "attribute_name": "metering_device_type", "value": 0 }, "0x0301": { "attribute_name": "multiplier", "value": 1 }, "0x0200": { "attribute_name": "status", "value": 0 }, "0x0303": { "attribute_name": "summation_formatting", "value": 249 }, "0x0300": { "attribute_name": "unit_of_measure", "value": 0 } }, "unsupported_attributes": { "0x0400": { "attribute_name": "instantaneous_demand" }, "0x0100": { "attribute_name": "current_tier1_summ_delivered" }, "0x0102": { "attribute_name": "current_tier2_summ_delivered" }, "0x0302": { "attribute_name": "divisor" }, "0x0104": { "attribute_name": "current_tier3_summ_delivered" }, "0x0304": { "attribute_name": "demand_formatting" }, "0x0106": { "attribute_name": "current_tier4_summ_delivered" }, "0x0306": { "attribute_name": "metering_device_type" }, "0x0108": { "attribute_name": "current_tier5_summ_delivered" }, "0x0301": { "attribute_name": "multiplier" }, "0x010a": { "attribute_name": "current_tier6_summ_delivered" }, "0x0303": { "attribute_name": "summation_formatting" }, "0x0000": { "attribute_name": "current_summ_delivered" }, "0x0200": { "attribute_name": "status" } } }, "0x0b04": { "endpoint_attribute": "electrical_measurement", "attributes": { "0x050b": { "attribute_name": "active_power", "value": 0 }, "0x0000": { "attribute_name": "measurement_type", "value": 9 } }, "unsupported_attributes": { "0x0300": { "attribute_name": "ac_frequency" }, "0x0601": { "attribute_name": "ac_voltage_divisor" }, "0x0302": { "attribute_name": "ac_frequency_max" }, "0x0603": { "attribute_name": "ac_current_divisor" }, "0x0602": { "attribute_name": "ac_current_multiplier" }, "0x0505": { "attribute_name": "rms_voltage" }, "0x0507": { "attribute_name": "rms_voltage_max" }, "0x0508": { "attribute_name": "rms_current" }, "0x0605": { "attribute_name": "ac_power_divisor" }, "0x050a": { "attribute_name": "rms_current_max" }, "0x0604": { "attribute_name": "ac_power_multiplier" }, "0x050d": { "attribute_name": "active_power_max" }, "0x0000": { "attribute_name": "measurement_type" }, "0x050f": { "attribute_name": "apparent_power" }, "0x0403": { "attribute_name": "power_divisor" }, "0x0400": { "attribute_name": "ac_frequency_multiplier" }, "0x0401": { "attribute_name": "ac_frequency_divisor" }, "0x0402": { "attribute_name": "power_multiplier" }, "0x0600": { "attribute_name": "ac_voltage_multiplier" } } }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 198 } }, "unsupported_attributes": { "0x0020": { "attribute_name": "battery_voltage" }, "0x0021": { "attribute_name": "battery_percentage_remaining" }, "0x0031": { "attribute_name": "battery_size" }, "0x0033": { "attribute_name": "battery_quantity" } } }, "0x0402": { "endpoint_attribute": "temperature", "attributes": { "0x0002": { "attribute_name": "max_measured_value", "value": -32768 }, "0x0000": { "attribute_name": "measured_value", "value": -32768 } }, "unsupported_attributes": { "0x0003": { "attribute_name": "tolerance" }, "0xfffe": { "attribute_name": "reporting_status" } } } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} } } }, "10": { "device_type": { "name": "undefined_0xfff0", "id": 65520 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

Logs ```python [Paste the logs here] ```

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

No response

Polsemaker commented 1 year ago

Hi @bthovda , I am struggeling to get this into HA. I have created a converter

`const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const tz = require('zigbee-herdsman-converters/converters/toZigbee'); const exposes = require('zigbee-herdsman-converters/lib/exposes'); const reporting = require('zigbee-herdsman-converters/lib/reporting'); const extend = require('zigbee-herdsman-converters/lib/extend'); const e = exposes.presets; const ea = exposes.access;

const definition = { zigbeeModel: ['1402790', '1402791', '1402792', '1402793', '1402794', '1402795', '1402796', '1402797', '1402798'], model: '1402790', vendor: 'Namron', description: 'Namron Stove Guard', fromZigbee: [fz.on_off, fz.battery, fz.temperature, fz.metering, fz.electrical_measurement], toZigbee: [tz.on_off], exposes: [e.temperature(), e.battery(), e.switch(), e.power(), e.energy()], configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1) || device.getEndpoint(10); await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genOnOff', 'haElectricalMeasurement', 'genPowerCfg', 'msTemperatureMeasurement']); await endpoint.read('haElectricalMeasurement', ['acVoltageMultiplier', 'acVoltageDivisor']); await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']); await endpoint.read('haElectricalMeasurement', ['acCurrentMultiplier', 'acCurrentDivisor']); await reporting.onOff(endpoint); await reporting.temperature(endpoint); await reporting.activePower(endpoint); await reporting.batteryPercentageRemaining(endpoint); }, };

module.exports = definition;`

And it seems to be somewhat working. However, after a short while the device drops of the network. Did you do anything spesific to get the device not to stop reporting?

image

Torgrima commented 1 year ago

I got this zigbee api description for Namron Stoveguard: FireFence_Zigbee_description_rev1.2 – without OTA.pdf

sharknoms commented 10 months ago

I would also appreciate this one. Able to add but sensors and swich not working. Also disconnects after a few hours.

cbjornerud commented 9 months ago

I also use the Namron stoveguard in Home Assistant, with ZHA and a Sky connect. The last few days it has reacted strange when Home Assistant is restarted. The Stoveguard shut off and on the power many times until I disconnected it from power (turned off the fuse). I reported this to the supplyer elektroimportoren.no today. They replied that the device do not support Home Assistant and that I should disconnect it from my Zigbee network if the network caused it to behave like that. I tried to use Zigbee2MQTT instead, as I have two Zigbee netwoks to support all devices. That did not work at all. It is added to the network, but as unsupported and without updating any values. As a result of this it will be offline until it is better supported.

AtzeDeVries commented 4 months ago

@cbjornerud any updates here?

cbjornerud commented 4 months ago

@cbjornerud any updates here?

No, I have not done anything more with this. The stoveguard is stable as a stoveguard, that is the most important function. A smart stoveguard would be nice, but I have not spent any more time with this. Maybye later, in the winter. 🙂

Artur-Fedjukevits commented 2 months ago

@cbjornerud any updates here?

No, I have not done anything more with this. The stoveguard is stable as a stoveguard, that is the most important function. A smart stoveguard would be nice, but I have not spent any more time with this. Maybye later, in the winter. 🙂

I will wait that.

cbjornerud commented 2 months ago

Some news, but not good. I thought it was working fine in Home Assistant with ZHA, but after a week I came home to a stove without power. Pushing the button on the sensor of the Stove Guard did not turn the power back on. I then turned off the circuit breaker and back on again after about 10 second. The power came back to the stove, but then the Stove guard startet turing the power off and on again with only a few seconds on at a time. It did not stop until I turned off the circuit breaker and again. I will have to try to reset it and connect with Z2M again, but that will not be today.