Page 2 of 5

Re: Zigbee sensor instructions

PostPosted: Tue Feb 18, 2020 12:36 pm
by siclark
What do you need.

-zigbee usb stick. Goes without saying. CC2351 with antenna is best and simplest option.
-zigbee sensor. We are using Aqara / Xiaomi Mi sensors for now.
-machine to run the software. Can be a pi (including one that is running pibeacon) or your Mac.
Needs to be able to run current versions of node.js and npm which might rule out arm6 pi zeros.
-MQTT broker
-MQTT and Shims plugins

That's it (unless I'm corrected)

What makes it easier
- ZigBee sniffer and download cable. Let's you flash software from Linux or Windows. You can flash from a Pi without this cable but it means bending the pins. I've done 2 this way with no ill effects.
- node red to give graphical admin interface but you can use command line
- another ZigBee USB to act as a booster as the battery devices don't relay signals, nor will you hue bulbs
- a more powerful cc2350 board with antenna to act as a booster.
- wireless switches and buttons that seem to be cheaper than zwave ones.
- an eBay listing to sell your hue hub I don't intend to but you could. It would give you a more reliable mesh.
- other ZigBee bulbs


Switches and bulbs might not work with Shims so I'm intending to control those via Node-Red and indigo direct connectivity.

Instructions on that to follow

Re: Zigbee sensor instructions

PostPosted: Tue Feb 18, 2020 2:46 pm
by FlyingDiver
siclark wrote:
Switches and bulbs might not work with Shims so I'm intending to control those via Node-Red and indigo direct connectivity.


If you can control the switches and bulbs/dimmers with MQTT, then I can make it work with the Shims plugin. Just need the MQTT topics and payloads required.

Re: Zigbee sensor instructions

PostPosted: Tue Feb 18, 2020 3:19 pm
by siclark
Cool. Thanks.

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 11:35 am
by autolog
Just seeking some clarification on what triggers and shims I need to display the data from the following Aquara devices:
Code: Select all
zigbee2mqtt:info  2020-02-19 17:24:48: MQTT publish: topic 'zigbee2mqtt/Aquara_temp_2', payload '{"battery":100,"voltage":3055,"temperature":19.06,"humidity":92.07,"pressure":1009,"linkquality":134}'
zigbee2mqtt:info  2020-02-19 17:24:50: MQTT publish: topic 'zigbee2mqtt/Aquara_motion_1', payload '{"battery":100,"voltage":3025,"illuminance":10,"illuminance_lux":10,"linkquality":102,"occupancy":false}'
zigbee2mqtt:info  2020-02-19 17:26:24: MQTT publish: topic 'zigbee2mqtt/Aquara_temp_1', payload '{"battery":100,"voltage":3035,"temperature":18.32,"humidity":87.3,"pressure":1010,"linkquality":70}'
The above messages are being published by three of my Aquara devices. Do I need a separate trigger for each one or can I just have one for all messages with zigbee2mqtt in the topic?

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 11:36 am
by siclark
Just one trigger for all devices

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 11:38 am
by FlyingDiver
siclark wrote:
Just one trigger for all devices


Actually, no. You want one trigger for each distinct payload type. That way each (different) payload gets it's own message type. Otherwise the Shims plugin is trying to match the wrong payload for a device. You can make that work, but it's not efficient.

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 11:52 am
by siclark
Sorry. Good point. For now Jon is only doing one sensor with same payload for 3 indigo devices. That's what I meant by all devices, indigo ones.

but yes it's important to get it setup at the start so works for the next ZigBee device with a different payload.

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 11:55 am
by FlyingDiver
siclark wrote:
Sorry. Good point. For now Jon is only doing one sensor with same payload for 3 indigo devices. That's what I meant by all devices, indigo ones.

but yes it's important to get it setup at the start so works for the next ZigBee device with a different payload.


Actually, what he posted was two temp/humidity and one motion/illuminance sensors. Which is why I pointed it out.

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:02 pm
by autolog
Ok - Most now seems to be working other than the Occupancy state which isn't showing ON when the state is true. :?

I suspect I have done something wrong but can't see it for looking :wink: :
zigbee2mqtt_occupancy.png
Zigbee2MQTT Occupancy
zigbee2mqtt_occupancy.png (348.81 KiB) Viewed 3195 times

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:12 pm
by siclark
My mistake. Didn't realise he had been buying more toys!

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:14 pm
by FlyingDiver
autolog wrote:
Ok - Most now seems to be working other than the Occupancy state which isnty showing ON when the state is true. :?
I suspect I have done something wrong but can't see it for looking


That might be my fault. I'm looking at the code, and I think I messed up when I added the field to allow you to specify what the "On Value" should be. You're entering a string "true" put the payload actually has a boolean value in it (not a string).

Try leaving that field blank and see what happens.

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:17 pm
by siclark
Wow those motion sensors are smaller than they look and are crazily cheap

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:31 pm
by autolog
Hi Joe,
FlyingDiver wrote:
... Try leaving that field blank and see what happens.


Looks like that worked :D :
zigbee2mqtt_occupancy_ON.png
Zigbee2MQTT Occupancy ON
zigbee2mqtt_occupancy_ON.png (81.23 KiB) Viewed 3174 times
zigbee2mqtt_occupancy_OFF.png
Zigbee2MQTT Occupancy OFF
zigbee2mqtt_occupancy_OFF.png (81.04 KiB) Viewed 3174 times

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:32 pm
by autolog
siclark wrote:
My mistake. Didn't realise he had been buying more toys!

Yes indeed, I bought four more temperature sensors and one motion detector. :D

Re: Zigbee sensor instructions

PostPosted: Wed Feb 19, 2020 2:40 pm
by siclark
Great. I've Got the vibration sensor plus 2 types of switches coming. And more temp sensors.

The temp sensor connected via the booster stopped responding last night so woke to a super hot bedroom. I still need to play with that.