Giter VIP home page Giter VIP logo

zigbee-herdsman-converters's Introduction

NPM

zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman.

Breaking changes

19.0.0

  • Legacy extend was removed

18.0.0

  • After converting a message with a fromZigbee converter, postProcessConvertedFromZigbeeMessage should be called now (for applying calibration/precision)

17.0.0

  • Various methods in index.ts are now async and return a Promise

15.0.0

  • OTA isUpdateAvailable now returns an object instead of a boolean (e.g. {available: true, currentFileVersion: 120, otaFileVersion: 125})
  • OTA updateToLatest now returns a number (fileVersion of the new OTA) instead of a void

Contributing

See Zigbee2MQTT how to support new devices.

Submitting a pull request

If you'd like to submit a pull request, you should run the following commands to ensure your changes will pass the tests:

npm install
npm run lint
npm run build
npm test

If any of those commands finish with an error your PR won't pass the tests and will likely be rejected.

zigbee-herdsman-converters's People

Contributors

airdrummingfool avatar arteck avatar asgothian avatar burki24 avatar burmistrzak avatar chartreusito avatar danieledwardgeorgehitchcock avatar drzony avatar fabianmangold avatar github-actions[bot] avatar hacker-cb avatar kirovilya avatar koenkk avatar mattl0 avatar mrskycriper avatar nukusinji avatar nurikk avatar otnow avatar owangen avatar pedrolamas avatar presslab-us avatar ptvoinfo avatar robertalexa avatar sjorge avatar smartboxchannel avatar thestigh avatar vladi1234 avatar vladyspavlov avatar z-x-f avatar zegl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zigbee-herdsman-converters's Issues

Rework of converters

Hi @Koenkk

I´m actually thinking about reworking the converters from one devices.js file to multiple per device files.

Due to the large number of issues which are opened again and again with the same problems:

e.g. Do I have a new device, how can I integrate it ?
e.g. How can I edit the file xyz ?
e.g. Multiple Converter for other devices but somehow different.
etc.
etc.

I have considered to revise the current state of converter.

Therefore I thought about the following structure:

per device a separate file e.g. vendor_model_ownedefinition.js

content per file:
the section for fromZigbee and toZigbee as well as the actual devices part
e.g.

{
        zigbeeModel: ['lumi.sensor_switch'],
        model: 'WXKG01LM',
        vendor: 'Xiaomi',
        description: 'MiJia wireless switch',
        supports: 'single, double, triple, quadruple, many, long, long_release click',
        fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG01LM_click, fz.ignore_onoff_change, fz.ignore_basic_change],
        toZigbee: [],
    },

so we have an own exact assignment for the converters for each model.
The advantage: Dynamic editing per model as well as simple adding of own models (e.g. with HASSIO).

I can take over the revision, but I need your help regarding the exports and the associated processing.

Maybe you would be interested to do this with me soon ?

Strange report from QBKG03LM wired wall switch

I got strange for me unhandled attReport from QBKG03LM wired wall switch (router):

"type":"attReport",
"endpoints":[
    {
        "device":{
            "_id":4,
            "type":"Router",
            "ieeeAddr":"0x00158d0001f4d992",
            "nwkAddr":29351,
            "manufId":4151,
            "manufName":"LUMI",
            "powerSource":"DC Source",
            "modelId":"lumi.ctrl_neutral2",
            "epList":[1,2,3,4,5,6,8],
            "status":"online",
            "joinTime":1528024933,
        },
        "profId":260,
        "epId":1,
        "devId":6,
    }
],
"data":{
    "cid":"genBasic",
        "data":{
            "65281":{
                "1":3300,
                "3":33,
                "5":14,
                "8":9746,
                "10":0,
                "100":0,
                "101":1,
                "110":0,
                "111":2,
                "153":0,
                "155":0
            }
        }
    }
}

What do you think it means?
Maybe it's someone's passing message? or an error in Shepherd?

May be as plug state? :

state: data['100'] === 1 ? 'ON' : 'OFF',
power: precisionRound(data['152'], 2),
voltage: precisionRound(data['150'] * 0.1, 1),
consumption: precisionRound(data['149'], 2),
temperature: precisionRound(data['3'], 2),

May be "1":3300 - is internal battery?

Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote

I got my hands on Airam LED OP A60 ZB 9W/827 E27+CTR.U BX-box which has ZB3.0 led bulb and a remote which talks directly to the bulb (no bridge required). I think I can get the bulb working (maybe with little guidance) with the instructions provided here but how about the remote? I'm under impression that group support is almost there - should I leave messing with the dimmer/remote for the future or could I get something to work with it before that?

These things will be the first ZB devices I even try to use with ZB2M and since they are not yet on supported devices list it seems like an interesting journey :)

Thanks for the good folks here putting this piece of software together!

[Vima Smart Lock] Successful unlock should clear keyerror

Current behavior

  • The xiaomi_lock_report converter returns keyerror: true upon failure to unlock the cylinder.
  • The xiaomi_lock_report converter DOES NOT return keyerror: false upon success to unlock the cylinder.
  • This causes zigbee2mqtt to cache keyerror as true forever. There's no way to revert it to the clean state (keyerror: false).

Expected behavior
The message returned by the converter upon successful unlock should include keyerror: false.

Add Support for tint-remote keys

Only 3 keys of the remotedo generate Messages. All others do not. The logfile has all keys pressed from up to down/left to Right.
Color-Keys seem to have cluster-ID 768, Scenes have cluster-ID 0.
The first part of the discussion and an Image of the device can be found here.

Koenkk/zigbee2mqtt#795

log4.txt

Thanks

ssIasZone enrollment

Currently, enrollment commands are all over devices.js and they look like this:

                (cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
                (cb) => device.functional('ssIasZone', 'enrollRsp', {
                    enrollrspcode: 1,
                    zoneid: 23,
                }, cb),

The issue is that this is not exactly correct. While it works in many cases, with two devices I'm attempting to write handlers for, it does not.

The correct process for enrollment is as follows:

  1. CIE sets iasCieAddr in ssIasZone on Zone Device.
  2. Zone Device responds with a devChange indicating the change has taken place.
  3. (optional) Zone Device sends an Enrollment request to the CIE
  4. CIE sends an Enrollment Response indicating zoneID

The issue with the way this is being handled currently is that we are not waiting for step 2. If the device, like mine, takes a particularly long time to set the IEEE address or there are network issues, then when step 4 occurs, the Zone Device does not regard the CIE as authoritative and therefore does not respond to the Enroll Response being sent.

I don't see an easy way to handle the "waiting" portion with the current infrastructure. I've tried something like this, but it doesn't seem to work.

    device_ssIasZone_devChange: {
      cid: 'ssIasZone',
      type: 'devChange',
      convert: (model, msg, publish, options) => {
        console.log("ssIasZone devChange",msg.data);
        if('iasCieAddr' in msg.data.data) {
          msg.endpoints.functional('ssIasZone', 'enrollRsp', {
                    enrollrspcode: 1,
                    zoneid: 23,
                }, (cb) => console.log(cb));
        }
      }

Battery percentage should be a number instead of string

All the other values are already numbers which makes perfect sense for the battery value as well (I also need that for exposing them to my prometheus instance)

10/26/2018, 10:37:08 PM - info: MQTT publish, topic: 'zigbee2mqtt/temperature_humidity_dressingroom', payload: '{"temperature":21.82,"linkquality":47,"device":{"ieeeAddr":"0x00158d000237e5ac","friendlyName":"temperature_humidity_dressingroom","type":"EndDevice","nwkAddr":64527,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.weather","status":"online"},"humidity":44.11,"pressure":983.66,"battery":"100.00","voltage":3085}'

Cannot read property '100' of undefined / xiaomi_contact

looks like it comes from
#108

/home/pi/zigbee2mqtt/node_modules/zigbee-shepherd-converters/converters/fromZigbee.js:406                                                                                                                           
            return {contact: msg.data.data['65281']['100'] === 0};                                                                                                                                                  
                                                   ^                                                                                                                                                                
                                                                                                                                                                                                                    
TypeError: Cannot read property '100' of undefined                                                                                                                                                                  
    at Object.convert (/home/pi/zigbee2mqtt/node_modules/zigbee-shepherd-converters/converters/fromZigbee.js:406:52)                                                                                                
    at converters.forEach (/home/pi/zigbee2mqtt/lib/controller.js:319:39)                                                                                                                                           
    at Array.forEach (<anonymous>)                                                                                                                                                                                  
    at Controller.handleZigbeeMessage (/home/pi/zigbee2mqtt/lib/controller.js:297:20)                                                                                                                               
    at Zigbee.handleMessage (/home/pi/zigbee2mqtt/lib/zigbee.js:172:18)                                                                                                                                             
    at emitOne (events.js:116:13)                                                                                                                                                                                   
    at ZShepherd.emit (events.js:211:7)                                                                                                                                                                             
    at ZShepherd.<anonymous> (/home/pi/zigbee2mqtt/node_modules/zigbee-shepherd/lib/shepherd.js:160:14)                                                                                                             
    at emitMany (events.js:147:13)                                                                                                                                                                                  
    at ZShepherd.emit (events.js:224:7)

Xiaomi/Honeywell smoke detector modelID 'undefined'

Hi!

Just got three Xiaomi smoke detectors and zigbee2mqtt says:
zigbee2mqtt:warn 2019-2-3 12:02:16 Device with modelID 'undefined' is not supported.

Still I get data from them:
zigbee2mqtt:info 2019-2-3 15:31:55 MQTT publish: topic 'zigbee2mqtt/0x00158d0002527271', payload '{"battery":100,"voltage":3235,"linkquality":128}'

Here is some info from the smokes:
zigbee2mqtt:info 2019-2-3 12:02:16 MQTT publish: topic 'homeassistant/sensor/0x00158d0002527271/battery/config', payload '{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/0x00158d0002527271","json_attributes_topic":"zigbee2mqtt/0x00158d0002527271","name":"0x00158d0002527271_battery","unique_id":"0x00158d0002527271_battery_zigbee2mqtt","device":{"identifiers":"zigbee2mqtt_0x00158d0002527271","name":"0x00158d0002527271","sw_version":"Zigbee2mqtt 1.1.0","model":"MiJia Honeywell smoke detector (JTYJ-GD-01LM/BW)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'

Error get 'setpoint_raise_lower' from eCozy device

When I want to get the value {"setpoint_raise_lower":""} from an eCozy device, zigbee2mqtt crashes with the following:

                    zclData: [{attrId: zclId.attr(cid, attrId).value}],
                                                              ^

TypeError: Cannot read property 'value' of undefined
    at Object.convert (/app/node_modules/zigbee-shepherd-converters/converters/toZigbee.js:572:63)
    at keys.forEach (/app/lib/extension/devicePublish.js:147:41)
    at Array.forEach (<anonymous>)
    at DevicePublish.onMQTTMessage (/app/lib/extension/devicePublish.js:139:14)
    at results.extensions.filter.map (/app/lib/controller.js:134:27)
    at Array.map (<anonymous>)
    at Controller.onMQTTMessage (/app/lib/controller.js:134:14)
    at MQTT.onMessage (/app/lib/mqtt.js:81:18)
    at emitThree (events.js:136:13)
    at MqttClient.emit (events.js:217:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.

new Version problem

after reinstalling the lib (to the new version 5.0.0) all my devices not work

DJT11LM bed_activity

When using the Xiaomi Vibration Sensor with the native Gateway, Vibration sensors report status (vibrate, tilt, freefall), coordination, and tilt angle, as they do with zigbee2mqtt. However, the also report bed_activity, which seems to be a number representing just how wiggly the thing was in the last minute.

This number is useful for knowing, for instance, if the bed was just briefly sat on, or if it is being jumped on. Also useful in measuring the vibration of appliances like a clothes dryer (did someone just slam the door, or is the dryer running? If running, is the load off balance causing more vibration than usual?).

My Clothes Dryer, which doesn't vibrate much at all, reports a number of 24, when someone opens or closes the door, and a number like 91 when it's running.

I'd be happy to change the code myself to pull this piece of data out of the return values, but I don't have any specs on how the data looks nor do I know how to get the data that was used to write the current implementation. Can you point me in the right direction?

FNB56-SKT1EHG1.2 as router

Hi,
I use the router capability of the FNB56-SKT1EHG1.2 around my Aqara sensors.
ioBroker detects the device when pairing and it also works as a router.
It does not appear as a device object node and has no states.
device_fnb56-sktehg1 2
zigbee netzwerk

I added it in devices.js from #198 on my PI and restarts the adapter, but nothing changed.
When I turn on the power, the following log message comes:
No converter available for 'HGZB-20-DE' with cid 'genOnOff' and type 'attReport'
Device 00158d000291e392 "FNB56-SKT1EHG1.2" not described in statesMapping.
Can anybody help me further?
Thanks

Improvement converter configuration

hi @Koenkk
we need some sort of replay action for failed converter configuration in single-steps.
sometimes it could be failed to do some bind or do write command on ias devices so we need to do it again to get them hopefully working.
instead insert every cb command as second ones in codeblock we should do it automatic.
if one cb give error message from any type we should do it minimally ones again, maybe so some of configurable variable could be help.

Add support for Philips Hue LCT016

There's a new model ID for the color A19 bulb. According to the Philips forum, it's directly equivalent to the LCT014 with no API changes

https://developers.meethue.com/content/model-lct016

I'm using the hassio component, so can't practically test this on my bulb, but I believe all that's needed is an addition to the zigbeeModel array of the 9290012573A entry in devices.js:490 , similar to #58

I can't find any evidence online that there's a LWB016 to go along with the LCT.

Visonic MCT-350 - IAS device

I inherited a handful of Visonic MCT-350 magnetic door sensors. In the US, they're used / sold as part of the Xfinity Home solutions. I'm new to zigbee, and have made some progress, but the IAS devices seem a bit more complicated.

I added a devices.js entry, and the 'base' configure: entries I'd seen for IAS items. This got me some progress.

The log is here: https://pastebin.com/wDpjX8cj We see the device sending some signals. statusChange with a zoneStatus of 32 is closed, and 33 is open. It also sends a report of batteryVoltage. What I'm not sure how to handle is that the message being received for those is of device 'undefined' and the ID there is the same as my coordinator.

Let me know if this is not the proper venue for this discussion.

Thanks!

New device: Philips Hue Bloom

I got a Philips Hue Bloom and tried to add it to zigbee2mqtt. The device supports brightness and rgb but no kelvin levels. I have added the following to devices.js.

    {
        zigbeeModel: ['LLC012'],
        model: '7299760PH',
        vendor: 'Philips',
        description: 'Hue Bloom',
        supports: generic.light_onoff_brightness_colorxy().supports,
        fromZigbee: generic.light_onoff_brightness_colorxy().fromZigbee,
        toZigbee: generic.light_onoff_brightness_colorxy().toZigbee,
    },

This seems to work however in Home-Assistant when changing kelvin levels instead of getting the closest rgb value I instead get the following in my zigbee2mqtt log:

ERROR No converter available for 'color_temp' (460)

Colors, brightness and on/off work fine.

Not sure what I'm doing wrong. I'm using the DEV branch of zigbee2mqtt.

Rework of the converters

Hi @Koenkk
Due to the large number of issues which are opened again and again with the same problems:

e.g. Do I have a new device, how can I integrate it ?
e.g. How can I edit the file xyz ?
e.g. Multiple Converter for other devices but somehow different.
etc.
etc.

I have considered to revise the current state of converter.

Therefore I thought about the following structure:

per device a separate file e.g. vendor_model_ownedefinition.js

content. the section for fromZ

the section for fromZigbee and toZigbee as well as the actual devices part
e.g.

{
        zigbeeModel: ['lumi.sensor_switch'],
        model: 'WXKG01LM',
        vendor: 'Xiaomi',
        description: 'MiJia wireless switch',
        supports: 'single, double, triple, quadruple, many, long, long_release click',
        fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG01LM_click, fz.ignore_onoff_change, fz.ignore_basic_change],
        toZigbee: [],
    },

so we have an own exact assignment for the converters for each model.
The advantage: Dynamic editing per model as well as simple adding of own models (e.g. with HASSIO).

I can take over the revision, but I need your help regarding the exports and the associated processing.

Maybe you would be interested to do this with me soon ?

Add another GledOpto device.

Just added this device:
https://www.aliexpress.com/item/GLEDOPTO-ZIGBEE-LED-10W-floodlight-RGB-CCT-warm-white-and-cool-white-zigbee-light-link-AC110/32957140430.html
Just added 'GL-FL-004TZ' to the first GledOpto device in the list. Works like a charm.

// Gledopto
{
    zigbeeModel: ['GLEDOPTO', 'GL-C-008', 'GL-C-007', 'GL-FL-004TZ'],
    model: 'GL-C-008',
    vendor: 'Gledopto',
    description: 'Zigbee LED controller RGB + CCT / RGBW / WWCW / Dimmer',
    extend: generic.light_onoff_brightness_colortemp_colorxy,
    ep: (device) => {
        if (device.epList.toString() === '11,12,13') {
            return {'': 12};
        } else if (device.epList.toString() === '10,11,13' || device.epList.toString() === '11,13') {
            return {'': 11};
        } else {
            return {};
        }
    },
},

FNB56-SKT1EHG1.2

Trying to get this 'Smart Socket' to work by myself but failing. I can receive the device status if I press the button on the socket but am failing due to mis-configuration or stupidity to send any commands to it. This is what I'm getting:

zigbee2mqtt:debug 2018-12-29 16:08:40 Received MQTT message on 'zigbee2mqtt/0x00158d0002a85038/set' with data '{"state":"on"}'
zigbee2mqtt:error 2018-12-29 16:08:40 No converter available for 'state' (on)

Pressing the manual on/off on the device generates:

zigbee2mqtt:debug 2018-12-29 16:13:42 Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'FNB56-SKT1EHG1.2' (0x00158d0002a85038)
zigbee2mqtt:info 2018-12-29 16:13:42 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a85038', payload: '{"state":"OFF","linkquality":120}'
zigbee2mqtt:debug 2018-12-29 16:13:42 Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'FNB56-SKT1EHG1.2' (0x00158d0002a85038)
zigbee2mqtt:debug 2018-12-29 16:13:44 Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'FNB56-SKT1EHG1.2' (0x00158d0002a85038)
zigbee2mqtt:info 2018-12-29 16:13:44 MQTT publish, topic: 'zigbee2mqtt/0x00158d0002a85038', payload: '{"state":"ON","linkquality":128}'
zigbee2mqtt:debug 2018-12-29 16:13:44 Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'FNB56-SKT1EHG1.2' (0x00158d0002a85038)

Using current versions of evices.js, fromZigbbe.js and toZigbee.js

Crashes when setting brightness (DEV branch)

For my GLEDOPTO RGB LED controller I switched to the dev branch. The strip now works (thanks again) but zigbee2mqtt crashed when I try to set a light's brightness. Turning it on and off works.

This is the output when running in debug mode:

zigbee2mqtt:debug 2018-11-28 21:01:20 Received MQTT message on 'zigbee/0x000b57fffed602e5/set' with data '{"brightness":119.85}'
/opt/zigbee2mqtt_dev/node_modules/zigbee-shepherd-converters/converters/toZigbee.js:65
                if (value.includes('%')) {
                          ^

TypeError: value.includes is not a function
    at Object.convert (/opt/zigbee2mqtt_dev/node_modules/zigbee-shepherd-converters/converters/toZigbee.js:65:27)
    at Object.keys.forEach (/opt/zigbee2mqtt_dev/lib/extension/devicePublish.js:119:41)
    at Array.forEach (<anonymous>)
    at DevicePublish.onMQTTMessage (/opt/zigbee2mqtt_dev/lib/extension/devicePublish.js:111:27)
    at results.extensions.filter.map (/opt/zigbee2mqtt_dev/lib/controller.js:121:27)
    at Array.map (<anonymous>)
    at Controller.onMQTTMessage (/opt/zigbee2mqtt_dev/lib/controller.js:121:14)
    at MQTT.onMessage (/opt/zigbee2mqtt_dev/lib/mqtt.js:81:18)
    at emitThree (events.js:136:13)
    at MqttClient.emit (events.js:217:7)

FNB56-ZSW01LX2.0 - 3A Zigbee switch (2 gang)

hi,
I thought I could figure it out how to edit the device.js myself. But I failed.

I bought the 3A Zigbee 3.0 Smart Switch FNB56-ZSW01LX2.0 (https://3asmarthome.com/smart-switches)

Here is what I put in the devices.js:

   // 3A Zigbee 3.0 Smart Switch
   {
        zigbeeModel: ['FNB56-ZSW01LX2.0'],
        model: 'FNB56-ZSW01LX2.0',
        description:
                'Zigbee 3.0 switch 2 gang ',
        vendor: '3A',
        supports: 'on/off',
        fromZigbee: [fz.ignore_onoff_change, fz.generic_state],
        toZigbee: [tz.on_off],
   },

An here is what I got when I pressed one of the switches:
https://pastebin.com/nsAg4cqq
(282 lines - that's why I used pastebin)

@Koenkk can you help me with my devices.js ?

Question: fromZigbee.js type 'devChange' vs. 'attReport'?

When trying to take first steps to implement support for ubisys J1 (window cover) devices, I noticed that I get identical notifications of type 'devChange' and 'attReport' whenever an attribute configured for reporting changes.

2/18/2019, 9:39:54 PM - warn: No converter available for 'J1' with cid 'closuresWindowCovering', type 'attReport' and data '{"cid":"closuresWindowCovering","data":{"currentPositionLiftPercentage":0}}'
2/18/2019, 9:39:54 PM - warn: No converter available for 'J1' with cid 'closuresWindowCovering', type 'devChange' and data '{"cid":"closuresWindowCovering","data":{"currentPositionLiftPercentage":0}}'

What is the difference between the two and which one would you suggest I implement (and probably ignore the other)?

Thanks,
Felix

Sengled E1A-AC2 downlights not parsing any data

My setup is Home Assistant, Mosquitto, zigbee2mqtt all running in Docker.

I also have 2x Sengled bulbs, a Hue lightbulb, a Xiaomi human body sensor which seem to connect correctly. It's just the 6 x Sengled downlights which are not parsing data correctly.

The Sengled downlights initially get picked up as E1A-AC2 and not supported:

2019-1-13 10:07:06 - warn: Message without device!
2019-1-13 10:07:06 - debug: Received zigbee message of type 'devIncoming' with data '"0xb0ce18140307a0e5"' of device 'E1A-AC2' (0xb0ce18140307a0e5)
2019-1-13 10:07:06 - info: Device incoming...
2019-1-13 10:07:06 - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
2019-1-13 10:07:06 - info: New device with address 0xb0ce18140307a0e5 connected!
2019-1-13 10:07:06 - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0xb0ce18140307a0e5"}'
2019-1-13 10:07:06 - warn: Device with modelID 'E1A-AC2' is not supported.
2019-1-13 10:07:06 - warn: Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html
2019-1-13 10:07:06 - debug: Received zigbee message of type 'devStatus' with data '"online"' of device 'E1A-AC2' (0xb0ce18140307a0e5)
2019-1-13 10:07:06 - warn: Device with modelID 'E1A-AC2' is not supported.
2019-1-13 10:07:06 - warn: Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html
2019-1-13 10:07:07 - debug: Received zigbee message of type 'devInterview' with data '"0xb0ce18140307b7ec"'

Following the instructions at https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html I add the following:

{
    zigbeeModel: ['E1A-AC2'],
    model: 'E1ACA4ABE38A',
    vendor: 'Sengled',
    description: 'Classic smart lighting downlight plus driver',
    supports: 'lights on off and brightness',
    fromZigbee: [],
    toZigbee: [],    
},

and then in the logs see the following:

Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object],
zigbee2mqtt:debug 2019-1-13 10:14:34 Received zigbee message of type 'devInterview' with data '"0xb0ce18140307b7ec"',
zigbee2mqtt:warn 2019-1-13 10:14:34 Message without device!,
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd Device: 0xb0ce18140307b7ec join the network.,
zigbee2mqtt:debug 2019-1-13 10:14:34 Received zigbee message of type 'devIncoming' with data '"0xb0ce18140307b7ec"' of device 'E1A-AC2' (0xb0ce18140307b7ec),
zigbee2mqtt:info 2019-1-13 10:14:34 Device incoming...,
zigbee2mqtt:info 2019-1-13 10:14:34 MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}',
zigbee2mqtt:debug 2019-1-13 10:14:34 Received zigbee message of type 'devStatus' with data '"online"' of device 'E1A-AC2' (0xb0ce18140307b7ec),

but don't see the the keyword: cid

Any ideas on how to progress? Many thanks.

FYI full log below:

2019-01-12T23:14:34.841Z serialport:unixRead waiting for readable because of code: EAGAIN,
2019-01-12T23:14:34.841Z serialport:poller Polling for "readable",
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object],
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:request REQ --> AF:dataRequest, transId: 44,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp:SREQ --> AF:dataRequest, { dstaddr: 6219, destendpoint: 1, srcendpoint: 1, clusterid: 2821, transid: 44, options: 48, radius: 30, len: 9, data: <Buffer 00 2c 00 1b 01 1c 01 1d 01> },
2019-01-12T23:14:34.843Z serialport:main _write 24 bytes of data,
2019-01-12T23:14:34.843Z serialport:bindings write 24 bytes,
2019-01-12T23:14:34.844Z serialport:unixWrite Starting write 24 bytes offset 0 bytesToWrite 24,
2019-01-12T23:14:34.844Z serialport:unixWrite write returned null 24,
2019-01-12T23:14:34.844Z serialport:unixWrite wrote 24 bytes,
2019-01-12T23:14:34.844Z serialport:unixWrite Finished writing 24 bytes,
2019-01-12T23:14:34.844Z serialport:main binding.write write finished,
2019-01-12T23:14:34.851Z serialport:poller received "readable",
2019-01-12T23:14:34.851Z serialport:bindings read,
2019-01-12T23:14:34.852Z serialport:unixRead Starting read,
2019-01-12T23:14:34.852Z serialport:unixRead Finished read 6 bytes,
2019-01-12T23:14:34.852Z serialport:main binding.read finished,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp { sof: 254,,�������,
,,
type: 'SRSP',,
subsys: 'AF',,
cmd: 'dataRequest',,
payload: { status: 0 },,
fcs: 100,,
csum: 100 },
2019-01-12T23:14:34.853Z serialport:main _read reading,
2019-01-12T23:14:34.854Z serialport:bindings read,
2019-01-12T23:14:34.854Z serialport:unixRead Starting read,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp:SRSP <-- AF:dataRequest, { status: 0 },
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:request RSP <-- AF:dataRequest, status: 0,
2019-01-12T23:14:34.855Z serialport:unixRead waiting for readable because of code: EAGAIN,
2019-01-12T23:14:34.855Z serialport:poller Polling for "readable",
2019-01-12T23:14:34.892Z serialport:poller received "readable",
2019-01-12T23:14:34.892Z serialport:bindings read,
2019-01-12T23:14:34.893Z serialport:unixRead Starting read,
2019-01-12T23:14:34.893Z serialport:unixRead Finished read 8 bytes,
2019-01-12T23:14:34.893Z serialport:main binding.read finished,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp { sof: 254,,�������,
,,
type: 'AREQ',,
subsys: 'AF',,
cmd: 'dataConfirm',,
payload: { status: 0, endpoint: 1, transid: 44 },,
fcs: 234,,
csum: 234 },
2019-01-12T23:14:34.895Z serialport:main _read reading,
2019-01-12T23:14:34.895Z serialport:bindings read,
2019-01-12T23:14:34.895Z serialport:unixRead Starting read,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp:AREQ <-- AF:dataConfirm, { status: 0, endpoint: 1, transid: 44 },
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: dataConfirm, msg: [object Object],
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:msgHdlr IND <-- AF:dataConfirm, transId: 44,
2019-01-12T23:14:34.896Z serialport:unixRead waiting for readable because of code: EAGAIN,
2019-01-12T23:14:34.896Z serialport:poller Polling for "readable",
2019-01-12T23:14:34.897Z serialport:poller received "readable",
2019-01-12T23:14:34.897Z serialport:bindings read,
2019-01-12T23:14:34.897Z serialport:unixRead Starting read,
2019-01-12T23:14:34.897Z serialport:unixRead Finished read 44 bytes,
2019-01-12T23:14:34.898Z serialport:main binding.read finished,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp { sof: 254,,
len: 39,,
type: 'AREQ',,
subsys: 'AF',,
cmd: 'incomingMsg',,
payload: ,
{ groupid: 0,,
clusterid: 2821,,
srcaddr: 6219,,
srcendpoint: 1,,
dstendpoint: 1,,
wasbroadcast: 0,,
linkquality: 28,,
securityuse: 0,,
timestamp: 11817334,,
transseqnumber: 0,,
len: 19,,
data: <Buffer 18 2c 01 1b 01 00 21 00 00 1c 01 00 20 ff 1d 01 00 28 b2> },,
fcs: 39,,�������
csum: 39 },
2019-01-12T23:14:34.903Z serialport:main _read reading,
2019-01-12T23:14:34.903Z serialport:bindings read,
2019-01-12T23:14:34.904Z serialport:unixRead Starting read,
Sat, 12 Jan 2019 23:14:34 GMT cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 2821, srcaddr: 6219, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 28, securityuse: 0, timestamp: 11817334, transseqnumber: 0, len: 19, data: <Buffer 18 2c 01 1b 01 00 21 00 00 1c 01 00 20 ff 1d 01 00 28 b2> },
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object],
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0,
2019-01-12T23:14:34.908Z serialport:unixRead waiting for readable because of code: EAGAIN,
2019-01-12T23:14:34.909Z serialport:poller Polling for "readable",
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object],
zigbee2mqtt:debug 2019-1-13 10:14:34 Received zigbee message of type 'devInterview' with data '"0xb0ce18140307b7ec"',
zigbee2mqtt:warn 2019-1-13 10:14:34 Message without device!,
Sat, 12 Jan 2019 23:14:34 GMT zigbee-shepherd Device: 0xb0ce18140307b7ec join the network.,
zigbee2mqtt:debug 2019-1-13 10:14:34 Received zigbee message of type 'devIncoming' with data '"0xb0ce18140307b7ec"' of device 'E1A-AC2' (0xb0ce18140307b7ec),
zigbee2mqtt:info 2019-1-13 10:14:34 Device incoming...,
zigbee2mqtt:info 2019-1-13 10:14:34 MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}',
zigbee2mqtt:debug 2019-1-13 10:14:34 Received zigbee message of type 'devStatus' with data '"online"' of device 'E1A-AC2' (0xb0ce18140307b7ec),
zigbee2mqtt:debug 2019-1-13 10:18:57 Saving state to file /app/data/state.json,
zigbee2mqtt:debug 2019-1-13 10:23:57 Saving state to file /app/data/state.json,
zigbee2mqtt:debug 2019-1-13 10:28:57 Saving state to file /app/data/state.json,
zigbee2mqtt:debug 2019-1-13 10:33:57 Saving state to file /app/data/state.json,
zigbee2mqtt:debug 2019-1-13 10:38:57 Saving state to file /app/data/state.json,
zigbee2mqtt:debug 2019-1-13 10:43:57 Saving state to file /app/data/state.json,

\u0000 delete all or not

many devices in devices.js have got a string \u0000..
can i delete it for all our Project devices or not ?? in order to clean up

osram mini switch

i have here a osram mini switch. with 3 buttons...
it works with #312

but i have here many hue bulbs connected with same cc2531 also.. the issue is the switch can on/of all connected hue bulbs without the program (zigbee2mqtt) is running..

any ideas ??

Osram lamp "is not supported" after upgrading zigbee2mqtt

Today I got a new Osram lamp (OSRAM SMART+ CLASSIC A 60 TW) and I upgraded my zigbee2mqtt version from 1.2 to 1.6 to because it was not supported in this version. After upgrading the version, my old Osram lamp (OSRAM LIGHTIFY LED CLA60 E27 RGBW) is now an unsupported device and it does not work anymore.

I am using the zigbee2mqtt version for docker.

Logs: https://pastebin.com/S6ZzBJkX

Error: zigbee2mqtt:warn 2018-9-27 20:31:48 Device with modelID '0x4d4152534f2057424752203036414c43' is not supported.

Any ideas? do you need more information?

edit: 0x4d4152534f2057424752203036414c43 means "MARSO WBGR 06ALC" in ascii (reverse order)

Seems to be the same issue: #Koenkk/zigbee2mqtt#388

edit2: got it fixed with rolling back to zigbee2mqtt version 0.1.3, has nothing to do with the shepherd converters.

Regards
Noah

Need help adding LTW011 Philips light

I added this to devices.js:

    {
        zigbeeModel: ['LCT002'],
        model: '9290002579A',
        vendor: 'Philips',
        description: 'Hue white and color ambiance BR30',
        supports: generic.light_onoff_brightness_colortemp_colorxy().supports,
        fromZigbee: generic.light_onoff_brightness_colortemp_colorxy().fromZigbee,
        toZigbee: generic.light_onoff_brightness_colortemp_colorxy().toZigbee,
    },

zigbee2mqtt succesfully adds it, however it's not getting displayed in home-assistant and I don't see it published in MQTT.fx

Xiaomi Aqara double wireless wall switch (WXKG02LM) has the wrong ID in devices.js

After pairing the WXKG02LM, any button action causes this in the log:

Device with modelID 'lumi.sensor_86sw2.es1' is not supported.

In devices.js we have:

'lumi.sensor_86sw2\u0000Un': {

But that should probably read:

'lumi.sensor_86sw2.es1': {

Same likely goes for the single key (WXKG03LM) which has lumi.sensor_86sw1\u0000lu. Not sure why we want unicode chars in here, but altering the file as mentioned above seems to work:

MQTT publish, topic: 'zigbee2mqtt/....', payload: '{"click":"left"}'
MQTT publish, topic: 'zigbee2mqtt/....', payload: '{"click":"right"}'

Samsung Smartthings Outlet support

So i'm trying to follow the docs on how to add support for this plug, and have got to the stage where I can see data in the log.

Feb 17 21:17:10 raspz2m npm[3792]: #33[34m zigbee2mqtt:debug#033[39m 2/17/2019, 9:17:10 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'outlet' (0x286d970001051d63)
Feb 17 21:17:10 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:10 PM No converter available for 'IM6001-OTP05' with cid 'genOnOff', type 'attReport' and data '{"cid":"genOnOff","data":{"onOff":1}}'
Feb 17 21:17:10 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:10 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Feb 17 21:17:10 raspz2m npm[3792]: #33[34m zigbee2mqtt:debug#033[39m 2/17/2019, 9:17:10 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'outlet' (0x286d970001051d63)
Feb 17 21:17:10 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:10 PM No converter available for 'IM6001-OTP05' with cid 'genOnOff', type 'devChange' and data '{"cid":"genOnOff","data":{"onOff":1}}'
Feb 17 21:17:10 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:10 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Feb 17 21:17:12 raspz2m npm[3792]: #33[34m zigbee2mqtt:debug#033[39m 2/17/2019, 9:17:12 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'outlet' (0x286d970001051d63)
Feb 17 21:17:12 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:12 PM No converter available for 'IM6001-OTP05' with cid 'genOnOff', type 'attReport' and data '{"cid":"genOnOff","data":{"onOff":0}}'
Feb 17 21:17:12 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:12 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Feb 17 21:17:13 raspz2m npm[3792]: #33[34m zigbee2mqtt:debug#033[39m 2/17/2019, 9:17:13 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'outlet' (0x286d970001051d63)
Feb 17 21:17:13 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:13 PM No converter available for 'IM6001-OTP05' with cid 'genOnOff', type 'devChange' and data '{"cid":"genOnOff","data":{"onOff":0}}'
Feb 17 21:17:13 raspz2m npm[3792]: #33[33m zigbee2mqtt:warn#033[39m 2/17/2019, 9:17:13 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.

I added this to the devices.js file:

{
    zigbeeModel: ['outlet'],
    model: 'IM6001-OTP05',
    vendor: 'Samsung',
    description: 'Smartthings Outlet',
    supports: 'on/off',
    fromZigbee: [],
    toZigbee: [],
    configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
                        const actions = [
                                                (cb) => device.bind('genOnOff', coordinator, cb),
                                                (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg,     cb),    
                                            ];    

                execute(device, actions, callback);
    },
},

but now stuck on what to add to toZigbee.js to control the device... status updates I think I figured out!

Support for Sylvania 74696 Bulb

Can you please add support for this bulb Sylvania 74696.
I will try to contribute in the future but need to get up to speed with GIT first.

{

    zigbeeModel: ['A19 W 10 year'],

    model: '74696',

    vendor: 'Sylvania',

    description: 'SMART+ LED soft white dimmable A19',

    supports: generic.light_onoff_brightness().supports,

    fromZigbee: generic.light_onoff_brightness().fromZigbee,

    toZigbee: generic.light_onoff_brightness().toZigbee,

},

[Vima Smart Lock] Key error events are not being converted

Current behavior
The xiaomi_lock_report converter is not currently converting Vima Smart Lock's key error events.

Expected behavior
Key error events should be converted and returned properly so that they can be consumed by upper layers (e.g.: in zigbee2mqtt).

Context
The key error event is supposed to be sent by this lock upon three different situations:

  1. The key was not properly inserted or someone is trying to lock pick the cylinder.
  2. The inserted key is not registered.
  3. The inserted key is registered but disabled from the Mi Home app.

Trust Contact Sensor (CSW_ADUROLIGHT) state is inverted?

Contact ON (meaning door closed):

Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":32}' of device 'CSW_ADUROLIGHT' (0x00158d0001cca9aa)
MQTT publish: topic 'zigbee2mqtt/0x00158d0001cca9aa', payload '{"contact":false,"linkquality":13}'

Contact OFF (door open):

Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":33}' of device 'CSW_ADUROLIGHT' (0x00158d0001cca9aa)
MQTT publish: topic 'zigbee2mqtt/0x00158d0001cca9aa', payload '{"contact":true,"linkquality":10}'

So this causes Home Assistant to tell that door is closed when it's open and other way around. I'm not sure how to invert the logic here.

Transition time leads to incorrect state info

After publishing a command to change color on a Philips Hue bulb with a transition time the bulb(?) or zigbee2mqtt(?) will quickly respond with the new settings. However the values represent the color at that exact moment during the transition, not the color after the full transition.
I suspect this is the behavior of the hue bulb, but I'm not sure. Is there any way to force/tickle/persuade the bulb or zigbee2mqtt to publish the correct values after the transition?
Otherwise the home automation software will keep thinking the color is somewhere between the old and the desired value.

Not sure if this is an issue for zigbee2mqtt, shepherd or shepherd-converters. Apologies if this is not the right place.

Heiman gas sensor H3SCG - support request

Hello, first of all, thanks for this great job.
I've recently bought [this]((https://www.aliexpress.com/item/HEIMAN-Home-Smart-Combustible-Gas-Detector-ZigBee-Mini-Natural-Gas-Detector-Alarm-for-Smart-Home-Security/32882579190.html) sensor

and I tried to configure it like Heiman SmokeSensor-N, which is in sheperd devices.js but with no luck.
I think I'm forgetting something obvious, but plese be patient, I'm a totally newbie

Thanks in advance
Andrea
ps I hope I used the right way to include the log files

Here is the log file:

`

[email protected] start /zigbee2mqtt-1.1.0
node index.js
zigbee2mqtt:info 2019-1-31 17:36:37 Logging to directory: '/share/zigbee2mqtt/log/2019-01-31.17-36-37'
zigbee2mqtt:debug 2019-1-31 17:36:37 Removing old log directory '/share/zigbee2mqtt/log/2019-01-27.15-47-24'
zigbee2mqtt:debug 2019-1-31 17:36:38 Using zigbee-shepherd with settings: '{"net":{"panId":6754,"channelList":[11],"precfgkey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]},"dbPath":"/share/zigbee2mqtt/database.db","sp":{"baudRate":115200,"rtscts":true}}'
zigbee2mqtt:debug 2019-1-31 17:36:38 Loaded state from file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 2019-1-31 17:36:38 Starting zigbee2mqtt version 1.1.0 (commit #unknown)
zigbee2mqtt:info 2019-1-31 17:36:38 Starting zigbee-shepherd
zigbee2mqtt:info 2019-1-31 17:36:40 zigbee-shepherd started
zigbee2mqtt:info 2019-1-31 17:36:40 Coordinator firmware version: '20180815'
zigbee2mqtt:debug 2019-1-31 17:36:40 zigbee-shepherd info: {"enabled":true,"net":{"state":"Coordinator","channel":11,"panId":"0x1a62","extPanId":"0xdddddddddddddddd","ieeeAddr":"0x00124b0018e1b298","nwkAddr":0},"firmware":{"transportrev":2,"product":0,"version":"2.6.3","revision":20180815},"startTime":1548952600,"joinTimeLeft":0}
zigbee2mqtt:info 2019-1-31 17:36:40 Currently 1 devices are joined:
zigbee2mqtt:info 2019-1-31 17:36:40 Gas Sensor (0x00158d0001deec28): unkown - undefined unknown (Router)
zigbee2mqtt:info 2019-1-31 17:36:40 Zigbee: disabling joining new devices.
zigbee2mqtt:info 2019-1-31 17:36:40 Connecting to MQTT server at mqtt://homeassistant
zigbee2mqtt:info 2019-1-31 17:36:41 zigbee-shepherd ready
zigbee2mqtt:debug 2019-1-31 17:36:41 Mounted the cieApp (epId 11)
zigbee2mqtt:info 2019-1-31 17:36:41 Connected to MQTT server
zigbee2mqtt:info 2019-1-31 17:36:41 MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
`

this is my devices.js
`
{

zigbeeModel: ["GASSensor-N"], // The model ID from: Device with modelID 'lumi.sens' is not supported.
model: "HS3CG", // Vendor model number, look on the device for a model number
vendor: "Heiman", // Vendor of the device (only used for documentation and startup logging)
description: "Heiman Combustible Gas Sensor", // Description of the device, copy from vendor site. (only used for documentation and startup logging)
supports: "Gas", // Actions this device supports (only used for documentation)
fromZigbee: [fz.heiman_gas],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
  const device = shepherd.find(ieeeAddr, 1);
  const actions = [
    (cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
    (cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
    ];

  execute(device, actions, callback, 1000);
},

}
and this is database.db
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018e1b298","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,11],"status":"online","joinTime":1548915999,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[0,1281,3],"outClusterList":[1280,1282,3],"clusters":{"genBasic":{"dir":{"value":1},"acls":{"zclVersion":"R","hwVersion":"R","manufacturerName":"R","modelId":"R","dateCode":"R","powerSource":"R","locationDesc":"RW","physicalEnv":"RW","deviceEnabled":"RW"},"attrs":{"zclVersion":1,"hwVersion":1,"manufacturerName":"sivann inc.","modelId":"hiver0001","dateCode":"20170407","powerSource":1,"locationDesc":" ","physicalEnv":0,"deviceEnabled":1}},"ssIasAce":{"dir":{"value":1}},"ssIasZone":{"dir":{"value":2},"cmdRsps":{"enrollReq":{"exec":"exec"},"statusChangeNotification":{"exec":"exec"}}},"ssIasWd":{"dir":{"value":2}},"genIdentify":{"dir":{"value":3},"acls":{"identifyTime":"RW"},"attrs":{"identifyTime":0}}}}},"_id":"C3iG1reA9lRCC7d8"}
{"id":2,"type":"Router","ieeeAddr":"0x00158d0001deec28","nwkAddr":4491,"manufId":4619,"manufName":"HEIMAN","powerSource":"Mains (single phase)","modelId":"GASSensor-N","epList":[1],"status":"offline","joinTime":null,"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280],"outClusterList":[25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"zclVersion":1,"appVersion":18,"stackVersion":2,"hwVersion":16,"manufacturerName":"HEIMAN","modelId":"GASSensor-N","dateCode":"2018.3.10","powerSource":1}},"genIdentify":{"dir":{"value":1},"attrs":{"identifyTime":0}},"genOta":{"dir":{"value":2},"attrs":{}},"ssIasZone":{"dir":{"value":1},"attrs":{"zoneState":0,"zoneType":43,"zoneStatus":32,"iasCieAddr":"0x0000000000000000","zoneId":255}}}}},"_id":"zyfYXK7CTY9kbcbH"}
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018e1b298","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6],"status":"online","joinTime":1548952599,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}}},"_id":"C3iG1reA9lRCC7d8"}
{"id":2,"type":"Router","ieeeAddr":"0x00158d0001deec28","nwkAddr":4491,"manufId":4619,"manufName":"HEIMAN","powerSource":"Mains (single phase)","modelId":"GASSensor-N","epList":[1],"status":"offline","joinTime":null,"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,3,1280],"outClusterList":[25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"zclVersion":1,"appVersion":18,"stackVersion":2,"hwVersion":16,"manufacturerName":"HEIMAN","modelId":"GASSensor-N","dateCode":"2018.3.10","powerSource":1}},"genIdentify":{"dir":{"value":1},"attrs":{"identifyTime":0}},"genOta":{"dir":{"value":2},"attrs":{}},"ssIasZone":{"dir":{"value":1},"attrs":{"zoneState":0,"zoneType":43,"zoneStatus":32,"iasCieAddr":"0x0000000000000000","zoneId":255}}}}},"_id":"zyfYXK7CTY9kbcbH"}
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0018e1b298","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,11],"status":"online","joinTime":1548952599,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[0,1281,3],"outClusterList":[1280,1282,3],"clusters":{"genBasic":{"dir":{"value":1},"acls":{"zclVersion":"R","hwVersion":"R","manufacturerName":"R","modelId":"R","dateCode":"R","powerSource":"R","locationDesc":"RW","physicalEnv":"RW","deviceEnabled":"RW"},"attrs":{"zclVersion":1,"hwVersion":1,"manufacturerName":"sivann inc.","modelId":"hiver0001","dateCode":"20170407","powerSource":1,"locationDesc":" ","physicalEnv":0,"deviceEnabled":1}},"ssIasAce":{"dir":{"value":1}},"ssIasZone":{"dir":{"value":2},"cmdRsps":{"enrollReq":{"exec":"exec"},"statusChangeNotification":{"exec":"exec"}}},"ssIasWd":{"dir":{"value":2}},"genIdentify":{"dir":{"value":3},"acls":{"identifyTime":"RW"},"attrs":{"identifyTime":0}}}}},"_id":"C3iG1reA9lRCC7d8"}
`

and configuration.yaml
advanced: log_level: debug devices: '0x00158d0001deec28': friendly_name: Gas Sensor retain: false homeassistant: true mqtt: base_topic: zigbee2mqtt password: my_password server: mqtt://homeassistant user: my_username zigbee_shepherd_devices: true permit_join: false serial: disable_led: true port: /dev/ttyACM0

Add support for Stelpro Orleans baseboard thermostat (ST218)

Hi

I have no clue as to how to do a PR to add something to GITHUB but for anyone interested, here is the changes I added to my device.js to get it to work:

const devices = [
// Stelpro Orleans baseboard thermostat
{
zigbeeModel: ['ST218'],
model: 'ST218',
vendor: 'Stelpro',
description: 'Baseboard integrated zigbee Thermostat ',
supports: 'temperature ',
fromZigbee: [
fz.thermostat_att_report, fz.thermostat_dev_change,
],
toZigbee: [
tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint,
tz.thermostat_pi_heating_demand,
],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 25);
const actions = [
(cb) => device.bind('genBasic', coordinator, cb),
(cb) => device.bind('genIdentify', coordinator, cb),
(cb) => device.bind('genGroups', coordinator, cb),
(cb) => device.bind('hvacThermostat', coordinator, cb),
(cb) => device.bind('hvacUserInterfaceCfg', coordinator, cb),
(cb) => device.bind('msTemperatureMeasurement', coordinator, cb),
(cb) => device.report('hvacThermostat', 'localTemp', 300, 3600, 0, cb),
];
execute(device, actions, callback);
},
},

as for the tozigbee.js and fromzigbee.js, I used the already existing ones and everything seems to work

Add support for Osram SMART+ Spot GU10 Multicolor bulbs

Apologies, couldn't work out how to do a pull request but here is the code for Osram SMART+ Spot GU10 Multicolor bulbs.

    {
        zigbeeModel: ['PAR 16 50 RGBW - LIGHTIFY'],
        model: 'AB35996',
        vendor: 'OSRAM',
        description: 'SMART+ Spot GU10 Multicolor',
        supports: generic.light_onoff_brightness_colortemp_colorxy().supports,
        fromZigbee: generic.light_onoff_brightness_colortemp_colorxy().fromZigbee,
        toZigbee: generic.light_onoff_brightness_colortemp_colorxy().toZigbee,
    },

Device connected but still not get the data for "fromZigbee"

I add support to new device, it is a wall switch from Hogar Controls. It is not an well know brand.
I follow this guide https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices but it stuck at fromZigbee step. I have successful add Xiaomi button WXKG12LM with this guide but not with this switch.
It not show any cid or type i have this log when zigbee-shepherd start:

2018-5-31 10:50:39 ERROR Cannot get the Node Descriptor of the Device: 0x000b57fffe69e05c (Error: request unsuccess: 17)

0x000b57fffe69e05c is the switch id has connected. An new log appear when i turn on or off a gang:

  serialport write 9 bytes of data +55s
  cc-znp:SRSP <-- ZDO:nodeDescReq, { status: 0 } +21ms
  cc-znp:AREQ <-- ZDO:srcRtgInd, { dstaddr: 15066, relaycount: 0, relaylist: <Buffer > } +3s
  zigbee-shepherd:msgHdlr IND <-- ZDO:srcRtgInd +3s
  zigbee-shepherd:request REQ --> ZDO:nodeDescReq +2s
  cc-znp:SREQ --> ZDO:nodeDescReq, { dstaddr: 37891, nwkaddrofinterest: 37891 } +2s 

Sengled E11-N1EA Color Gamut Issues (xy-color conversion)

Using zigbee2mqtt 1.1.1 in Hassio, Element Plus Color (A19) (E11-N1EA) bulbs (RGB) have a distorted/reduced color range as compared to the native Sengled hub/app, particularly towards red. I believe this is due to the xy-color values being computed by zigbee-shepherd-converters.

I've sniffed the packets sent by the Sengled hub for pure red, green, and blue (as best can be picked in the Sengled app.)

color: [red, green, blue]
zigbee2mqtt conversion: [{"x":0.701,"y":0.299}, {"x":0.172,"y":0.747}, {"x":0.136,"y":0.04}]
Sengled sniffed packets: [{"x":0.733,"y":0.264}, {"x":0.116,"y":0.818}, {"x":0.157,"y":0.019}]

Calling a light service in hassio with "xy_color" values outside of [x:0.136,0.701] and [y:0.04,0.747] results in MQTT published values scaled to within those bounds.

If someone could point me in the direction of the files to adjust for my Sengled only setup, and the logic to apply, I would appreciate it. (here perhaps?)

Otherwise, a way to manually set the xy color triangle limits for non-hue bulbs through zigbee2mqtt would be fantastic.

Please let me know if this better posted elsewhere.

Xiaomi Mija: Contact interval not supported

With Pull request 108
(b98428b)
there the xiaomi_contact_interval was introduced.

But this only works for Aqara sensors, not Mija sensors ...
So the change shopuld be rolled back ...
I will create a pull request fpr that ...

Add Support for Sylvania LIGHTIFY Contact and Temperature Smart Sensor

I'm running Hass.io, and since it's in Docker, I don't have access to the node_modules directory to finish the setup. Here's what I have, is this enough to add? Perhaps someone else has this device and can fill in the blanks.

Or, if you have suggestions on getting into node_modules on Hass.io I'll run through the rest of the steps.

Link to Sylvania LIGHTIFY Contact and Temperature Smart Sensor.

Image for docs.

{
    zigbeeModel: ['Contact Sensor-A'],
    model: '74388', 
    vendor: 'Sylvania',
    description: 'Sylvania LIGHTIFY Contact and Temperature Smart Sensor', 
    supports: 'contact and temperature',
    fromZigbee: [], // TBD
    toZigbee: [], // TBD
},

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.