Zigbee sensor instructions

Posted on
Tue Feb 18, 2020 12:36 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

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

Posted on
Tue Feb 18, 2020 2:46 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Zigbee sensor instructions

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Feb 18, 2020 3:19 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

Cool. Thanks.

Posted on
Wed Feb 19, 2020 11:35 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Zigbee sensor instructions

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?

Posted on
Wed Feb 19, 2020 11:36 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

Just one trigger for all devices

Posted on
Wed Feb 19, 2020 11:38 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Zigbee sensor instructions

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Feb 19, 2020 11:52 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

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.

Posted on
Wed Feb 19, 2020 11:55 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Zigbee sensor instructions

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Feb 19, 2020 2:02 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Zigbee sensor instructions

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 3197 times
Last edited by autolog on Wed Feb 19, 2020 2:32 pm, edited 1 time in total.

Posted on
Wed Feb 19, 2020 2:12 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

My mistake. Didn't realise he had been buying more toys!

Posted on
Wed Feb 19, 2020 2:14 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Zigbee sensor instructions

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Feb 19, 2020 2:17 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

Wow those motion sensors are smaller than they look and are crazily cheap

Posted on
Wed Feb 19, 2020 2:31 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Zigbee sensor instructions

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 3176 times
zigbee2mqtt_occupancy_OFF.png
Zigbee2MQTT Occupancy OFF
zigbee2mqtt_occupancy_OFF.png (81.04 KiB) Viewed 3176 times

Posted on
Wed Feb 19, 2020 2:32 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Zigbee sensor instructions

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

Posted on
Wed Feb 19, 2020 2:40 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Zigbee sensor instructions

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.

Who is online

Users browsing this forum: No registered users and 9 guests

cron