Ok I have gotten as far as I can on my own with https://github.com/valorekhov/node-ezsp-mqtt


#1

So I am trying to find a way to use zigbee with mqtt, hopefully with node-red and it looks like https://github.com/valorekhov/node-ezsp-mqtt might work I get the index.js to start and i get this output:

Network init result 0
Network ready
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Send command getNetworkParameters","time":"2018-06-10T18:46:07.574Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Sending: 004a2180faf37e","time":"2018-06-10T18:46:07.576Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Data frame: 0045b1b1c4beee7e","time":"2018-06-10T18:46:07.577Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Sending: 8160597e","time":"2018-06-10T18:46:07.578Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Application frame 25 (stackStatusHandler) received","time":"2018-06-10T18:46:07.579Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Data frame: 114aa180542b10cc13352ebb4ecb77b0944127abedce677302c19e937e0000","time":"2018-06-10T18:46:07.585Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Sending: 82503a7e","time":"2018-06-10T18:46:07.586Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Application frame 40 (getNetworkParameters) received","time":"2018-06-10T18:46:07.587Z","v":0}
{"name":"ezsp-mqtt","hostname":"raspberrypi","pid":6576,"level":30,"msg":"Ember Node Type: 1, EPAN ID: 0x9ee49e64a14a7e05, PAN ID: 0xf9e5","time":"2018-06-10T18:46:07.594Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Send command getEui64","time":"2018-06-10T18:46:07.595Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Sending: 124b218edac27e","time":"2018-06-10T18:46:07.597Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Data frame: 224ba18e258712bf59fb472522b07e","time":"2018-06-10T18:46:07.602Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Sending: 83401b7e","time":"2018-06-10T18:46:07.603Z","v":0}
{"name":"uart","hostname":"raspberrypi","pid":6576,"level":20,"msg":"Application frame 38 (getEui64) received","time":"2018-06-10T18:46:07.604Z","v":0}
{"name":"ezsp-mqtt","hostname":"raspberrypi","pid":6576,"level":30,"msg":"Gateway Topic: raw/zbmq/000d6f000d07ad71","time":"2018-06-10T18:46:07.607Z","v":0}
{"name":"ezsp-mqtt","hostname":"raspberrypi","pid":6576,"level":30,"msg":"Started!","time":"2018-06-10T18:46:07.930Z","v":0}

But I am not sure how to start sending commands to it to test. I know I am stumbling around but I think I am the right track. anyone have a suggestion which way to go?


#2

So I finally got it to add a node (hue light) it worked like a charm once I wrapped my head around publishin the right commands. Can any mqtt guru out there help me figure out how publish on/off commands for starters.


#3

In case anyone was interested in the author answer…


#4

Update in case anyone else is trying this…
I was having the same difficulty as @vizonyc attempting to control a Sengled Element bulb. This bulb responds to commands in the same way as Philips Hue bulbs. Using the response from @valorekhov and piecing together information from the referenced EZSP specs in the readme for node-ezsp I was able to successfully turn on and off my bulb.

My working JSON strings:

Toggle:
{ "apsFrame": { "clusterId": 6, "id": 1, "profileId": 260, "sourceEndpoint": 232, "destinationEndpoint": 1 }, "message": { "type": "Buffer", "data": [ 1, 0, 2, 0, 16 ] } }

ON:
{ "apsFrame": { "clusterId": 6, "id": 1, "profileId": 260, "sourceEndpoint": 232, "destinationEndpoint": 1 }, "message": { "type": "Buffer", "data": [ 1, 0, 1, 0, 16 ] } }

OFF:
{ "apsFrame": { "clusterId": 6, "id": 1, "profileId": 260, "sourceEndpoint": 232, "destinationEndpoint": 1 }, "message": { "type": "Buffer", "data": [ 1, 0, 0, 0, 16 ] } }

DIM: (“clusterId” changes to 8 here. The 254 value in the data buffer is the brightness, (0-254) is valid)
{ "apsFrame": { "clusterId": 8, "id": 1, "profileId": 260, "sourceEndpoint": 232, "destinationEndpoint": 1 }, "message": { "type": "Buffer", "data": [ 1, 0, 4, 254, 16, 0, 16 ] } }