Page 2 of 5

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 24 December 2019 17:07
by RogerSch
Thanks for your support.
The problem is that Domoticz doesn`t find the Slide hardware at all.

For the time being I`m setting up a work around. I have an old Acer Netbook and installed Linux Mint on it. Now installing Domoticz. I will configure this netbook to connect to Slide and use it as a server Domoticz. My Domoticz on the Synology NAS can then connect to this server. I hope this works.

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 24 December 2019 17:45
by RogerSch
Mmm got a problem on installing Domoticz on Linux Mint. Seems that the install option is broken for a long time. :?
viewtopic.php?f=47&t=30061

I think I bite the bullit and will switch over to Home Automation...

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 25 December 2019 17:32
by packetloss
RogerSch wrote: Monday 23 December 2019 23:29 Hello packetloss can you explain which problem was solved by installing libpython3-dev? I`m trying to use the Python plugin on my Synology NAS but I can`t get it to work. My Synology NAS doesn`t have this pyhton module installed.

without installing libpython3-dev, Domoticz didnt show the Slide option in Hardware.

Re: Python plugin: Slide by Innovation in Motion

Posted: Saturday 28 December 2019 12:49
by JeroenL
Thanks Lokonli!

Works like a charm on my RaspberryPi2 - rasbian Stretch. Nice integratienota, just what I needed.
Regards jeroen

Re: Python plugin: Slide by Innovation in Motion

Posted: Saturday 04 January 2020 11:47
by JeroenL
Now running for a week or so, and it turns out I have to stop-start the plug-in every now and then as it creates an error message after a while. Any clues? I do notice my slides looses connection frequently and then reconnects, anything related to that?
Thanks.

Code: Select all


2020-01-04 10:37:46.558 Error: (Slide) 'onHeartbeat' failed 'AttributeError':''iimSlide' object has no attribute 'access_token''.
2020-01-04 10:37:46.558 Error: (Slide) ----> Line 394 in '/home/pi/domoticz/plugins/slide-domoticz/plugin.py'
2020-01-04 10:37:46.558 Error: (Slide) ----> Line 329 in '/home/pi/domoticz/plugins/slide-domoticz/plugin.py


Sent from my iPhone using Tapatalk

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 05 January 2020 14:15
by Lokonli
JeroenL wrote: Saturday 04 January 2020 11:47 Now running for a week or so, and it turns out I have to stop-start the plug-in every now and then as it creates an error message after a while. Any clues? I do notice my slides looses connection frequently and then reconnects, anything related to that?
Thanks.

Code: Select all


2020-01-04 10:37:46.558 Error: (Slide) 'onHeartbeat' failed 'AttributeError':''iimSlide' object has no attribute 'access_token''.
2020-01-04 10:37:46.558 Error: (Slide) ----> Line 394 in '/home/pi/domoticz/plugins/slide-domoticz/plugin.py'
2020-01-04 10:37:46.558 Error: (Slide) ----> Line 329 in '/home/pi/domoticz/plugins/slide-domoticz/plugin.py


Sent from my iPhone using Tapatalk
How often do you have to restart the plugin?

The https connection to the slide server indeed disconnects sometimes, but should be reconnect automatically without issues.

I'll improve the handling in case access_token is undefined.

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 05 January 2020 17:30
by JeroenL
Hi Lokonli,

Thanks for your reply. I did not appreciate the fact it reconnects automatically. Probably when I checked, i noticed it not working, and hence restarted the plugin. But indeed looking at my log, I see now, it does re-connect after a while.

rgds
Jeroen

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 05 January 2020 18:28
by Lokonli
JeroenL wrote: Sunday 05 January 2020 17:30 Hi Lokonli,

Thanks for your reply. I did not appreciate the fact it reconnects automatically. Probably when I checked, i noticed it not working, and hence restarted the plugin. But indeed looking at my log, I see now, it does re-connect after a while.

rgds
Jeroen
I've published release 0.1.7

Can you test this?

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 05 January 2020 19:12
by JeroenL
Hi again,

Wow, you are fast. Currently traveling so will try late tonight, or tomorrow. And let you know!

Regards jeroen

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 06 January 2020 11:33
by JeroenL
Hi Lokonli,

Installed your update late last night, saw the new version popping up in the log. It looks like it is working, but as I am away from home, difficult to visually confirm. I did not see any error messages last night, but this morning some are popping up.

What I notice now is that if I activate "Slide" in Domoticz the "last seen" does not change. It stays at the last seen of last-night. Also in the Slide App, the position of the curtains do not change. (In the App the curtains remain open).

This is what I see in the log, before and during activating the device:

Code: Select all

2020-01-06 11:13:07.047 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:13:47.015 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:14:27.029 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:06.657 (Slide) onMessage called
2020-01-06 11:15:06.658 (Slide) Invalid response data
2020-01-06 11:15:06.658 (Slide) onDisconnect called
2020-01-06 11:15:07.009 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:39.004 (Slide) onCommand called for Unit 1: Parameter 'Off', Level: 0
2020-01-06 11:15:39.220 (Slide) onMessage called
2020-01-06 11:15:39.221 (Slide) Invalid response data
2020-01-06 11:15:39.221 (Slide) onDisconnect called
2020-01-06 11:15:39.195 Error: (Slide): Async Secure Read Exception: 1, stream truncated
2020-01-06 11:15:40.023 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:46.694 (Slide) onMessage called
2020-01-06 11:15:46.695 (Slide) Invalid response data
2020-01-06 11:15:46.695 (Slide) onDisconnect called
2020-01-06 11:15:47.046 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:16:26.715 (Slide) onMessage called
2020-01-06 11:16:26.716 (Slide) Invalid response data
2020-01-06 11:16:26.716 (Slide) onDisconnect called
2020-01-06 11:16:27.017 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
Hope it helps you. As mentioned, I can not visually check for the moment unfortunately.

Best regards, Jeroen

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 06 January 2020 11:41
by Lokonli
JeroenL wrote: Monday 06 January 2020 11:33 Hi Lokonli,

Installed your update late last night, saw the new version popping up in the log. It looks like it is working, but as I am away from home, difficult to visually confirm. I did not see any error messages last night, but this morning some are popping up.

What I notice now is that if I activate "Slide" in Domoticz the "last seen" does not change. It stays at the last seen of last-night. Also in the Slide App, the position of the curtains do not change. (In the App the curtains remain open).

This is what I see in the log, before and during activating the device:

Code: Select all

2020-01-06 11:13:07.047 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:13:47.015 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:14:27.029 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:06.657 (Slide) onMessage called
2020-01-06 11:15:06.658 (Slide) Invalid response data
2020-01-06 11:15:06.658 (Slide) onDisconnect called
2020-01-06 11:15:07.009 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:39.004 (Slide) onCommand called for Unit 1: Parameter 'Off', Level: 0
2020-01-06 11:15:39.220 (Slide) onMessage called
2020-01-06 11:15:39.221 (Slide) Invalid response data
2020-01-06 11:15:39.221 (Slide) onDisconnect called
2020-01-06 11:15:39.195 Error: (Slide): Async Secure Read Exception: 1, stream truncated
2020-01-06 11:15:40.023 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:46.694 (Slide) onMessage called
2020-01-06 11:15:46.695 (Slide) Invalid response data
2020-01-06 11:15:46.695 (Slide) onDisconnect called
2020-01-06 11:15:47.046 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:16:26.715 (Slide) onMessage called
2020-01-06 11:16:26.716 (Slide) Invalid response data
2020-01-06 11:16:26.716 (Slide) onDisconnect called
2020-01-06 11:16:27.017 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
Hope it helps you. As mentioned, I can not visually check for the moment unfortunately.

Best regards, Jeroen
Hi Jeroen,

This is not good. I have the same with my system. I'll try to fix it tonight.

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 06 January 2020 18:03
by Lokonli
Lokonli wrote: Monday 06 January 2020 11:41
JeroenL wrote: Monday 06 January 2020 11:33 Hi Lokonli,

Installed your update late last night, saw the new version popping up in the log. It looks like it is working, but as I am away from home, difficult to visually confirm. I did not see any error messages last night, but this morning some are popping up.

What I notice now is that if I activate "Slide" in Domoticz the "last seen" does not change. It stays at the last seen of last-night. Also in the Slide App, the position of the curtains do not change. (In the App the curtains remain open).

This is what I see in the log, before and during activating the device:

Code: Select all

2020-01-06 11:13:07.047 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:13:47.015 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:14:27.029 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:06.657 (Slide) onMessage called
2020-01-06 11:15:06.658 (Slide) Invalid response data
2020-01-06 11:15:06.658 (Slide) onDisconnect called
2020-01-06 11:15:07.009 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:39.004 (Slide) onCommand called for Unit 1: Parameter 'Off', Level: 0
2020-01-06 11:15:39.220 (Slide) onMessage called
2020-01-06 11:15:39.221 (Slide) Invalid response data
2020-01-06 11:15:39.221 (Slide) onDisconnect called
2020-01-06 11:15:39.195 Error: (Slide): Async Secure Read Exception: 1, stream truncated
2020-01-06 11:15:40.023 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:15:46.694 (Slide) onMessage called
2020-01-06 11:15:46.695 (Slide) Invalid response data
2020-01-06 11:15:46.695 (Slide) onDisconnect called
2020-01-06 11:15:47.046 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
2020-01-06 11:16:26.715 (Slide) onMessage called
2020-01-06 11:16:26.716 (Slide) Invalid response data
2020-01-06 11:16:26.716 (Slide) onDisconnect called
2020-01-06 11:16:27.017 Error: (Slide) No transport, write directive to 'IIM Connection' ignored.
Hope it helps you. As mentioned, I can not visually check for the moment unfortunately.

Best regards, Jeroen
Hi Jeroen,

This is not good. I have the same with my system. I'll try to fix it tonight.
Should be fixed in v0.1.8

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 06 January 2020 20:49
by JeroenL
Hi again,

Thanks - just updated - noticed that I physically had to remove the previous plugins from the plugin directory - as Domoticz was loading the old version again. That done, the new version starts and does not give any error messages.

When closing / opening in Domoticz the widget gets updated, I even see the slider move to an intermediate position and than to the far end. Still not home so can not do a visual check, but I was checking in the Slide app, here the "slider" in the app does get updated but not the curtain image in App (looks like a bug in the app to me).

I'll let it run overnight and look in the morning again.

Code: Select all

2020-01-06 20:32:51.920 Status: (Slide) Started.
2020-01-06 20:32:52.378 Status: (Slide) Entering work loop.
2020-01-06 20:32:52.379 Status: (Slide) Initialized version 0.1.8, author 'lokonli'
2020-01-06 20:33:57.001 (Slide) onCommand called for Unit 1: Parameter 'On', Level: 100
2020-01-06 20:33:57.204 (Slide) onMessage called
2020-01-06 20:33:57.206 (Slide) Unhandled response
2020-01-06 20:33:57.206 (Slide) {"data": {"response": "success"}, "error": null}
2020-01-06 20:33:57.206 (Slide) Good Response received from IIM
2020-01-06 20:33:59.314 (Slide) onMessage called
2020-01-06 20:33:59.316 (Slide) Slide id: 2599
2020-01-06 20:33:59.316 (Slide) Device exists
2020-01-06 20:33:59.316 (Slide) Good Response received from IIM
2020-01-06 20:34:12.761 (Slide) onMessage called
2020-01-06 20:34:12.762 (Slide) Slide id: 2599
2020-01-06 20:34:12.763 (Slide) Device exists
regards, Jeroen

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 06 January 2020 21:09
by Lokonli
JeroenL wrote: Monday 06 January 2020 20:49 Hi again,

Thanks - just updated - noticed that I physically had to remove the previous plugins from the plugin directory - as Domoticz was loading the old version again. That done, the new version starts and does not give any error messages.

When closing / opening in Domoticz the widget gets updated, I even see the slider move to an intermediate position and than to the far end. Still not home so can not do a visual check, but I was checking in the Slide app, here the "slider" in the app does get updated but not the curtain image in App (looks like a bug in the app to me).

I'll let it run overnight and look in the morning again.

Code: Select all

2020-01-06 20:32:51.920 Status: (Slide) Started.
2020-01-06 20:32:52.378 Status: (Slide) Entering work loop.
2020-01-06 20:32:52.379 Status: (Slide) Initialized version 0.1.8, author 'lokonli'
2020-01-06 20:33:57.001 (Slide) onCommand called for Unit 1: Parameter 'On', Level: 100
2020-01-06 20:33:57.204 (Slide) onMessage called
2020-01-06 20:33:57.206 (Slide) Unhandled response
2020-01-06 20:33:57.206 (Slide) {"data": {"response": "success"}, "error": null}
2020-01-06 20:33:57.206 (Slide) Good Response received from IIM
2020-01-06 20:33:59.314 (Slide) onMessage called
2020-01-06 20:33:59.316 (Slide) Slide id: 2599
2020-01-06 20:33:59.316 (Slide) Device exists
2020-01-06 20:33:59.316 (Slide) Good Response received from IIM
2020-01-06 20:34:12.761 (Slide) onMessage called
2020-01-06 20:34:12.762 (Slide) Slide id: 2599
2020-01-06 20:34:12.763 (Slide) Device exists
regards, Jeroen
That looks ok.

In fact if you click on 'modify' (aanpassen) in the Domoticz hardware -> slide the plugin gets loaded as well, only Domoticz reports it as the previous version.
Instead of removing the hardware you could also restart Domoticz.

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 07 January 2020 8:46
by JeroenL
16 hr later, al running well, no error messages. Just to mention I upgraded from stretch to buster over the weekend, so I can confirm it works on both versions.
Now hoping IIM make the local API available soon, I prefer not to be dependent of a remote server to run my home control.

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 07 January 2020 8:55
by Lokonli
JeroenL wrote: Tuesday 07 January 2020 8:46 16 hr later, al running well, no error messages. Just to mention I upgraded from stretch to buster over the weekend, so I can confirm it works on both versions.
Now hoping IIM make the local API available soon, I prefer not to be dependent of a remote server to run my home control.
Thanks for the feedback.

IIM is testing a closed beta for the local API. Let's wait.

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 15 January 2020 9:36
by heggink
Hey Lokonli,
When you do your next update, would you mind moving some of the logging to Debug rather than log? It's a little chatty in non debug mode ;-).
Also, on rpi3, changing the heartbeat to

Code: Select all

if self._tick == 2: 
ensures minimal async read errors. Anything above still gives lots of errors.
H

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 15 January 2020 11:45
by Lokonli
heggink wrote: Wednesday 15 January 2020 9:36 Hey Lokonli,
When you do your next update, would you mind moving some of the logging to Debug rather than log? It's a little chatty in non debug mode ;-).
Also, on rpi3, changing the heartbeat to

Code: Select all

if self._tick == 2: 
ensures minimal async read errors. Anything above still gives lots of errors.
H
I will do that.

It helped me in the debugging :)

Thanks for the feedback.

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 15 January 2020 20:32
by heggink
Many thanks! Still very happy with the plugin!

Sent from phone.


Re: Python plugin: Slide by Innovation in Motion

Posted: Friday 01 May 2020 15:53
by RogerSch
Lokonli wrote: Tuesday 24 December 2019 16:12
RogerSch wrote:
Lokonli wrote: Tuesday 24 December 2019 0:07 It's not needed for my plugin, but for the Domoticz plugin system in general.

Is python detected by Domoticz? Domoticz reports the python version in Settings->About.
If not: did you install the correct Domoticz version on your Synology?
See http://www.jadahl.com/
Install a version including Python
Yes Domotics recognize Python:

Code: Select all

PluginSystem: Started, Python version '3.5.1'.
Which is the version I have activited in the package manager and from Jadahl I have donloaded the Pyhton version.

As soon as I instruct Domoticz to enable new sensors for 5 minutes the following erro message appears in the log file:

Code: Select all

PluginList: Parsing '/usr/local/domoticz/var/plugins/slide-domoticz/', 'Error document empty.' at line 0 column 0 in XML ''.
plugin.py file in this folder has all the required rights...
I have no experience with Synology...

Maybe try the following:
On the hardware configurarion page set the debug info to all.
Then enable the hardware, without allowing new devices.
In the log file filter 'slide'. Do you see any result?

(I assume you filled in your email and password on the slide hardware configuration page)

Sent from my SM-A320FL using Tapatalk
Due to a multiple hard disk failure, luckily I have a backup NAS..., I needed to re-install my Synology NAS completly with new discs. Also I installed the latest version of Domiticz (Jadahl). I copied the Slide python file to the plugin directory as you stated in the installation manual (using WinSCP). Now it works directly (after restart of Domoticz)!