Python plugin: Slide by Innovation in Motion

Python and python framework

Moderator: leecollings

Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Python plugin: Slide by Innovation in Motion

Post by Lokonli »

I've created a Python plugin for Slide by Innovation in Motion.

https://github.com/lokonli/slide-domoticz
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by heggink »

Great plugin. Installed and works :-). Do get a bunch of error messages which I posed as a bug on Github.
Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

heggink wrote: ↑Thursday 12 December 2019 15:27 Great plugin. Installed and works :-). Do get a bunch of error messages which I posed as a bug on Github.
ok, I'll check.

What kind of system are you using?
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by heggink »

Raspberry pi 3.

Sent from phone.

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

ok, thanks.

To be clear:
The plugin is working correctly, you only see some unexpected messages in the Domoticz log?

Do you see any problem with the functionality?
mschut
Posts: 108
Joined: Sunday 23 February 2014 21:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by mschut »

Thanks! Just needed this. I followed the instructions, however I cant see " Slide" . in the hardware list. What name should I look for (Slide I suppose)?
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

mschut wrote: ↑Friday 13 December 2019 14:21 Thanks! Just needed this. I followed the instructions, however I cant see " Slide" . in the hardware list. What name should I look for (Slide I suppose)?
The hardware name is 'Slide by Innovation in Motion'.
Did you restart Domoticz?

Is Python installed? Domoticz reports the Python version in the ''Settings'->about' window.

You might have to set the right access permissions for the folder and for plugin.py

What kind of system are you using?
mschut
Posts: 108
Joined: Sunday 23 February 2014 21:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by mschut »

Python Version: None

That explains ;)

Verstuurd vanaf mijn SM-A530F met Tapatalk

mschut
Posts: 108
Joined: Sunday 23 February 2014 21:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by mschut »

Fixed the Python issue, and my Slides are showing! Great!

Would be great if you could integrate the Zones as well. I am using my Slides in one zone, which would be great to control as well.
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

mschut wrote: ↑Friday 13 December 2019 22:08 Fixed the Python issue, and my Slides are showing! Great!

Would be great if you could integrate the Zones as well. I am using my Slides in one zone, which would be great to control as well.
Good!

You can create groups in Domoticz.

I could create dummy devices for each slide zone.
Or create the group in Domoticz automatically.
I'll add it to the feature request list.
mschut
Posts: 108
Joined: Sunday 23 February 2014 21:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by mschut »

Thanks, I am trying hard to setup a switch to control my slides. I do have made a Dummy switch, and by Blocky events this switch controls the Slides in the zone.

However, I don't know how to setup this dummy switch to be controlled by my Zwave wall switch,

With a group I cant get it to work either. The slides are controlled by percentages, so a group will only switch to 0 or 100, I cant get it to work to open and close it by a group. And thus, with 1 switch I can only Open or Close my curtains. Still thinking about a way to use 1 button to Open and Close the curtains....
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by heggink »

Lokonli wrote:ok, thanks.

To be clear:
The plugin is working correctly, you only see some unexpected messages in the Domoticz log?

Do you see any problem with the functionality?
So far only the messages in the log. I did run into another issue that I need to investigate: I added all the devices in a group in order to switch them all at once. That crashed Domoticz... Anyways, I'll investigate and get back on that.

Great to have the plugin though!

Sent from phone.

Docker in Truenas scale, close to latest beta
DASHTICZ πŸ™ƒ
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
mschut
Posts: 108
Joined: Sunday 23 February 2014 21:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by mschut »

I think I experienced that crash too ;)

By now I have a working setup, a bit complicated, but working.

Zwave switch -> Zwave plug -> Event triggered by plug -> Individual slides.

Happy as can be, with my built in wall switch I can control my curtains :D
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

mschut wrote: ↑Friday 13 December 2019 23:49 I think I experienced that crash too ;)

By now I have a working setup, a bit complicated, but working.

Zwave switch -> Zwave plug -> Event triggered by plug -> Individual slides.

Happy as can be, with my built in wall switch I can control my curtains :D
There seems to be a bug in Domoticz in handling the disconnect of the https connections.

As a partial patch(?) I've increased the polling rate to once per 40 seconds in the latest version. Hopefully this keeps the connection alive.

In one of the Domoticz commits I see a report of the error in combination with zwave. There might be a relation.

I have 4 slides in one Domoticz group without issues.
packetloss
Posts: 43
Joined: Monday 03 August 2015 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: Belgium
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by packetloss »

Thanks Lokonli, works great!

For others: I had to do

Code: Select all

sudo apt install libpython3-dev
and then restart domoticz.
Some day, in Domoticz, an other icon for curtains instead of blinds would be nice.

And using an API key instead of login/password would be nice. Not sure if Slide supports this.
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

packetloss wrote: ↑Sunday 22 December 2019 13:37 Thanks Lokonli, works great!

For others: I had to do

Code: Select all

sudo apt install libpython3-dev
and then restart domoticz.
Some day, in Domoticz, an other icon for curtains instead of blinds would be nice.

And using an API key instead of login/password would be nice. Not sure if Slide supports this.
Thanks for the feedback!
I'll add this to the installation instructions.
RogerSch
Posts: 51
Joined: Saturday 04 April 2015 10:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by RogerSch »

packetloss wrote: ↑Sunday 22 December 2019 13:37 Thanks Lokonli, works great!

For others: I had to do

Code: Select all

sudo apt install libpython3-dev
and then restart domoticz.
Some day, in Domoticz, an other icon for curtains instead of blinds would be nice.

And using an API key instead of login/password would be nice. Not sure if Slide supports this.
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.

@Lokonli: Would you be so kind to explain why this dev python module is needed and would it be possible to create a python version of Slide which wouldn`t need this dev python module?
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »

RogerSch wrote: ↑Monday 23 December 2019 23:29
packetloss wrote: ↑Sunday 22 December 2019 13:37 Thanks Lokonli, works great!

For others: I had to do

Code: Select all

sudo apt install libpython3-dev
and then restart domoticz.
Some day, in Domoticz, an other icon for curtains instead of blinds would be nice.

And using an API key instead of login/password would be nice. Not sure if Slide supports this.
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.

@Lokonli: Would you be so kind to explain why this dev python module is needed and would it be possible to create a python version of Slide which wouldn`t need this dev python module?
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
RogerSch
Posts: 51
Joined: Saturday 04 April 2015 10:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by RogerSch »

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...
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Slide by Innovation in Motion

Post by Lokonli »


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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest