Introducing the Shims plugin

Posted on
Wed Feb 12, 2020 12:17 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: Introducing the Shims plugin

Hi, I am new to MQTT and struggling to get my first device setup in Shims.

Its an Aqara temp and humidity sensor and it publishes its payload like the attached from MQTT explorer , and I have set up my Shims device as per attached.

The broker devices shows its receiving the message but the Shims device is not updating. Is this to do with the format of the JSON, or likely my setup of the device.

Any pointers would be appreciated.

Thanks

Simon .
Attachments
Screenshot 2020-02-12 at 18.15.04.png
Screenshot 2020-02-12 at 18.15.04.png (228.33 KiB) Viewed 807 times
Screenshot 2020-02-12 at 18.14.18.png
Screenshot 2020-02-12 at 18.14.18.png (83.06 KiB) Viewed 807 times

Posted on
Wed Feb 12, 2020 12:27 pm
FlyingDiver offline
User avatar
Posts: 4260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Introducing the Shims plugin

"Master" is the third field in the topic, so you need to change the "Topic Field" to 2.

If that still doesn't work, make sure you've got a trigger set up for that topic.

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

Posted on
Wed Feb 12, 2020 3:43 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: Introducing the Shims plugin

Cheers.. had tried 2 as well, and just changed to that, but no luck.

The trigger bit was where I was most confused. Yes I have one setup, but not entirely sure its correct. I only have trigger, no action set. I think thats correct? I have tried lots of combinations of Match strings here.
Attachments
Screenshot 2020-02-12 at 21.42.13.png
Screenshot 2020-02-12 at 21.42.13.png (121.58 KiB) Viewed 777 times

Posted on
Wed Feb 12, 2020 3:46 pm
FlyingDiver offline
User avatar
Posts: 4260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Introducing the Shims plugin

Your topic is 'zigbee2mqtt/Aqara/Master'. So you need:

Code: Select all
Match:  zigbee2mqtt
Match:  Aqara
Any:   
End:


You need a term in the list for each component of the topic, left to right --> top to bottom. Except you can skip trailing topic components using the 'End:' term.

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

Posted on
Wed Feb 12, 2020 4:02 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: Introducing the Shims plugin

Thanks... still no joy. How do I enter the End: terms. I only see Match or Any in the drop down?

Posted on
Wed Feb 12, 2020 4:06 pm
FlyingDiver offline
User avatar
Posts: 4260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Introducing the Shims plugin

siclark wrote:
Thanks... still no joy. How do I enter the End: terms. I only see Match or Any in the drop down?


Oops. That version was in pre-release state. I just updated the release version.

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

Posted on
Wed Feb 12, 2020 4:29 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: Introducing the Shims plugin

I dont see the End: option on the 0.1.3 version I just downloaded, but regardless , I have this working now.

Thanks, another amazing contribution the the Indigo world.

I now have a zigbee temp and humidity sensor reporting into Indigo via a zigbee USB stick on a Pi, talking to my MQTT broker on my NAS, to Indigo on the Mac, and reports in the blink of an eye!

I'll get a full write up done soon as this is a really easy (once you understand MQTT and Shims) setup that gives access to a new range of cheap sensors.

Posted on
Wed Feb 12, 2020 8:56 pm
cuhouse offline
Posts: 87
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Introducing the Shims plugin

siclark wrote:
I dont see the End: option on the 0.1.3 version I just downloaded.


I think you want to update the MQTT Connector Plugin to 0.3.2 to get the update for the “End” Completion.

Indigo 7.4, Catalina , Dedicated late 2014 Mac Mini, PowerLinc 2413U, Aeon Labs Gen 2 .

Posted on
Thu Feb 13, 2020 1:54 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: Introducing the Shims plugin

Good point, all working now.

What I dont seem to be able to work out is how to do the multi states, as it doesnt appear I have a dict in the payload json? Or is my lack of python knowledge showing?

Posted on
Thu Feb 13, 2020 1:57 pm
FlyingDiver offline
User avatar
Posts: 4260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Introducing the Shims plugin

siclark wrote:
Good point, all working now.

What I dont seem to be able to work out is how to do the multi states, as it doesnt appear I have a dict in the payload json? Or is my lack of python knowledge showing?


If there isn't a nested dict, then you can't do multi-states. There is an edge case where it might be useful to do multi-states with the top-level dict, but I didn't code it that way originally. I should do that one of these days.

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

Posted on
Thu Feb 13, 2020 2:20 pm
FlyingDiver offline
User avatar
Posts: 4260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Introducing the Shims plugin

Pre-release 0.2.0: https://github.com/FlyingDiver/Indigo-S ... /tag/0.2.0

Adds battery level support in Indigo UI
Adds multi-states support to all device types
Adds support for multi-states key at top level of message payload

If the payload looks like this:
Code: Select all
{ "battery":100, "voltage":3145, "temperature":24.95, "humidity":38.72, "pressure":1012, "linkquality":36}


Then putting a period (".") in the multi-states field will give you:
Attachments
Screen Shot 2020-02-13 at 3.22.21 PM.png
Screen Shot 2020-02-13 at 3.22.21 PM.png (90.59 KiB) Viewed 704 times

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

Posted on
Thu Feb 13, 2020 2:37 pm
siclark offline
Posts: 1333
Joined: Jun 13, 2017
Location: UK

Re: Introducing the Shims plugin

Awesome.. that works!

Posted on
Sat Feb 22, 2020 1:43 pm
FlyingDiver offline
User avatar
Posts: 4260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Introducing the Shims plugin

Pre-release 0.2.3: https://github.com/FlyingDiver/Indigo-S ... /tag/0.2.3

Added generic device (no state value).

Added capability to show energy usage in Indigo UI.
Energy UI (and now battery UI) are available for JSON payloads only.

Added info level logging of sent actions.

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

Posted on
Wed Apr 22, 2020 2:42 am
jaknudsen offline
User avatar
Posts: 25
Joined: Nov 16, 2015

Re: Introducing the Shims plugin

siclark wrote:
I have this working now.


May I ask how you got it to work? :) I believe I have set up Broker device, trigger and sensor devices correctly, but the sensor devices are not updating.

edit: Found it! I had a typo in the Topic Subscriptions settings of the Broker device :oops:

Posted on
Wed May 06, 2020 2:06 pm
shapa offline
Posts: 392
Joined: Sep 08, 2014
Location: Swindon

Re: Introducing the Shims plugin

Controlling sonoff device (tasmota), works fine.

But the device status in Indigo UI is not changing (always staying "off") and the last update is always "2000-01-01 00:00"

What I'm doing wrong? :)
Attachments
Screenshot 2020-05-06 at 21.05.44.png
Screenshot 2020-05-06 at 21.05.44.png (102.34 KiB) Viewed 196 times

Who is online

Users browsing this forum: No registered users and 1 guest