Page 4 of 5

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 31 August 2020 22:43
by Lokonli
heggink wrote: Monday 31 August 2020 21:01 Yay, nice! What is your experience so far with the API? They mentioned the devices sometimes lose their calibration...

Verstuurd vanaf mijn SM-G980F met Tapatalk
Everything is working fine: no problems. Seems to run very stable.

I've added the possibility to recalibrate from within Domoticz, just to be sure ...

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 01 September 2020 6:55
by RogerSch
Wow that is great.

Could you provide a brief overview of which actions to do to switch the Domoticz environment to the local Slide API?

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 01 September 2020 8:23
by Lokonli
RogerSch wrote: Tuesday 01 September 2020 6:55 Wow that is great.

Could you provide a brief overview of which actions to do to switch the Domoticz environment to the local Slide API?
https://github.com/lokonli/slide-domoti ... lide-setup

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 01 September 2020 8:43
by RogerSch
Great.. As soon as I have a weekend time to tinker I will swich to local API.

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 29 December 2021 15:32
by herbod
https://github.com/lokonli/slide-domoticz does this only work with the beta version of Domotics? Not in the stable?
My Domotics will not start after installing in stable.

Thanks!

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 29 December 2021 16:55
by Lokonli
herbod wrote: Wednesday 29 December 2021 15:32 https://github.com/lokonli/slide-domoticz does this only work with the beta version of Domotics? Not in the stable?
My Domotics will not start after installing in stable.

Thanks!
I'm running it with Domoticz 2021.1

I read there are issues with the Python plugin system for new versions (Python library version mixups)

Is the Python plugin system working for you?

If yes, then I'll try with the latest Domoticz version as well.

Re: Python plugin: Slide by Innovation in Motion

Posted: Thursday 30 December 2021 20:16
by herbod
I have updated to latest domoticz, this did not help.
How can I downgrade to an older python version? I have tried many options today (google) but without succes...

Re: Python plugin: Slide by Innovation in Motion

Posted: Thursday 30 December 2021 22:08
by Lokonli
I'll do some tests with latest Domoticz version. Unfortunately, coming 2 weeks I hardly have any time, so it will take a while.

Verstuurd vanaf mijn AC2003 met Tapatalk


Re: Python plugin: Slide by Innovation in Motion

Posted: Thursday 10 February 2022 21:21
by Lokonli
herbod wrote: Thursday 30 December 2021 20:16 I have updated to latest domoticz, this did not help.
How can I downgrade to an older python version? I have tried many options today (google) but without succes...
I've tested the Slide plugin with the latest Domoticz stable version (2022.1).

All working fine.

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 22 March 2022 11:52
by Vollervo
Hi,

Has anyone succesfully used the iim-slide plugin inside a Docker container? I migrated from a debian 11 to the offical Docker image and installed the plugin inside the Docker container as per instructions https://github.com/lokonli/slide-domoti ... stallation, but it doesn't work. On start up it produces an error:

Code: Select all

 2022-03-22 11:46:00.754 Error: Gordijnen: (iim-slide) failed to load 'plugin.py', Python Path used was ':/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2022-03-22 11:46:00.791 Error: Gordijnen: Exception: 'ModuleNotFoundError'. No traceback available. 
Any ideas what's wrong?

I did notice that the Docker image python version Python 3.7.3, while the machine I migrated from has version Python 3.9.2 and the wiki says version 3.4 - 3.8 need to be installed. The Docker image is an older Debian version which doesn't have a higher version of Python.

Thanks,

Vollervo

Re: Python plugin: Slide by Innovation in Motion

Posted: Tuesday 22 March 2022 20:33
by Lokonli
Vollervo wrote: Tuesday 22 March 2022 11:52 Hi,

Has anyone succesfully used the iim-slide plugin inside a Docker container? I migrated from a debian 11 to the offical Docker image and installed the plugin inside the Docker container as per instructions https://github.com/lokonli/slide-domoti ... stallation, but it doesn't work. On start up it produces an error:

Code: Select all

 2022-03-22 11:46:00.754 Error: Gordijnen: (iim-slide) failed to load 'plugin.py', Python Path used was ':/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2022-03-22 11:46:00.791 Error: Gordijnen: Exception: 'ModuleNotFoundError'. No traceback available. 
Any ideas what's wrong?

I did notice that the Docker image python version Python 3.7.3, while the machine I migrated from has version Python 3.9.2 and the wiki says version 3.4 - 3.8 need to be installed. The Docker image is an older Debian version which doesn't have a higher version of Python.

Thanks,

Vollervo
On my Debian 10 Buster system I just installed the latest Domoticz Docker container. Created a docker-compose.yml file. And a config folder. Started the docker container with docker-compose up.

The plugins folder is created by Domoticz.

I changed the access rights of the plugins folder with: chmod a+rwX plugins

Then in the plugins folder:
git clone https://github.com/lokonli/slide-domoticz

restart domoticz:
docker-compose down
docker-compose up

In Domoticz: Add the Slide hardware via the hardware tab. Filled in username and password for Slide.

Everything is working fine.

Re: Python plugin: Slide by Innovation in Motion

Posted: Wednesday 23 March 2022 9:50
by Vollervo
Thanks for confirming Lokonli.

It might have something to do with the restore of the database without the plugin being present when I migrated to Docker. I removed the hardware which crashed Domotics. Reinstalled and restarted and now it works again.

Thanks again!

Re: Python plugin: Slide by Innovation in Motion

Posted: Saturday 18 May 2024 15:30
by Vollervo
Hi,

This week I got a notification from IIM that they are quitting and thus the cloud API will cease to work. All current slide users should switch to the local API. So, I reconfigured the Slides and now I’m trying to operate them from Domoticz. I removed the cloud API hardware in Domoticz and added the local API hardware, with the IP address and Device codes. The devices shows up in Domiticz, but I can’t open or close the curtains.
I am able to control the slide through postman, so the local API is definitely working. In the log from Domoticz I can see calls to Slide.GetInfo, but not to the Slide.SetPos.

Any idea what wrong here?

Thanks,

Vollervo

Code: Select all

2024-05-18 15:23:53.072 Slide: {"ip": "192.168.101.112", "code": "BuarGvJ5", "nonce": "", "nc": 37, "checkMovement": 0, "slide_id": "slide_246F28482084"}
2024-05-18 15:23:53.072 Slide: connect called
2024-05-18 15:23:53.072 Slide: {"device": {"ip": "192.168.101.112", "code": "BuarGvJ5", "nonce": "", "nc": 37, "checkMovement": 0, "slide_id": "slide_246F28482084"}, "uri": "/rpc/Slide.GetInfo", "data": "", "delay": 0, "authorizationError": false}
2024-05-18 15:23:53.072 Slide: Deallocating connection object 'Slide_36' (192.168.101.112:80).
2024-05-18 15:23:53.072 Slide: Pushing 'ProtocolDirective' on to queue
2024-05-18 15:23:53.072 Slide: Pushing 'ConnectDirective' on to queue
2024-05-18 15:23:53.072 Slide: Acquiring GIL for 'onHeartbeatCallback'
2024-05-18 15:23:53.072 Slide: Processing 'ProtocolDirective' message
2024-05-18 15:23:53.072 Slide: Acquiring GIL for 'ProtocolDirective'
2024-05-18 15:23:53.072 Slide: Protocol set to: 'HTTP'.
2024-05-18 15:23:53.072 Slide: Acquiring GIL for 'ProtocolDirective'
2024-05-18 15:23:53.072 Slide: Processing 'ConnectDirective' message
2024-05-18 15:23:53.072 Slide: Acquiring GIL for 'ConnectDirective'
2024-05-18 15:23:53.073 Slide: Transport set to: 'TCP/IP', 192.168.101.112:80.
2024-05-18 15:23:53.073 Slide: Connect directive received, action initiated successfully.
2024-05-18 15:23:53.073 Slide: Acquiring GIL for 'ConnectDirective'
2024-05-18 15:23:53.073 Slide: Acquiring GIL for 'CPluginTransportTCP::handleAsyncResolve'
2024-05-18 15:23:53.079 Slide: Acquiring GIL for 'CPluginTransportTCP::handleAsyncResolve'
2024-05-18 15:23:53.080 Slide: Pushing 'onConnectCallback' on to queue
2024-05-18 15:23:53.123 Slide: Processing 'onConnectCallback' message
2024-05-18 15:23:53.123 Slide: Acquiring GIL for 'onConnectCallback'
2024-05-18 15:23:53.123 Slide: Calling message handler 'onConnect' on 'module' type object.
2024-05-18 15:23:53.123 Slide: onConnect called
2024-05-18 15:23:53.123 Slide: Slide connected successfully.
2024-05-18 15:23:53.123 Slide: sendMessage called
2024-05-18 15:23:53.123 Slide: Part 1: a3ea0503d2b99f964c81c8ea530ceb3b
2024-05-18 15:23:53.123 Slide: Part 2: 2a1d40aaaaebce6dcad24434199dae66
2024-05-18 15:23:53.124 Slide: {"Verb": "POST", "Headers": {"Content-Type": "application/json", "Accept": "application/json", "Authorization": "Digest username=\"user\", realm=\"iim\", nonce=\"\", uri=\"/rpc/Slide.GetInfo\", algorithm=\"MD5\", qop=auth, nc=00000037, cnonce=\"abcdef0123456789\", response=\"75f2b5eba185a128168b35019a61a670\""}, "URL": "/rpc/Slide.GetInfo", "Data": ""}
2024-05-18 15:23:53.124 Slide: Pushing 'WriteDirective' on to queue
2024-05-18 15:23:53.124 Slide: Acquiring GIL for 'onConnectCallback'
2024-05-18 15:23:53.124 Slide: Processing 'WriteDirective' message
2024-05-18 15:23:53.124 Slide: Acquiring GIL for 'WriteDirective'
2024-05-18 15:23:53.124 Slide: Sending 339 bytes of data
2024-05-18 15:23:53.124 Slide: 50 4f 53 54 20 2f 72 70 63 2f 53 6c 69 64 65 2e 47 65 74 49 POST./rpc/Slide.GetI
2024-05-18 15:23:53.124 Slide: 6e 66 6f 20 48 54 54 50 2f 31 2e 31 0d 0a 55 73 65 72 2d 41 nfo.HTTP/1.1..User-A
2024-05-18 15:23:53.124 Slide: 67 65 6e 74 3a 20 44 6f 6d 6f 74 69 63 7a 2f 31 2e 30 0d 0a gent:.Domoticz/1.0..
2024-05-18 15:23:53.124 Slide: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 Content-Type:.applic
2024-05-18 15:23:53.124 Slide: 61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 41 63 63 65 70 74 3a 20 ation/json..Accept:.
2024-05-18 15:23:53.124 Slide: 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 41 75 application/json..Au
2024-05-18 15:23:53.124 Slide: 74 68 6f 72 69 7a 61 74 69 6f 6e 3a 20 44 69 67 65 73 74 20 thorization:.Digest.
2024-05-18 15:23:53.124 Slide: 75 73 65 72 6e 61 6d 65 3d 22 75 73 65 72 22 2c 20 72 65 61 username="user",.rea
2024-05-18 15:23:53.125 Slide: 6c 6d 3d 22 69 69 6d 22 2c 20 6e 6f 6e 63 65 3d 22 22 2c 20 lm="iim",.nonce="",.
2024-05-18 15:23:53.125 Slide: 75 72 69 3d 22 2f 72 70 63 2f 53 6c 69 64 65 2e 47 65 74 49 uri="/rpc/Slide.GetI
2024-05-18 15:23:53.125 Slide: 6e 66 6f 22 2c 20 61 6c 67 6f 72 69 74 68 6d 3d 22 4d 44 35 nfo",.algorithm="MD5
2024-05-18 15:23:53.125 Slide: 22 2c 20 71 6f 70 3d 61 75 74 68 2c 20 6e 63 3d 30 30 30 30 ",.qop=auth,.nc=0000
2024-05-18 15:23:53.125 Slide: 30 30 33 37 2c 20 63 6e 6f 6e 63 65 3d 22 61 62 63 64 65 66 0037,.cnonce="abcdef
2024-05-18 15:23:53.125 Slide: 30 31 32 33 34 35 36 37 38 39 22 2c 20 72 65 73 70 6f 6e 73 0123456789",.respons
2024-05-18 15:23:53.125 Slide: 65 3d 22 37 35 66 32 62 35 65 62 61 31 38 35 61 31 32 38 31 e="75f2b5eba185a1281
2024-05-18 15:23:53.125 Slide: 36 38 62 33 35 30 31 39 61 36 31 61 36 37 30 22 0d 0a 43 6f 68b35019a61a670"..Co
2024-05-18 15:23:53.125 Slide: 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 30 0d 0a 0d 0a .. ntent-Length:.0....
2024-05-18 15:23:53.125 Slide: Acquiring GIL for 'WriteDirective'
2024-05-18 15:23:53.155 Slide: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2024-05-18 15:23:53.155 Slide: Pushing 'ReadEvent' on to queue
2024-05-18 15:23:53.155 Slide: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2024-05-18 15:23:53.155 Queued asynchronous read aborted (192.168.101.112:80), [2] End of file.
2024-05-18 15:23:53.155 Slide: Pushing 'DisconnectedEvent' on to queue
2024-05-18 15:23:53.175 Slide: Processing 'ReadEvent' message
2024-05-18 15:23:53.175 Slide: Acquiring GIL for 'ReadEvent'
2024-05-18 15:23:53.175 Slide: Received 367 bytes of data
2024-05-18 15:23:53.175 Slide: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 53 65 72 HTTP/1.1.200.OK..Ser
2024-05-18 15:23:53.176 Slide: 76 65 72 3a 20 4d 6f 6e 67 6f 6f 73 65 2f 36 2e 31 38 0d 0a ver:.Mongoose/6.18..
2024-05-18 15:23:53.176 Slide: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 Content-Type:.applic
2024-05-18 15:23:53.176 Slide: 61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 41 63 63 65 73 73 2d 43 ation/json..Access-C
2024-05-18 15:23:53.176 Slide: 6f 6e 74 72 6f 6c 2d 41 6c 6c 6f 77 2d 4f 72 69 67 69 6e 3a ontrol-Allow-Origin:
2024-05-18 15:23:53.176 Slide: 20 2a 0d 0a 41 63 63 65 73 73 2d 43 6f 6e 74 72 6f 6c 2d 41 .*..Access-Control-A
2024-05-18 15:23:53.176 Slide: 6c 6c 6f 77 2d 48 65 61 64 65 72 73 3a 20 2a 0d 0a 43 6f 6e llow-Headers:.*..Con
2024-05-18 15:23:53.176 Slide: 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 31 38 38 0d 0a 43 6f tent-Length:.188..Co
2024-05-18 15:23:53.176 Slide: 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a 7b nnection:.close....{
2024-05-18 15:23:53.176 Slide: 22 73 6c 69 64 65 5f 69 64 22 3a 20 22 73 6c 69 64 65 5f 32 "slide_id":."slide_2
2024-05-18 15:23:53.176 Slide: 34 36 46 32 38 34 38 32 30 38 34 22 2c 20 22 6d 61 63 22 3a 46F28482084",."mac":
2024-05-18 15:23:53.176 Slide: 20 22 32 34 36 46 32 38 34 38 32 30 38 34 22 2c 20 22 62 6f ."246F28482084",."bo
2024-05-18 15:23:53.176 Slide: 61 72 64 5f 72 65 76 22 3a 20 31 2c 20 22 64 65 76 69 63 65 ard_rev":.1,."device
2024-05-18 15:23:53.176 Slide: 5f 6e 61 6d 65 22 3a 20 22 53 6c 69 64 65 22 2c 20 22 7a 6f _name":."Slide",."zo
2024-05-18 15:23:53.176 Slide: 6e 65 5f 6e 61 6d 65 22 3a 20 22 22 2c 20 22 63 75 72 74 61 ne_name":."",."curta
2024-05-18 15:23:53.176 Slide: 69 6e 5f 74 79 70 65 22 3a 20 30 2c 20 22 63 61 6c 69 62 5f in_type":.0,."calib_
2024-05-18 15:23:53.176 Slide: 74 69 6d 65 22 3a 20 2d 32 34 30 35 38 2c 20 22 70 6f 73 22 time":.-24058,."pos"
2024-05-18 15:23:53.177 Slide: 3a 20 30 2e 31 32 2c 20 22 74 6f 75 63 68 5f 67 6f 22 3a 20 :.0.12,."touch_go":.
2024-05-18 15:23:53.177 Slide: 74 72 75 65 7d 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. .. true}..
2024-05-18 15:23:53.177 Slide: Pushing 'onMessageCallback' on to queue
2024-05-18 15:23:53.177 Slide: Acquiring GIL for 'ReadEvent'
2024-05-18 15:23:53.177 Slide: Processing 'DisconnectedEvent' message
2024-05-18 15:23:53.177 Slide: Acquiring GIL for 'DisconnectedEvent'
2024-05-18 15:23:53.177 Slide: Disconnect event received for '192.168.101.112:80'.
2024-05-18 15:23:53.177 Slide: Pushing 'onDisconnectCallback' on to queue
2024-05-18 15:23:53.177 Slide: Acquiring GIL for 'DisconnectedEvent'
2024-05-18 15:23:53.177 Slide: Processing 'onMessageCallback' message
2024-05-18 15:23:53.177 Slide: Acquiring GIL for 'onMessageCallback'
2024-05-18 15:23:53.177 Slide: Calling message handler 'onMessage' on 'module' type object.
2024-05-18 15:23:53.177 Slide: onMessage called
2024-05-18 15:23:53.178 Slide: Good Response received from IIM
2024-05-18 15:23:53.181 (Slide - $status) Updating device from 1:'On' to have values 1:'On'.
2024-05-18 15:23:53.185 Slide: Searching for device slide_246F28482084
2024-05-18 15:23:53.185 Slide: Device exists
2024-05-18 15:23:53.185 Slide: setStatus called
2024-05-18 15:23:53.185 Slide: Acquiring GIL for 'onMessageCallback'
2024-05-18 15:23:53.186 Slide: Processing 'onDisconnectCallback' message
2024-05-18 15:23:53.186 Slide: Acquiring GIL for 'onDisconnectCallback'
2024-05-18 15:23:53.186 Slide: Calling message handler 'onDisconnect' on 'module' type object.
2024-05-18 15:23:53.186 Slide: onDisconnect called
2024-05-18 15:23:53.186 Slide: Acquiring GIL for 'onDisconnectCallback'

Re: Python plugin: Slide by Innovation in Motion

Posted: Saturday 18 May 2024 18:26
by Lokonli
I’ll try to fix it this weekend.


Verzonden vanaf mijn iPhone met Tapatalk

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 19 May 2024 11:05
by Vollervo
Oh, great, Lokonli. Let me know if I can be of any help!

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 19 May 2024 12:02
by heggink
I have been using the local API with Sander's (lokonli) plugin for ages altho I made some changes I think. Will share my changes later today.

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 19 May 2024 16:31
by Lokonli
I've published a new version:

https://github.com/lokonli/slide-domoticz-local

Update instructions:
https://github.com/lokonli/slide-domoti ... the-plugin

@heggink: If you share your changes I'll check whether it's still usefull to merge them

Re: Python plugin: Slide by Innovation in Motion

Posted: Sunday 19 May 2024 19:16
by Vollervo
Wow lokonli, bulls eye! Thanks a million!

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 20 May 2024 13:04
by Vollervo
FYI: today I played around a bit more with the plugin for the local API and it seems that the actual status of the curtains is only updated every 30*180 seconds and that's a bit too slow for me. If you use touch and go or dzVents to do something with the curtains, the curtains' status is not reflected correctly in the UI for a long period. So, I changed that 180 to 20. Now the status is updated every 10 minutes.

Code: Select all

 def onHeartbeat(self):
        if self.hb == 20:
            Domoticz.Debug("onHeartbeat called")
            self.getAllSlidesInfo()
            self.hb = 1
        else:
            self.hb = self.hb + 1

Re: Python plugin: Slide by Innovation in Motion

Posted: Monday 20 May 2024 21:24
by Lokonli
Good suggestion.

I'll make that a parameter in the next version.