koenkk / zigbee2mqtt Goto Github PK
View Code? Open in Web Editor NEWZigbee π to MQTT bridge π, get rid of your proprietary Zigbee bridges π¨
Home Page: https://www.zigbee2mqtt.io
License: GNU General Public License v3.0
Zigbee π to MQTT bridge π, get rid of your proprietary Zigbee bridges π¨
Home Page: https://www.zigbee2mqtt.io
License: GNU General Public License v3.0
Hi there,
I'm using groups for my IKEA TrΓ₯dfri bulbs - will that be supported/work with this also?
another error that just popped up... this seems to happen after getting data from a xiaomi temp/humidity sensor WSDCGQ01LM
.
buffer.js:977
throw new RangeError('Index out of range');
^
RangeError: Index out of range
at checkOffset (buffer.js:977:11)
at Buffer.readUInt8 (buffer.js:1015:5)
at Object.zcl.header (/home/leigh/apps/zigbee2mqtt/node_modules/zcl-packet/lib/zcl.js:73:24)
at Object.header (/home/leigh/apps/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/zcl.js:10:32)
at dispatchIncomingMsg (/home/leigh/apps/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:631:29)
at Controller.incomingMsgHandler (/home/leigh/apps/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:714:12)
at emitOne (events.js:116:13)
at Controller.emit (events.js:211:7)
at Object.bridge._areqEventBridge (/home/leigh/apps/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/event_bridge.js:15:16)
at CcZnp.<anonymous> (/home/leigh/apps/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:98:16)
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/leigh/.npm/_logs/2018-05-12T03_54_07_130Z-debug.log
SengLED 5000K zigbee bulb
Phillip Hue Color bulb
Hey Koenkk,
I see your List of "Planned to Supported Devices" , maybe you will find some of the Resolving at these cool File https://github.com/kirovilya/ioBroker.zigbee/blob/master/main.js
The Cool Guy included the
"MFKZQ01LM Xiaomi Magic Cube Controller (shake, slide, flip90, flip180, tap, rotate, fall, wakeup, voltage)"
and
"JTYJ-GD-01LM/BW Xiaomi Smoke Alarm (detected, voltage)"
Another one for you :). This is the same LED1536G5 listed in supported devices, but mine is E12 type plug.
0 22:14:37 INFO New device joined the network!
0 22:14:37 INFO New device with address 0x000b57fffe2d9007 connected!
0 22:14:37 WARN Device with modelID 'TRADFRI bulb E12 WS opal 400lm' is not supported.
Really impressed with the progress from the original work of Andrew. I found a little error.
I previously paired devices to my dongle (with the Andrew version of the software). With the new fork when the program receives a message from an previuosly paired device it crashes, perhaps you can easily ctach this error.
2018-5-9 17:55:40 INFO MQTT publish, topic: 'zigbee2mqtt/sensorWoonkamer', payload: '{"temperature":26.67,"humidity":49.44,"pressure":1002}'
spinlock: false []
/home/pi/zigbee2mqtt/node_modules/q/q.js:155
throw e;
^
Error: Unhandled "error" event. (Cannot get the Node Descriptor of the Device: 0x00158d00012434f4 (Error: Timed out after 10000 ms))
at ZShepherd.emit (events.js:186:19)
at /home/pi/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:609:28
at _rejected (/home/pi/zigbee2mqtt/node_modules/q/q.js:864:24)
at /home/pi/zigbee2mqtt/node_modules/q/q.js:890:30
at Promise.when (/home/pi/zigbee2mqtt/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/home/pi/zigbee2mqtt/node_modules/q/q.js:808:41)
at /home/pi/zigbee2mqtt/node_modules/q/q.js:624:44
at runSingle (/home/pi/zigbee2mqtt/node_modules/q/q.js:137:13)
at flush (/home/pi/zigbee2mqtt/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131: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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-05-09T17_56_21_421Z-debug.log
Please help extract shepherdSettings
in configuration.yaml
.
So far we need for the hassio addon to persist data for the following to change:
dbPath: `${__dirname}/../data/database.db`
I assume the same is true for the other setting if you have multiple CC2531:
net: {panId: 0x1a62}
The Wiki should contain a page with Informations about "how to debug".
btw. We should refer to the zigbee shepherd wiki: https://github.com/zigbeer/zigbee-shepherd/wiki#8-debug-messages
I have a motion sensor setup, however it rarely sends a occupancy:false. I currently have it pointing away from everything, so should not have any motion detections.
it is a Motion_Front_Yard (0x00158d00010e49cc): RTCGQ01LM - Xiaomi MiJia human body movement sensor
as you can see, it was true all over night, when we were all asleep. Any help would be appreciated.
devices:
'0x00158d00010e49cc':
friendly_name: 'Motion_Front_Yard'
occupancy_timeout: 30
retain: false
The CC2531 does not seem to have as good range as my Xiaomi hub.
Using same type of Xiaomi sensor (new generation reed switch sensor - MCCGQ11LM) I found that the CC2531 is failing to receive updates, where the Xiaomi does. Hub and CC sniffer are in same room ~1.5M apart. The reed sensors are in a room in floor below next to each other.
(Neither network has active/powered devices to act as repeater)
Is there any way to improve range?
I have the dongle on a USB extension to move it away from the metal of my VM server, but I think I can use a longer extension to get further away from the metal...
I can add powered device (e.g.) bulb as a repeater. Problem with this is that bulbs do get hard switched off sometimes. I dont have any zigbee sockets.
There are CC2531 devices with a RF front end and external antenna with supposedly higher range.
e.g. this one
But these cost more + less easy to program (need to solder header) + not sure if firmware is compatible with the RFX2401C PA chip
Anything else?
The power plug can also transmit current energy consumption. Is it possible to add this?
This timeout is now fixed to 3 minutes, it would be nicer if this could be overridden per device.
2018-5-6 18:51:11 WARN Device with modelID 'TRADFRI bulb E27 opal 1000lm' is not supported.
2018-5-6 18:51:11 WARN Please create an issue on https://github.com/Koenkk/zigbee2mqtt/issues to add support for your device
Please add to lib/devices.js
'TRADFRI bulb E27 opal 1000lm': {
model: 'LED1623G12',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E27 1000 lumen, dimmable',
supports: 'on/off, brightness',
homeassistant: [homeassistant.light_brightness_colortemp]
}
2018-5-6 18:52:13 INFO 0x000b57fffe3298aa (0x000b57fffe3298aa): LED1623G12 - IKEA TRADFRI LED bulb E27 1000 lumen, dimmable
I can't find how request current status of device...
For example, a temperature sensor sends a report when the values changed significantly, but i want it regularly (hourly, minutely). Like "heartbeat" with Xiaomi gateway.
Great work.
I am using mqtt discovery with home-assistant and I see that each device gets identified by its device id.
https://github.com/Koenkk/zigbee2mqtt/wiki/Integrating-with-Home-Assistant mentions "friendly name" for the mqtt topic. So I wonder, is there a way to give more meaningful names to the devices?
I am trying to pair a Xiaomi round switch with a newly create bridge, and have this error when i try to pair it. it's code majigga is WXKG01LM
Unfortunately it crashes the bridge :(
when setting pairing mode i get spinlock: false []
where as others have given me spinlock: true [ { func: [Function: func], ieeeAddr: '0x00158d00012568ae' } ]
or spinlock: true []
/home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:155
throw e;
^
Error: Unhandled "error" event. (Cannot get the Node Descriptor of the Device: 0x00158d0001256963 (Error: Timed out after 10000 ms))
at ZShepherd.emit (events.js:186:19)
at /home/leigh/apps/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:609:28
at _rejected (/home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:864:24)
at /home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:890:30
at Promise.when (/home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:808:41)
at /home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:624:44
at runSingle (/home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:137:13)
at flush (/home/leigh/apps/zigbee2mqtt/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131: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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/leigh/.npm/_logs/2018-05-12T03_44_42_166Z-debug.log
In case you have a defective device and want to disconnect it from your gateway, you need to run .remove for zigbee-shepard (https://github.com/zigbeer/zigbee-shepherd/wiki#removeieeeaddr-cfg-callback).
Ideal this would be an MQTT command that you can run.
Would it be possible to add support for the Sengled element classic series of lightbulbs? (They are a good low cost hue white alternative).
I hit the setup button on the back of the switch, and successfully paired the switch.
Pressing any button on the switch does nothing.
Interestingly, no light shows in the upper left corner on the device (like it usually does) when a button is pressed.
Is there additional support required in the sniffer firmware required to support this device? It would be great to be able to drop the hue hub all together and use my own home grown solution.
Below is the addition to the devices.js file:
{
'RWL020': {
model: '324131092621',
vendor: 'Philips',
description: 'Hue Dimmer Switch',
supports: 'single, double, triple, quadruple, many and long click',
homeassistant: [homeassistant.sensor_click]
}
}
This:
https://www.home-assistant.io/docs/mqtt/discovery/
Can be seamlessly integrated instead of the wiki page, no ?
Read battery status of devices and report to MQTT.
Hi its not really an Issue.
But i will tell you that your repo is mentioned at a great Blog :
It will be very useful to capture crash messages and all console output to a log file. It will help to diagnose problems with new functionality on headless systems or if the script works in the service mode.
Hi, Koen!
We are both developing the subject of Zigbee-devices (Xiaomi and other), so I propose to combine our experience.
You do the mqtt-version, and I'm the adapter for the ioBroker. But both these decisions use NodeJS and Zigbee-Shepherd library.
Therefore, I propose to create a common library of device and parsers for further use in your and my applications. This library should depend only on the zigbee-shepherd, handle the zigbee events, and generate processed events.
I am accustomed to your approach to the architecture of parsers (unlike my single file) - I suggest taking this as a basis.
I think this is an excuse not to do double work and not to copy the code from the library to the library.
What can you say about this?
p.s. Sorry for my English
It's important to be able to log everything to a file
I think this addon is great and deserves to be integrated into homeassistant easier by becoming a hassio addon.
I'm willing to help (first time doing addons) but instead of trying to copy your repo and hack it to make it work, I thought it's best to ask :)
I have already tried to make it a local addon by reusing some of the work you've been doing but so far haven't succeeded.
Things I've noticed so far:
Doing an addon with your config should be fairly straight forward by using a config similar to:
{
"name": "zigbee2mqtt",
"version": "1",
"slug": "zigbee2mqtt",
"description": "zigbee2mqtt addon",
"url": "https://github.com/Koenkk/zigbee2mqtt",
"startup": "before",
"boot": "auto",
"devices": ["/dev/ttyACM0:/dev/ttyACM0:rwm"],
"options": {
"mqtt_host": "mqtt://localhost"
},
"schema": {
"mqtt_host": "str"
}
}
Note: I will keep trying to start it as local addon to see if I encounter other blockers.
Examples of addon repos: https://github.com/hassio-addons/addon-homebridge
Is it possible to add the Lutron Connected Bulb Remote? It is a 4-button ZLL dimmer.
It's a bit of an odd device, as it is generally paired to the bulbs directly rather than the hub. The 4 buttons connect directly to bulbs to do the following:
Ideally, zigbee2mqtt would be able to read the commands directly, so that I could use them as plain old button controllers.
Before I buy a bunch of ZigBee hardware from China to test this, are there any caveats I should be aware of?
We have a topic with the state of the gateway but we miss a topic per device with the state of the device.
This is important to know if a device has become disconnected/powerer_off/removed
In this issue I will capture the steps taken in order to implement support for the Hue motion sensor. Both for myself and the community in order to learn.
Step1: Pairing the sensor
The sensor was previously paired to the Hue bridge. After pressing the setup button at the back for 1 second the led on the device flashed green and orange. After 30 seconds it was sucessfully paired.
the following message was displayed.
2018-5-19 10:15:22 WARN Device with modelID 'SML001' is not supported.
2018-5-19 10:15:22 WARN Please create an issue on https://github.com/Koenkk/zigbee2mqtt/issues to add support for your device
2018-5-19 10:15:22 WARN Device with modelID 'SML001' is not supported.
2018-5-19 10:15:22 WARN Please create an issue on https://github.com/Koenkk/zigbee2mqtt/issues to add support for your device
Next step adding it to lib/devices.js
To be continued
Hello @Koenkk ,
Thanks for all your great work.
I am having some issues running the code in docker, My setup is using Libreelec (Kodi) with the docker addon. Had to go via this route, as I am having an issue with range and instead of trying to get a new Pi, I may as well maximise the Pis with Kodi in the other rooms; then just buy a new sniffer.
I get the following error when I try to run the code
#docker -H 0.0.0.0:2375 run -it -v $(pwd)/.config/share/data:/app/data --device=/dev/ttyAMA0 koenkk/zigbee2mqtt:arm32v6
Using '/app/data' as data directory
> [email protected] start /app
> node index.js
2018-5-22 05:43:06 INFO Starting zigbee-shepherd
2018-5-22 05:43:09 ERROR Error while starting zigbee-shepherd!
2018-5-22 05:43:09 ERROR Failed to start
^C2018-5-22 05:43:19 ERROR Not connected to MQTT server!
2018-5-22 05:43:19 ERROR Cannot send message: topic: 'zigbee2mqtt/bridge/state', payload: 'offline
2018-5-22 05:43:19 INFO zigbee-shepherd stopped
It seems not to be connecting to my mqtt broker, which I have setup in the configuration.yaml
file. I am sure that mqtt configuration is right, as I have used it in another setup, which is not based on using the docker.
Please I need help in pointing me to the logs so I can see what exactly the issue is. The logs in the /data
directory says the same above, so doesn't help. I need to know if its an authentication issue (which I doubt), or network or something.
Though looking at the solution based on using the CC2530 based Zigbee coordinator and router, but still will be nice to just get a solution on this one.
Thanks and kind regards
Error:
2018-5-10 11:59:48 INFO Zigbee: allowing new devices to join.
spinlock: false []
/home/user/zigbee2mqtt/node_modules/q/q.js:155
throw e;
^
Error: Unhandled "error" event. (Cannot get the Node Descriptor of the Device: 0x00158d000110828c)
at ZShepherd.emit (events.js:185:19)
at /home/user/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:609:28
at _rejected (/home/user/zigbee2mqtt/node_modules/q/q.js:864:24)
at /home/user/zigbee2mqtt/node_modules/q/q.js:890:30
at Promise.when (/home/user/zigbee2mqtt/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/home/user/zigbee2mqtt/node_modules/q/q.js:808:41)
at /home/user/zigbee2mqtt/node_modules/q/q.js:624:44
at runSingle (/home/user/zigbee2mqtt/node_modules/q/q.js:137:13)
at flush (/home/user/zigbee2mqtt/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131: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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-05-10T09_03_52_289Z-debug.log
Debug:
0 info it worked if it ends with ok
1 verbose cli [ '/home/user/.nvm/versions/node/v8.8.1/bin/node',
1 verbose cli '/home/user/.nvm/versions/node/v8.8.1/bin/npm',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /home/user/.nvm/versions/node/v8.8.1/lib/node_modules/npm/bin/node-gyp-bin:/home/user/zigbee2mqtt/node_modules/.bin:/home/user/.nvm/versions/node/v8.8.1/bin:/usr/local/sbin:/usr/local/bin:/usr/local/apache-maven/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/go/bin:/home/user/esp/xtensa-esp32-elf/bin
9 verbose lifecycle [email protected]~start: CWD: /home/user/zigbee2mqtt
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/user/.nvm/versions/node/v8.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (/home/user/.nvm/versions/node/v8.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/user/zigbee2mqtt
16 verbose Darwin 17.5.0
17 verbose argv "/home/user/.nvm/versions/node/v8.8.1/bin/node" "/home/user/.nvm/versions/node/v8.8.1/bin/npm" "start"
18 verbose node v8.8.1
19 verbose npm v5.4.2
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node index.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Seems this is related to timeouts during connection. I had this happen on the cube a couple of times. If I keep pressing "link" button during connection it gets through.
Thank you for this project, just getting started with your Docker container.
I have the Ikea Tradfri LED1623G12 model bulb, but in E26 plug.
0 19:30:00 INFO New device with address 0x000b57fffe2f1df7 connected!
0 19:30:00 WARN Device with modelID 'TRADFRI bulb E26 opal 1000lm' is not supported.
Seems this would be a simple addition, but I am not sure how to edit the device files with the Docker container. Can you advise how best to do this with Docker? Can the needed files be written to a volume so that I can edit them?
Hello I tried to add a Osram smart plug. I tried to folow the description here
https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices
, but I couldn't find the node_modules/zigbee-shepherd-converters/devices.js I have only one folder with node_modules/zigbee-shepherd but whitout a device.js
But does with the native gateway: https://www.youtube.com/watch?time_continue=149&v=8yGm2vH8HYQ
It would be great if we could also update our Ikea Products.
I am currently experimenting with the update file(s).
To download this files, you only need to parse a simple json file:
http://fw.ota.homesmart.ikea.net/feed/version_info.json
name and fw_binary_url could be simple extract.
We now need a way to transfer the data.
I got this working by adding the following to device.js
'MZ100': {
model: 'MZ100',
vendor: 'Wemo',
description: 'Belkin WeMo Smart LED Bulb 800 lumen, dimmable',
supports: 'on/off, brightness',
homeassistant: [homeassistant.light_brightness]
},
It shows in HomeAssistant and I'm able to control it, but I still get these messages:
Zigbee publish to '0x94103ef6bf428aad', genOnOff - on - {} - 1
Zigbee publish to '0x94103ef6bf428aad', genLevelCtrl - moveToLevel - {"level":6,"transtime":0} - 1
MQTT publish, topic: 'zigbee2mqtt/0x94103ef6bf428aad', payload: '{"state":"ON"}'
No converter available for 'MZ100' with cid 'genLevelCtrl' and type 'devChange'
Please create an issue on https://github.com/Koenkk/zigbee2mqtt/issues with this message.
Zigbee publish to '0x94103ef6bf428aad', genOnOff - off - {} - 1
MQTT publish, topic: 'zigbee2mqtt/0x94103ef6bf428aad', payload: '{"state":"OFF"}'
No converter available for 'MZ100' with cid 'genOnOff' and type 'devChange'
Please create an issue on https://github.com/Koenkk/zigbee2mqtt/issues with this message.
Hi, great to see renewed interest in this project. The old project I could install quite easily. However, I'm running into issue with this version. See below dump.
npm version = 6.0.0
Node version = 8.11.1
Could you please help?
pi@raspberrypi:~/zigbee2mqtt` $ npm start
> [email protected] start /home/pi/zigbee2mqtt
> node index.js
/home/pi/zigbee2mqtt/node_modules/serialport/node_modules/bindings/bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
β /home/pi/zigbee2mqtt/node_modules/serialport/build/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/build/Debug/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/build/Release/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/out/Debug/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/Debug/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/out/Release/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/Release/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/build/default/serialport.node
β /home/pi/zigbee2mqtt/node_modules/serialport/compiled/8.11.1/linux/arm/serialport.node
at bindings (/home/pi/zigbee2mqtt/node_modules/serialport/node_modules/bindings/bindings.js:88:9)
at Object.<anonymous> (/home/pi/zigbee2mqtt/node_modules/serialport/lib/bindings.js:3:35)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/pi/zigbee2mqtt/node_modules/serialport/lib/serialport.js:12:25)
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-05-09T09_55_35_050Z-debug.log
`
I have a worning come up that i don't know what to do with:
2018-5-12 11:58:25 WARN No converter available for 'WXKG02LM' with cid 'genBasic' and type 'attReport'
2018-5-12 11:58:25 WARN Please create an issue on https://github.com/Koenkk/zigbee2mqtt/issues with this message.
this is for a double switch, which works for left
, right
and both
clicks. so not sure what this actually means!
I have tried to pair an Ikea dimmer like this.
To be honest I was not expecting it to work as I understand that supporting this device is complex due to the way it works.
Nonetheless, here is the log from the crash:
`2018-5-17 19:39:29 INFO Zigbee: allowing new devices to join.
spinlock: false []
spinlock: true []
spinlock: true [ { func: [Function: func], ieeeAddr: '0x000b57fffe13a3ef' } ]
already in joinqueue
/app/node_modules/q/q.js:155
throw e;
^
Error: Unhandled "error" event. (Cannot get the Node Descriptor of the Device: 0x000b57fffe13a3ef (Error: Timed out after 10000 ms))
at ZShepherd.emit (events.js:186:19)
at /app/node_modules/zigbee-shepherd/lib/components/controller.js:609:28
at _rejected (/app/node_modules/q/q.js:864:24)
at /app/node_modules/q/q.js:890:30
at Promise.when (/app/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/app/node_modules/q/q.js:808:41)
at /app/node_modules/q/q.js:624:44
at runSingle (/app/node_modules/q/q.js:137:13)
at flush (/app/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131: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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-05-17T18_39_57_529Z-debug.log
`
The docs tell me how to support new devices but I'm not sure what to put into zigbee2mqtt.js
. How do I know that I need to put in msg.data.data['measuredValue']
- I guess it is not always msg.data.data['measuredValue']
.
Messages get merged on subsequent calls from same device. This is more of a problem for example on Xiaomi Cube where you can have rotate with two parameters (action and direction) vs normal actions where you have only one.
Update: I've noticed the action was moved to rotate_left/ rotate_right which makes more sense, but I do think that messages on MQTT should match what is received from device and not combine messages unless we always send all attributes.
Actual
2018-5-7 22:57:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fa5c9d', payload: '{"temperature":26.86}'
2018-5-7 22:57:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fa5c9d', payload: '{"temperature":26.86,"humidity":36.63}'
2018-5-7 22:57:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fa5c9d', payload: '{"temperature":26.86,"humidity":36.63,"pressure":970}'
Expected:
2018-5-7 22:57:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fa5c9d', payload: '{"temperature":26.86}'
2018-5-7 22:57:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fa5c9d', payload: '{"humidity":36.63}'
2018-5-7 22:57:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fa5c9d', payload: '{"pressure":970}'
This is currently a limitation of the firmware for the CC2531.
Some resources:
The following image is linked in the readme:
I guess a more detailed schematic looks like this?
[Generic MQTT gateway] <-> [Linux with zigbee2mqtt software] <-> [CC2531 dongle] <-> [Zigbee device 1-N]
My open questions are:
I think it would be a relief if we could also activate the permit_join via mqtt.
This would help if you use the system in combination with the appropriate smarthome system and use your zigbee2mqtt headless.
Another improvement could be the Intergration of QoS.
This would help if we prioritize different Type of Devices and their mqtt Data.
This extension should be configurable for every device themselve.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.