Setting up the plugin

Posted on
Tue Nov 19, 2019 8:57 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

Thanks, I’ll take a look.


Sent from my iPhone using Tapatalk Pro

Posted on
Tue Nov 19, 2019 9:03 am
gt3mike offline
Posts: 225
Joined: Dec 31, 2017
Location: Colorado

Re: Setting up the plugin

The continuous ping seems to keep the MyLink "awake" most of the time. With it running, the shade almost always responds to the Indigo command. Occasionally it won't respond to the Indigo command, and when I check the terminal window I can see "FAIL" messages indicating that the MyLink is offline for some reason. It almost always comes back online by itself. Only once every couple of months do I find that I need to power cycle the MyLink.

Posted on
Fri Apr 17, 2020 10:56 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

Hi Mike.

I've just pushed https://github.com/howartp84/SomfyManag ... /tag/1.0.4

There's an optional Keep Alive in the plugin config, which pings every 0 seconds then silently (debug mode) suceeds or throws red Error in the log if it fails.

I can't test the actions of the MyLink or motors, so could you try it out with debug mode on, then paste the logs of what each function returns - once they "work" I want to represent the status etc in the indigo device states/properties but I can't read back what's happening without the unit to test.

Peter

Posted on
Fri Apr 17, 2020 4:42 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

So I'm really over my head with this one but i'm trying. Here's what I get when I try to run the close script:

Action Group Master Large Window Shade Close
Embedded script executor host1 started
Error because embedded scripts execute sequentially they must complete their execution within 10 seconds.
Error modify the script to exit quickly or convert it to an external file (not embedded).
Stopping embedded script executor host1 (pid 90065)
Script Error embedded script: [Errno 4] Interrupted system call
Script Error Exception Traceback (most recent call shown last):

embedded script, line 3, at top level
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/telnetlib.py", line 211, in __init__
self.open(host, port, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/telnetlib.py", line 227, in open
self.sock = socket.create_connection((host, port), timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 575, in create_connection
raise err
error: [Errno 4] Interrupted system call

Stopped "embedded script executor host1"

Posted on
Sun Apr 19, 2020 1:27 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

Is that definitely the plugin?

I'm confused as it's referring to an embedded script but the plugin isn't running embedded scripts?

Peter

Posted on
Sun Apr 19, 2020 1:53 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

Apologies, I’m running a script from another post because I never really figured out how to use the plugin. Sorry for the confusion. Is there a step by step somewhere on how to set things up using the plugin?

Posted on
Sun Apr 19, 2020 1:56 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

Ah :)

Install the plugin, create a Somfy MyLink device with the IP of your MyLink, then a Somfy Motor device with the ID of your blind (something like AABBCCDD.1)

Then create an Action > Somfy MyLink > Open Blind and point it at the motor device.

Run the action.

Peter

Posted on
Sun Apr 19, 2020 2:01 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

So what exactly goes in the MyLink Password field? I remember before when I set this up it was the name of the MyLink setup as opposed to the password for the account. And where do I find the actual numbers for each device, I have four?

Posted on
Sun Apr 19, 2020 2:25 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

Here's what I get when I try to setup a Somfy MyLink device:

Somfy Manager Connecting to MyLink: 192.168.1.60
Somfy Manager Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1179, in deviceUpdated
File "plugin.py", line 85, in deviceStartComm
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/telnetlib.py", line 211, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/telnetlib.py", line 227, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 575, in create_connection
error: [Errno 61] Connection refused

Posted on
Sun Apr 19, 2020 2:51 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

Hi

I've stolen this from the SmartThings integration of MyLink:
Somfy MyLink IP Address: The IP address of the MyLink hub (Can be found in the integration report in the Somfy App)
Somfy Mylink Port: Ensure this is set to 44100 if you are not sure
Somfy Mylink System ID: The System ID configured in the Somfy App (Can be found in the integration report in the Somfy App)
Device 1-5 Name: The human-readable name of the device you are adding
Device 1-5 ID: The Somfy targetID of the device you are adding (Can be found in the integration report in the Somfy App)

Does that help?

Peter

Posted on
Sun Apr 19, 2020 2:56 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

Definitely, but what goes into the "MyLink Password" field? Here's what I get now when I setup the Somfy MyLink device:

Somfy Manager Connecting to MyLink: 192.168.1.50
Somfy Manager Debug <telnetlib.Telnet instance at 0x109a55710>

Posted on
Sun Apr 19, 2020 3:02 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

MyLink password is the MyLink system ID referred to in the quoted Smartthings docs.

The API calls it a password but if users are more familiar with it being called the system ID then i'll change the wording (and the description now i've found those notes) in the plugin itself.

That telnetlib looks ok, it sounds like it's successfully made a connection to the MyLink, at a network level - once the password/system ID is correct, the MyLink should start accepting up/down commands.

Peter

Posted on
Sun Apr 19, 2020 3:10 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

That did it! Yes it's confusing when it calls for a "Password" when it really wants the ID. After that everything was really simple, just as you described.

Thanks!

Posted on
Sun Apr 19, 2020 3:27 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Setting up the plugin

Hooray!

Is the log reporting any feedback from the blind? Can you paste the debug log when it's running an action?

Peter

Posted on
Sun Apr 19, 2020 3:30 pm
rgspb offline
Posts: 217
Joined: Apr 24, 2009
Location: Florida

Re: Setting up the plugin

Here's what the log shows to place one blind in the "favorite" position:

Action Group Master Bath Shade Favorite
Somfy Manager Debug myLinkCmdSingle action called:
Somfy Manager Debug Target device: CC1049A9.4
Somfy Manager Sending payload: { "id":680, "method": "mylink.move.stop", "params": { "auth": "bayfront", "targetID" : "CC1049A9.4"} }
Somfy Manager Debug Reply from 680: {"jsonrpc":"2.0","result":true,"id":651}{"method":"mylink.status.keepalive"}{"method":"mylink.status.keepalive"}{"method":"mylink.status.keepalive"}{"method":"mylink.status.keepalive"}

Who is online

Users browsing this forum: No registered users and 0 guests

cron