Page 7 of 10

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 9:53 am
by Umtauscher
That works, but that node type did always work.

The Indigo mqtt node still doesn't work.

When do the superbridge topics get updated, when they change?

The indigo plugin at least needs a manual restart after having opened the config dialog.

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 9:57 am
by jh71283
When the pliugin starts, it should publish the superbridge topics to the /GS-Indigo-Autodiscover topic.

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:00 am
by Umtauscher
I cannot see that.

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:08 am
by jh71283
Can you please confirm your plugin version? latest is 3.0.1

Thanks

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:10 am
by Umtauscher
Yes, that's what it says in the about box.

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:14 am
by jh71283
OK, if you enable debug messages, can you see it trying to send the autodiscover message?

If not I'm just in the process of putting more logging in around that area.

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:17 am
by Umtauscher
These are the first lines that are logged after a restart of the plugin.
Code: Select all
 GreenSky MQTT Bridge Debug      logger debugging enabled
   Started plugin "GreenSky MQTT Bridge 3.0.1"
   GreenSky MQTT Bridge Debug      startup called
   GreenSky MQTT Bridge Debug      Connected with result code 0
   GreenSky MQTT Bridge Debug      Subscribing to house/devices/wx030-2/level/set
   GreenSky MQTT Bridge Debug      set([<traceback object at 0x1055a9320>, <type 'exceptions.UnicodeDecodeError'>, UnicodeDecodeError('ascii', 'house/scenes/Alle Roll\xc3\xa4den zu copy/execute', 22, 23, 'ordinal not in range(128)')])
   GreenSky MQTT Bridge Debug      Started processing update for house/devices/wx010-2/deviceIsOnline.ui
   GreenSky MQTT Bridge Debug      json ready: {"deviceName": "wx010-2", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Publishing new Value for house/devices/wx010-2/deviceIsOnline.ui: {"deviceName": "wx010-2", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Message sent: house/devices/wx010-2/deviceIsOnline.ui | {"deviceName": "wx010-2", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
 

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:29 am
by jh71283
Version 3.02 has been pushed, can you give that a go?
Thanks!

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:46 am
by Umtauscher
No GS-Indigo in the log

Code: Select all
 Started plugin "GreenSky MQTT Bridge 3.0.2"
   GreenSky MQTT Bridge Debug      startup called
   GreenSky MQTT Bridge Debug      Connected with result code 0
   GreenSky MQTT Bridge Debug      Subscribing to house/devices/wx030-2/level/set
   GreenSky MQTT Bridge Debug      set([<traceback object at 0x10b58c320>, <type 'exceptions.UnicodeDecodeError'>, UnicodeDecodeError('ascii', 'house/devices/Terrassent\xc3\xbcr/level/set', 24, 25, 'ordinal not in range(128)')])
   GreenSky MQTT Bridge Debug      Started processing update for house/devices/getDistributionInfo/deviceIsOnline.ui
   GreenSky MQTT Bridge Debug      json ready: {"deviceName": "getDistributionInfo", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Publishing new Value for house/devices/getDistributionInfo/deviceIsOnline.ui: {"deviceName": "getDistributionInfo", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Message sent: house/devices/getDistributionInfo/deviceIsOnline.ui | {"deviceName": "getDistributionInfo", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Started processing update for house/devices/wx030-2/deviceIsOnline.ui
   GreenSky MQTT Bridge Debug      json ready: {"deviceName": "wx030-2", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Publishing new Value for house/devices/wx030-2/deviceIsOnline.ui: {"deviceName": "wx030-2", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Message sent: house/devices/wx030-2/deviceIsOnline.ui | {"deviceName": "wx030-2", "state": "deviceIsOnline.ui", "newValue": "Download", "oldValue": "Updated"}
   GreenSky MQTT Bridge Debug      Started processing update for house/devices/wx030-3/deviceIsOnline.ui
   Gre

What about those Unicode errors?

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:49 am
by Umtauscher
I'm also a bit curious the bridge subscribing to the first device instead of publishing it?

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:49 am
by jh71283
The Unicode errors are definitely the cause, and they are stopping everything. I hoped I had it sorted , but I won’t be around for the next few hours. Can you post on here a few of your action group names with non ascii characters? I’ll try to replicate locally


Sent from my iPhone using Tapatalk

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 10:56 am
by Umtauscher
Ok, sure, thanks.
But there are not only action groups with special characters...

Code: Select all
device names:

"Bewegungsmelder Gästeklo"
"Küche Temperatur"
"Küche Tilt/Tamper"
"Küchenfenster"
"Küchenfenster - Tamper Switch"

Action groups:

"Rolläden Küche auf"
"Rolläden Küche zu"
"Tröt"


Hope this helps.
Thank you very much for your support.
Cheers
Wilhelm

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Fri Nov 02, 2018 3:57 pm
by jh71283
OK so I have managed to debug the issue.

It all boils down to unicode support in python 2.7 being pretty damn poor, and so my MQTT client (Paho) will fail to subscribe to anything with non ascii characters.

I have therefore worked around it by simply not subscribing to any superbridge topics with non ascii characters, and I apologize for any inconvenience this causes.

Apparently it is better in Python 3 (along with many other things) but we are limited to what the indigo server supports.

I have published version 3.0.3 which has the workaround in there, along with some other stability fixes I found along the way.

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Sat Nov 03, 2018 2:49 am
by Umtauscher
Hi jh,

thank you very much for taking the time trying to fix this.
Version 3.0.3 now seems to behave like you described it. I realize that for an english speaking person this really is no problem at all.

Watching the log, I have now 89 devices that don't get published. I didn't realize that there were so many ...
I doubt though, that unicode in Python is the general problem here, as I have been using many indigo plugins for some years now and never had a problem with those unicode names.
So the base of the problem might be the paho mqtt client. But I know very little about python , maybe Jay could help?

Thanks
Wilhelm

Re: GreenSky MQTT Bridge Plugin (SmartThings Bridge)

PostPosted: Sat Nov 03, 2018 3:43 am
by jh71283
That's exactly it; the rest of the plugin behaves just fine, it's Paho that is broken Apparently it works in the Python v3 version.

It looks like they have attempted to fix it a few times without success.

Maybe I could look at publishing/ subscribing to the device ID as well, and also modify the Node red nodes to cope with that.

Leave it with me.