Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zigbee2MQTT adventures
#1
First a little history. I started with Rabbitmqtt a long time ago so I know the concept of Brokers, publishers and subscribers. I even have a copy of the IBM Red Book on the subject. So I thought to myself this Zigbee2MQTT stuff should be a walk in the park. Then reality slapped me in the face.
I've also been running Zigbee/Xbee networking for quite a while using Digi Corps XBeeS2C Zigbee modules as coordinator, router and end devices. They work really well.
Then along comes Texas Instruments. Don't get me wrong, I like Texas Instruments. I live in Texas so I like to support them. But sometimes they do things in a funny way.
Back to Zigbee2MQTT. This is a powerful way of setting up a network. It works as a mesh so it is very realiable. There some gotchas though. One is that while it is a standard, not everyone follows the standard, so be warned "your mileage may vary" here. A good example is my Sylvania Lightify starter kit. It comes with two downlights and a hub. I've been really frustrated with Sylvania/Osram in getting the hub working. They do a lousy job of support. As to the lights, I discovered that the two I got in the kit were shipped with different software loads so one of them working with Zigbee2MQTT while the other doesn't.

The first thing you need to do is get yourself a cheap cc2531 usb. Make sure that it is a cc2351 and not a 2340. Also, be aware that it will come with the wrong software flashed in it. You have a couple of options to flash the new software. The least expensive of which is to solder four wires to the .5 mm pins of the board. Then plug the other end of the wires into your Raspberry Pi. You can download the programming code to your PI. It works very well. If there is interest I will post the URLs for these in another posting. You issue ./cc_chipid and it will reply with the id b524. If you get this it is working correctly. Then you issue ./cc_erase. You will also need to download the correct code to flash. Once you have that then you just issue the ./cc_write (with the code location). It will first program the cc2531 and then will verify. BIG CAUTION HERE. Mine did not verify. I wrote the flash but failed the verify. It took me quite a while to figure this out but I had the Zigbee2mqtt running as a deamon and that caused a conflict with the cc2351. So word to the wise is when flashing stop all deamons.

After that I was able to get the Zigbee2mqtt to pair with my Sylvania (Osram) light. I was even able to get the light to turn on and off from the command line.

There are two items that are your friend (as Raoul points out):

journalctl -flu mosquitto

journalctl -flu zigbee2mqtt@ttyACM0

These will show the activity, particularly the second one.
You should see something like this (from Raoul's system):

info  2020-01-16T17:29:51: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'

info  2020-01-16T17:29:51: MQTT publish: topic 'zigbee2mqtt/0x00158d0002580c77', payload '{"battery":100,"voltage":3035,"contact":true,"linkquality":26}'
info  2020-01-16T17:29:51: MQTT publish: topic 'zigbee2mqtt/0x00158d0002787325', payload '{"battery":86,"voltage":2975,"temperature":21.45,"humidity":36.87,"pressure":980.9,"linkquality":18}'
info  2020-01-16T17:29:51: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.7.1","commit":"unknown","coordinator":{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}},"log_level":"info
","permit_join":true}'

Once you have the first device to pair then you are well on your way......

One other piece of news is in talking with Raoul that now that the x86/64 version is working he is switching to get the V3 of raspberry pi image to support the Zigbee2mqtt. This will be a great piece of news for those who want to run the server on a PI.

Now that I have my Zigbee2mqtt running I'm working on actually controlling it from Calaos. I'm very happy to be at this point.

I really hope this helps others to get theirs going and promotes more interest in Calaos.


Cheers.
Glenn.
Reply
#2
Hi Gleen,
I'm interested by Zigbee2Mqtt for adding some sensors on my pool.
Is it possible to use a cc2652 usb stick in replacement of the cc2351 usb stick? It seems to be more efficient.
Thanks,
Fred
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)