Sign in   |  Join   |  Help
Untitled Page

ARCHIVED FORUM -- March 2012 to February 2022
READ ONLY FORUM

This is the second Archived Forum which was active between 1st March 2012 and 23rd February 2022

 

MLGW Driver for Mac Automation software "Indogo"

rated by 0 users
This post has 10 Replies | 3 Followers

PhilLondon
Top 50 Contributor
London
Posts 3,637
OFFLINE
Bronze Member
PhilLondon Posted: Mon, Feb 2 2015 8:03 PM

Hi All,

I have purchased a Beolink Gateway recently, and it's a awesome box, you can do a lot with it alone, but it can do much more if connected to a full automation system,

As I have a Mac mini that could well run a home automation software, I did a search and found this one:

https://www.indigodomo.com

I found it was a very good software, easy enough to configure, and with tons of possible plug ins to control just about anything... exept B&O products.

But luckily the product can be expended and it is possible to write additional plugins.

So I decided to give it  go! And it worked! The plug in I developed allows Indigo to pass commands to the MLGW box, and it can also receive the LIGHT and CONTROL commands and act on them.

What Indigo can do goes far beyond what can be done with the MLGW on its own. The Philips Hue driver is much more complete for example.

So for those curious, you can download Indigo at the link above and you can try it free for 30 days.

You can install the MLGW Plug In from MLGW.indigoPlugin.zip and then double clic on it to install it in the software and have a go!

The MLGW Plug In is still young but functional. I'll add more features. For now, please Disable and Re-enable the Plug In after each config change in Indigo.

Any question, just ask...

 

 

Beoworld app with direct photo upload and emoticons.

elephant
Top 10 Contributor
AU
Posts 8,219
OFFLINE
Founder
Good to see your B&O creative juices are flowing again ... Thank you for donating the ZIP and good luck with your exploring !

BeoNut since '75

mjmedlo
Top 100 Contributor
Posts 922
OFFLINE
Bronze Member
mjmedlo replied on Wed, Feb 4 2015 3:26 AM
PhilLondon

Can you send some screenshots of the indigo?

Are you using the beolink app or the indigo app?

Any thoughts are appreciated!!

Thanks!
PhilLondon
Top 50 Contributor
London
Posts 3,637
OFFLINE
Bronze Member

I realised I had not implemented the Authentication...

So in the Beolink Gateway > Setup page > MasterLink Gateway protocol, untick "Requires authentication".

I'll implement authentication later.

---

Also look at the log window in Indigo (Window > Events Log). When you enable the MLGW plug in in Plugins > Manage Plugins, the log should say "Connected!"

---

I'll post more tips later, but getting the MLGW and the Indigo connected is a good start ;-)

Beoworld app with direct photo upload and emoticons.

PhilLondon
Top 50 Contributor
London
Posts 3,637
OFFLINE
Bronze Member
...and another thing before anyone rushes to buy Indigo...

I am going to try and create a standalone Mac app that will control Philips Hue lights from the Mlgw.

Beoworld app with direct photo upload and emoticons.

PhilLondon
Top 50 Contributor
London
Posts 3,637
OFFLINE
Bronze Member

I have now updated the Plugin with support for Authentication. Also the plugin quits faster.

Beoworld app with direct photo upload and emoticons.

PhilLondon
Top 50 Contributor
London
Posts 3,637
OFFLINE
Bronze Member

PhilLondon:
I am going to try and create a standalone Mac app that will control Philips Hue lights from the Mlgw.

It's there http://archivedforum2.beoworld.org/forums/p/13851/120948.aspx#120948

Beoworld app with direct photo upload and emoticons.

L Spad
Top 500 Contributor
Brighton
Posts 271
OFFLINE
Bronze Member

Hi Phil, many thanks for this - your plugin is amazing and has really solved a lot of problems in my home automation setup. I can now get rid of a few boxes and buggy work-arounds that I've previously been using. It's really unlocking the potential of the MLGW so that's great.

I just have one question around sending key presses to products on the ML gateway. When I set up a trigger to an MLGW AV renderer I'm getting errors. I wonder if I've got things set up correctly. 

I set up a new device I indigo using Type: MLGW Plugin, Model: AV Renderer (Beovision, Beosound) and under device settings is assigned the AV Renderer Number to equal the MLGW node number (MLN) for my Beovision 7. I gave it the name "Beovision 7-32".

i then set up a trigger with Type: MLGW Plugin Event, Event: Light, and event settings Room 1 (as per the Beovision's assignment on the MLGW), key: Ciffer_0. I assigned the actions as Type: Send Key (MLGW Plugin Controls), and Device: Beovision 7-32, with action settings key: TV, Destination: Video

so the idea was to run a test trigger that would turn on the to if I press light 0. I restarted the plugin and tried it out but I'm getting an error on the log which related to the as I codec being unable to decode a particular byte? I'm not sure if there is anything obvious I'm doing wrong. Appreciate that you may not be working on the plugin any more and if so no worries if this is not something you can help with.

many thanks, Luke

L Spad
Top 500 Contributor
Brighton
Posts 271
OFFLINE
Bronze Member

For completeness I've copied the error log:

Trigger                         test2

   MLGW Plugin                     send Key

   MLGW Plugin                     telegram:7

   MLGW Plugin Error               Error in plugin execution ExecuteAction:

 

Traceback (most recent call last):

  File "plugin.py", line 85, in sendKey

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 549, in send

 

UnicodeDecodeError: 'ascii' codec can't decode byte 0x81 in position 6: ordinal not in range(128)

L Spad
Top 500 Contributor
Brighton
Posts 271
OFFLINE
Bronze Member

I've done some checking and it seems I can reliably send any keypress on the MLGW up to decimal value 127 (EXIT), 128 (TV), 129 (RADIO) and above all throw hexadecimal ascii conversion errors as above. Is this by design? I wonder if perhaps the MLGW isn't designed to send source on commands? I've taken a look at the code and can't see any obvious limits on the telegram value, but I don't speak Python so I might have missed something (yet -hoping to learn - I'm still using Fortran and C so not up to speed with modern scripting languages)

Any help would be appreciated

All the best

Luke

L Spad
Top 500 Contributor
Brighton
Posts 271
OFFLINE
Bronze Member

Okay - solved it! The error arises because Indigo uses python 2.7. The asyncore.py ascii converter in 2.7 only covers the original ascii set (0 - 128) and will not covert decimals to extended ascii characters (129 - 255).

The problem is easily solved by overriding the default ascii encoding to latin-1 as follows in the plugin.py script:

 

stdin, stdout = sys.stdin, sys.stdout

reload(sys)

sys.stdin, sys.stdout = stdin, stdout

 

sys.setdefaultencoding('latin-1')

Thanks again for a great plugin - it has totally transformed my setup
Page 1 of 1 (11 items) | RSS