GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Posted on
Sun Jun 17, 2018 1:54 am
jh71283 offline
Posts: 127
Joined: Jun 16, 2014

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

danowitz wrote:
I am also not able to get this working with Mosquitto on a raspberry pi.

Help!


Help us to help you. What errors are you getting?


Sent from my iPhone using Tapatalk

Posted on
Sun Jun 17, 2018 1:57 am
jh71283 offline
Posts: 127
Joined: Jun 16, 2014

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

BonfireVA wrote:
jh71283 wrote:
I'm working on the authentication bug now.


So I turned off authentication and enabled anonymous access on my broker (using mosquitto built into HASSIO). I still see that the plugin connects with no errors, but it does not seem to send or receive anything. I even tried a short test topic just incase my topics had to many characters, but still nothing. Has anyone got this to work with Mosquitto as their broker with no authentication?

-Eric


Sorry Eric I missed your reply.

I have been using mosquitto all along during development, but without authentication.

I’m actually finding it very fiddly to set up auth on mine, which is why debugging your issue is taking me so long! (Well, that and I only get a couple of hours a week to work on stuff like this lol)


Sent from my iPhone using Tapatalk

Posted on
Thu Jun 21, 2018 5:18 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Starting dead cold here, as I don't even know what MQTT means. But I get it's some sort of interface between devices using a web communication protocol.

My super broad question is: If I have some other device (specifically, a camera running the Xiomi hack software) , and that software includes MQTT functionality, can I potentially use this plugin to integrate the camera(s) with Indigo?

It seems the cameras do motion detection and such, and can supply this info via MQTT to SmartThings. I no longer user SmartThings, but can I skip that middleman with this plugin? There's a "._mqtt-status" and an "._mqtt-control" script configurable in the camera software.

This info is all I could find on integrating the cams with MQTT.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri Jun 22, 2018 12:06 am
editordz offline
Posts: 67
Joined: Dec 01, 2006
Location: Sherman Oaks, CA

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Please pardon my ignorance, I'm trying to get up to speed with this, starting cold. Can I trigger Indigo action groups from Smartthings/Google Home with this? Or just individual devices?

Thanks!
Dan

Posted on
Fri Jun 22, 2018 12:21 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

MQTT is a messaging protocol.

The broker manages the communications from clients and if desired other brokers.

A client creates a topic
A client publishes to that topic text
One or more clients Subscribe to that topic
Any client subscribed to that topic receives in real time the message published to that topic


So for Indigo,
The indigo MQTT client connects to the broker
The hardware device mqtt client connects to the broker and creates a topic such as /switch1/status
When on or off is published to that topic the subscribed device is turned on or off.

So for your camera you can probably integrate motion detection as thats a value that can be sent, but not images or files.

Hope that helps


Sent from my iPhone using Tapatalk

Posted on
Fri Jun 22, 2018 6:53 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Thanks for saving me hours of trying to figure out if I should try to figure it out! I get the idea that the broker would be a separate piece of software, right?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri Jun 22, 2018 7:04 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Correct.

The Broker is basically a "server" app that handles the communication between clients. Depending on how many clients are connected, depends what spec machine is required.

There are many versions of MQTT broker free out there. HiveMQ is a good place to start i think as it is already compiled and you dont have to mess with python versions on your mac, its java based and limited to 25 connections unless you pay but for a fast test, i find this the quickest. Mosquito is probably the widest used but you would have to compile it or install using brew (or a separate VM or PI or something if you don't want it on the same box)

4GB and 2 CPU with 40GB disk space can support about 50,000 clients as a rough estimate. This is based on OpenDXL which is based on MQTT which is actually why I know anything about MQTT at all :-)

Posted on
Sat Jun 23, 2018 3:55 pm
BonfireVA offline
Posts: 62
Joined: Sep 17, 2017

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

jh71283 wrote:
BonfireVA wrote:
jh71283 wrote:
I'm working on the authentication bug now.


So I turned off authentication and enabled anonymous access on my broker (using mosquitto built into HASSIO). I still see that the plugin connects with no errors, but it does not seem to send or receive anything. I even tried a short test topic just incase my topics had to many characters, but still nothing. Has anyone got this to work with Mosquitto as their broker with no authentication?

-Eric


Sorry Eric I missed your reply.

I have been using mosquitto all along during development, but without authentication.

I’m actually finding it very fiddly to set up auth on mine, which is why debugging your issue is taking me so long! (Well, that and I only get a couple of hours a week to work on stuff like this lol)


Sent from my iPhone using Tapatalk


No worries, I know how it goes :). I tried using mosquitto with no authentication running on the same Mac as Indigo instead of the mosquitto install on my raspberry pi, and I am still not getting any messages to send from Indigo. I can send a message using the terminal to the broker fine, but when I create a MQTT switch device, nothing shows up on the broker when I toggle the on and off buttons in Indigo. I feel like I am missing something simple since other people have got this to work, but I just cant see anything to set up differently.

-Eric

Posted on
Sun Jun 24, 2018 6:00 am
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Hi,

I´ve just updated to the newest version, and i cant get it to work. (it was working before with the 1.version)
My broker is working properly and i see the messages is going through, but no updates in indigo.

i dont have user/pass on my broker.
am i supposed to put something in the Superbridge pattern?

I see its subscribes to the topics ok in debug

Code: Select all
GreenSky MQTT Bridge Debug      Subscribing to AMS/tPi
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/tomorrow/23-00
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/today/15-16
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/tomorrow/05-06
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/today/13-14
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/today/00-01
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/tomorrow/Off-peak 1
   GreenSky MQTT Bridge Debug      Subscribing to indigo/devices/nordpool/price/today/Average
   GreenSky MQTT Bridge Debug      Subscribing to AMS/Q


but i also get this..
Code: Select all
 GreenSky MQTT Bridge Debug      Connected with result code 0

What does this mean?

no error warnings, so it seems like its working.. but as i said no messages in to indigo.

any help would be appreciated :)

Posted on
Sun Jun 24, 2018 6:11 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

BonfireVA wrote:
jh71283 wrote:
BonfireVA wrote:
jh71283 wrote:
I'm working on the authentication bug now.


So I turned off authentication and enabled anonymous access on my broker (using mosquitto built into HASSIO). I still see that the plugin connects with no errors, but it does not seem to send or receive anything. I even tried a short test topic just incase my topics had to many characters, but still nothing. Has anyone got this to work with Mosquitto as their broker with no authentication?

-Eric


Sorry Eric I missed your reply.

I have been using mosquitto all along during development, but without authentication.

I’m actually finding it very fiddly to set up auth on mine, which is why debugging your issue is taking me so long! (Well, that and I only get a couple of hours a week to work on stuff like this lol)


Sent from my iPhone using Tapatalk


No worries, I know how it goes :). I tried using mosquitto with no authentication running on the same Mac as Indigo instead of the mosquitto install on my raspberry pi, and I am still not getting any messages to send from Indigo. I can send a message using the terminal to the broker fine, but when I create a MQTT switch device, nothing shows up on the broker when I toggle the on and off buttons in Indigo. I feel like I am missing something simple since other people have got this to work, but I just cant see anything to set up differently.

-Eric



OK so i set up my device with:

STATE TOPIC: stat/sonoff_owl_lamp/POWER
COMMAND TOPIC: cmnd/sonoff_owl_lamp/power
ON PAYLOD: On
OFF PAYLOAD: Off
QOS: 0

I then fired up the application MQQT.fx on my mac, connected to my broker using MQTT.fx and subscribed to "#" (with out the quotes) which seems to be a wildcard for all topics.

From there i could see what topics changed by hitting "scan" on Topics Collector.

See if that gets you any further...

http://mqttfx.jensd.de

Posted on
Mon Jun 25, 2018 11:42 am
BonfireVA offline
Posts: 62
Joined: Sep 17, 2017

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

OK so i set up my device with:

STATE TOPIC: stat/sonoff_owl_lamp/POWER
COMMAND TOPIC: cmnd/sonoff_owl_lamp/power
ON PAYLOD: On
OFF PAYLOAD: Off
QOS: 0

I then fired up the application MQQT.fx on my mac, connected to my broker using MQTT.fx and subscribed to "#" (with out the quotes) which seems to be a wildcard for all topics.

From there i could see what topics changed by hitting "scan" on Topics Collector.

See if that gets you any further...

http://mqttfx.jensd.de[/quote]


I tried this early on, MQTT.FX does not see any messages being sent from Indigo. I tested both with a local MQTT broker and one on my Pi, both with and without authentication. In all four variations I do not see any messages being sent on any topic from the plugin (indigo). But if I manually send a message via the terminal, or from HASSIO it shows up in MQTT.FX so I know the broker is working properly.

Posted on
Mon Jun 25, 2018 11:49 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Hmm. That is weird. I wonder if the plugin is actually connecting to the broker then. In the connections in mqtt.fx is the count of clients what you would expect?
Try putting in a rubbish ip and restart the plugin, does it error? If not in lieu of debug logs id get Wireshark on the case and capture packets on 1883 as it just worked for me but i upgraded from v1 so dont know if that has any bearing?


Sent from my iPhone using Tapatalk

Posted on
Mon Jun 25, 2018 12:14 pm
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

i´ve done the same as BonfireVA,

Nothing is being sendt to broker from plugin, and nothing is received from broker to plugin.
No errors in debug, no errors when changing IP to a fake IP in settings.

Whats strange is that it was working in V.1 and i updated to V.2.. nothing works.

I have 5 clients thats sending to broker every second and i see those are working with mqttfx

Posted on
Mon Jun 25, 2018 12:47 pm
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

Deleted the v.2 and installed the v1 again

working good..

Code: Select all
 GreenSky MQTT Bridge Debug      Message recd: AMS/I2 226.5
   GreenSky MQTT Bridge Debug      Matched Device: AMS - I2- CurrentL2
   GreenSky MQTT Bridge Debug      Message recd: AMS/I3 415.2
   GreenSky MQTT Bridge Debug      Matched Device: AMS - I3- CurrentL3
   GreenSky MQTT Bridge Debug      Message recd: AMS/U1 248
   GreenSky MQTT Bridge Debug      Matched Device: AMS - U1 - VoltageL1
   GreenSky MQTT Bridge Debug      Message recd: AMS/U2 0
   GreenSky MQTT Bridge Debug      Matched Device: AMS - U2 - VoltageL2
   GreenSky MQTT Bridge Debug      Message recd: AMS/U3 248.4
   GreenSky MQTT Bridge Debug      Matched Device: AMS - U3 - VoltageL3
   GreenSky MQTT Bridge Debug      Message recd: AMS/I1 419.8
   GreenSky MQTT Bridge Debug      Matched Device: AMS - I1- CurrentL1
   GreenSky MQTT Bridge Debug      Message recd: AMS/watt 1475
   GreenSky MQTT Bridge Debug      Matched Device: AMS - ActiveImportPower


Even the switch are working, i see the on/off command are sendt in mqttfx

dont know whats going on... is there any settings i have to play with to get v.2 running properly?
are we supposed to put something in the Superbridge pattern to get this to work?

Edit: It looks like the v2 doesn't connect to the broker at all. After i went back to v1 i get 7 clients connected in mqttfx which add up correctly. I only have 5 with v.2

Posted on
Mon Jun 25, 2018 1:15 pm
BonfireVA offline
Posts: 62
Joined: Sep 17, 2017

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

I downgraded to V1 as well I tested to both of my brokers and they both received the messages just fine. The newest version doesn't seem to connect to the broker with authentication on or off.

-Eric

Page 4 of 10 1, 2, 3, 4, 5, 6, 7 ... 10

Who is online

Users browsing this forum: No registered users and 9 guests

cron