Triggering a zigbee device

lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Triggering a zigbee device

Post by lazlohollyfeld »

Does anyone have any examples of triggering a zigbee device to do [something]?

I've got a bunch of leak sensors working and set-up, now I want to send an on or off message to a water valve.. The water valve is currently being read - just can't get it to do anything!

I've been trying different things and looked thru the board but can't seem to find any good examples..

thanks in advance!
tazswe
Posts: 211
Joined: Mon Mar 13, 2017 10:49 am
Location: Sweden

Re: Triggering a zigbee device

Post by tazswe »

How are you communicating with the zigbeedevices?

I use mqtt connector and mqttshims and it’s working great.


Sent from my iPad with Tapatalk
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Triggering a zigbee device

Post by lazlohollyfeld »

sorry - i thought that was obvious as I posted in this board :)

yes - reading is no problem - I have it all worked out with this MQTT plugin & shims.. Now I am trying to figure out how to send an action to a zigbee device... There are a lot of examples for reading from devices in this board - but I haven't been able to find anything for sending actions..

thanks!
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Triggering a zigbee device

Post by FlyingDiver »

Do you know the topic and payload you need to send to get the action you want?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
tazswe
Posts: 211
Joined: Mon Mar 13, 2017 10:49 am
Location: Sweden

Re: Triggering a zigbee device

Post by tazswe »

Image

As an exempel, this is my devicesettings for a simple power on/off device. If you get this right you can trigger it on and of like a normal device.

Image
This is how it looks in mqtt Explorer.

Not sure about the settings for your device but you can most probably find it here.

https://www.zigbee2mqtt.io/supported-devices/


Sent from my iPad with Tapatalk
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Triggering a zigbee device

Post by lazlohollyfeld »

thanks for the quick response!

No luck based on your example..

here is my setup - no problem reading the device - and I can trigger to open/close via the zigbee2mqtt app, so I know it works.. Do I need to modify any of the device/variable control settings in the broker device?
Attachments
example.jpg
example.jpg (428.27 KiB) Viewed 3287 times
tazswe
Posts: 211
Joined: Mon Mar 13, 2017 10:49 am
Location: Sweden

Re: Triggering a zigbee device

Post by tazswe »

Did you find your device here?

https://www.zigbee2mqtt.io/supported-devices/


Sent from my iPad with Tapatalk
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Triggering a zigbee device

Post by lazlohollyfeld »

Yes - no problems with reading it - only controlling it.

Here is my valve:
https://www.zigbee2mqtt.io/devices/TS01 ... 0111-valve

Thx
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Triggering a zigbee device

Post by FlyingDiver »

Clear the MQTT Explorer memory, sent the command to control the device from zigbee2mqtt, then show what Explorer sees.

Better yet, enable logging on the MQTT Connector and show the Indigo log.

We need to see EXACTLY what's getting sent to the device that's controlling it. That's very hard to do with MQTT Explorer.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Triggering a zigbee device

Post by lazlohollyfeld »

see attached screenshots - lmk if I missed anything..

re: Clear the MQTT Explorer memory
- i cleared the topic histories from the relevant devices - not sure if thats what you were looking-for...?

In order to test from indigo - i've been using the "Turn On" and "Turn Off" buttons on the device in indigo - assuming that's correct...

thanks!
Attachments
debug_log_2.png
debug_log_2.png (133.71 KiB) Viewed 3209 times
debug log.png
debug log.png (110.51 KiB) Viewed 3211 times
mqtt.jpg
mqtt.jpg (195.48 KiB) Viewed 3211 times
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Triggering a zigbee device

Post by FlyingDiver »

Cut and paste the log. Never do screen shots of the log.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Triggering a zigbee device

Post by FlyingDiver »

I thought you said you could control the device from the zigbee2mqtt app. I need to see the connector logs when you do that (not from the plugin). If that works.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Triggering a zigbee device

Post by lazlohollyfeld »

hopefully this is what you need -
I went into zigbee2mqtt,
opened the device
went to "exposes"
clicked on on/off

here is the log from indigo:

Code: Select all

Oct 31, 2022 at 1:34:06 PM
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload = {"linkquality":87,"state":"OFF"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":87,"state":"OFF"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":87,"state":"OFF"}
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload = OFF
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: OFF
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: OFF
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload = 87
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 87
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 87
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload = {"linkquality":90,"state":"OFF"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":90,"state":"OFF"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":90,"state":"OFF"}
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload = OFF
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: OFF
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: OFF
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload = 90
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 90
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 90
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload = {"linkquality":99,"state":"ON"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":99,"state":"ON"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":99,"state":"ON"}
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload = ON
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: ON
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: ON
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload = 99
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 99
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 99
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload = {"linkquality":99,"state":"ON"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":99,"state":"ON"}
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF, payload: {"linkquality":99,"state":"ON"}
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload = ON
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: ON
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state, payload: ON
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload = 99
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: processReceivedMessage: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 99
   MQTT Connector Debug            NEW Zigbee2MQTT Connection: Saved states, topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/linkquality, payload: 99
   MQTT Connector Debug            Receive Sav Water Sensor: type = topicMatch, broker = 1820104977
   MQTT Connector Debug            UTILITY_DEVICES: type = topicMatch, broker = 1820104977
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Triggering a zigbee device

Post by FlyingDiver »

Try setting up actions for the connector that has these settings:

Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state
payload = ON

and

Message topic: zigbee2mqtt/UTILITY_DEVICES/MAIN_WATER_SHUTOFF/state
payload = OFF

Do they control the device?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
lazlohollyfeld
Posts: 52
Joined: Mon Jan 09, 2012 10:37 pm

Re: Triggering a zigbee device

Post by lazlohollyfeld »

thanks a TON for your responsiveness - i'll have to do that tonight (some of us don't yet hold the distinction of "Retired Computer and Network Geek" :) )
Post Reply

Return to “MQTT”