In need of mqtt help

Posted on
Sat Jan 30, 2021 5:41 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

This is the event log from my Mosquitto serverImage


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 5:45 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

The mqtt trigger with I hope is correct settings.
No conditions and no actions. Shouldn’t there be an action?
Image


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 5:50 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

In need of mqtt help

Created 3 devices for the I3, one for each channel

Image

Image


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 5:59 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

I have created a trigger for the I3 like this with no conditions and just a simple action with a sound and a pushover notification.

Image


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 6:03 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

Finally I have restarted the server, Indigo and all plugins.
I have also temporary turned of the firewall while testing.

Made fresh instalments of everything.

What am I missing?


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 6:05 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: In need of mqtt help

I will try to help out if I can, I’m by no means an expert but have managed to get mine working. I’ll grab a coffee and look at your setup on my Mac.


Sent from my iPhone using Tapatalk

Posted on
Sat Jan 30, 2021 6:19 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

Grateful if you would like to compare your settings with mine.


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 6:22 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: In need of mqtt help

tazswe wrote:
The mqtt trigger with I hope is correct settings.
No conditions and no actions. Shouldn’t there be an action?
Image


Skickat från min iPad med Tapatalk

In your trigger you should have Message Type filled in with "shelly". Try this change.

Posted on
Sat Jan 30, 2021 6:42 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: In need of mqtt help

This summary is as much for my benefit as yours as I'm putting it in writing as to how I understand the process to be. If I've got it wrong then Aaron or Joe can correct me.
Create a connection to your Mosquitto server.
Use MQTT Connector for this. Input IP address to replicate the Shelly setting on the actual device you’re trying to connect to, e.g. 192.168.1.15:1883
Next create a trigger to act on the broker activity.
The trigger should connect to the broker mentioned above. Add, in this order,
• Select Match Type - Match. Match String as “shellies”
• Select Match Type “Any (wildcard)”
Select Queue message
Enter Message Type as “shelly” (this can be anything you choose but must be used in device that will be created next.)

Create new Shelly MQTT device, let’s go with the Shelly 1PM. The setup you have from one of your earlier messages looks correct. The key here is that the Message Type matches the Message Type from your trigger.
Now it might be worth selecting the option from Shelly MQTT plugin to discover Single Shelly - not sure how critical it is however it won't do any harm.
EDIT: Changed incorrect reference to adding Match "Any".
Last edited by Colly on Sat Jan 30, 2021 7:40 am, edited 2 times in total.

Posted on
Sat Jan 30, 2021 6:58 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

I have added shelly and restarted everything.

Still not working.


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 7:10 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: In need of mqtt help

Let's go back to the beginning again.
For your MQTT Connector do you see values being updated as per screenshot? This should continually update if working.
Once that is working then we should hopefully be able to progress all the way through. It can be frustrating as I've had plenty of head scratching moments in the past - we'll get there. :D
Attachments
Screenshot 2021-01-30 at 13.07.31.png
Screenshot 2021-01-30 at 13.07.31.png (21.4 KiB) Viewed 3107 times

Posted on
Sat Jan 30, 2021 7:26 am
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: In need of mqtt help

tazswe wrote:
The mqtt trigger with I hope is correct settings.
No conditions and no actions. Shouldn’t there be an action?
Image


Skickat från min iPad med Tapatalk


The "Match: Any" line is wrong. Delete it, then change the "Match Type" pop-up control that currently says "Match" so it says "Any", then add it. You'll end up with two lines:

Code: Select all
Match: shellies
Any:


Then you need at add something in the Message Type field. You used "Shelly" in the Shim configuration, so use that here. And there is an action, it's that check box. Read the fine print under it.

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

Posted on
Sat Jan 30, 2021 7:33 am
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: In need of mqtt help

Colly wrote:
The trigger should connect to the broker mentioned above. Add, in this order,
• Match “shellies”
• Match “any”
Select Queue message
Enter Message Type as “shelly” (this can be anything you choose but must be used in device that will be created next.)


You never match on the string "Any". The term Any is a "match type", of which there are three: "Match", "Any", and "End". "Match" is for a specific string in the topic, "Any" is for a wildcard position in the topic, and "End" causes the matching logic to stop scanning the topic. The "End" action is only needed in very specific circumstances where you need to match on some partial topic strings and not others.
Last edited by FlyingDiver on Sat Jan 30, 2021 7:34 am, edited 1 time in total.

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

Posted on
Sat Jan 30, 2021 7:34 am
tazswe offline
Posts: 211
Joined: Mar 13, 2017
Location: Sweden

Re: In need of mqtt help

Yes,

The change of any to Any(Wildcard) solved everything.

Thanks a lot Flying diver, Colly and Aaron for all the help.


Skickat från min iPad med Tapatalk

Posted on
Sat Jan 30, 2021 7:36 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: In need of mqtt help

Great. I should've spotted the incorrect reference to 'Any' (even though my setup is correct) - knew it would need an expert on the job..

Who is online

Users browsing this forum: No registered users and 3 guests