flux_led.py error on domoticz docker

Python and python framework

Moderator: leecollings

Post Reply
Gravityz
Posts: 764
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2026.3
Location: Netherlands
Contact:

flux_led.py error on domoticz docker

Post by Gravityz »

Hello,
i am testing an arilux ledstrip and have problems switching it on/of from a dzvents script.

the flux_led.py script should make it possible to turn the light on/off but i am getting an error

root@Domoticz:/opt/domoticz/userdata/scripts# ./flux_led.py 192.168.1.243 -1
led_flux-error.JPG
led_flux-error.JPG (23.52 KiB) Viewed 593 times

as far as i can tell python3 is default installed inside the docker image.

also the script started with #!/usr/bin/env python2 which i changed into #!/usr/bin/env python3 to let it execute.

anybody see what is going wrong.

if i just execute flux_led 192.168.1.243 --on it works
Last edited by Gravityz on Wednesday 26 October 2022 14:37, edited 1 time in total.
pipiche
Posts: 2042
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: flux_led.py error on domoticz docker

Post by pipiche »

Gravityz wrote: Wednesday 26 October 2022 14:27 Hello,
i am testing an arilux ledstrip and have problems switching it on/of from a dzvents script.

the flux_led.py script should make it possible to turn the light on/off but i am getting an error

root@Domoticz:/opt/domoticz/userdata/scripts# ./flux_led.py 192.168.1.243 -1

led_flux-error.JPG


as far as i can tell python3 is default installed inside the docker image.

also the script started with #!/usr/bin/env python2 which i changed into #!/usr/bin/env python3 to let it execute.

anybody see what is going wrong.
in python3 you should do

Code: Select all

print("bla bla bla")
So I think you are just missing parenthesis
User avatar
waltervl
Posts: 7029
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: flux_led.py error on domoticz docker

Post by waltervl »

Perhaps you have an old python2 version of the script? did you get it from https://github.com/beville/flux_led ?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 7029
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: flux_led.py error on domoticz docker

Post by waltervl »

by the way: arilux flux led strip should be supported by Domoticz by native hardware. So you should be able to select it from menu Setup-Hardware

https://github.com/domoticz/domoticz/bl ... Arilux.cpp
/*
Arilux AL-C0x is a Wifi LED Controller based on ESP8266.
Also compatible with Flux LED or any other LED strip controlled by Smart Home App
Multiple version, RGB,RGBWW, with or witout remote controll
Price is from 5 to 20 euro
Protocol if WiFi and TCP, the rgb controller needs to be connected to your wireless network
Domoticz and the lights need to be in the same network/subnet
Based on christianTF boblightwifi plugin for Arilux and Belville Flux Led python plugin
*/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gravityz
Posts: 764
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2026.3
Location: Netherlands
Contact:

Re: flux_led.py error on domoticz docker

Post by Gravityz »

ok thanks.

i just discovered that there also seems to be an executable flux_led in /usr/local/bin.

if i call that executable it is working.
maybe the script is outdated
Gravityz
Posts: 764
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2026.3
Location: Netherlands
Contact:

Re: flux_led.py error on domoticz docker

Post by Gravityz »

Hi Walter,
indeed i tried the native version but i experienced lot's of strange things
i could switch the light on/off from the user interface but when i tried it from dzVents it did not work at all.
i could see the light update because the timestamp changed but the light did not turn on.
So the arilux implementation is still not 100%(not for plain switch and certainly not for RGB)

Also in combination with .afterSec or .afterMin it was even more unstable.

now i am using a dummy switch with this in the on command
script:///usr/local/bin/flux_led 192.168.1.243 --on

waltervl wrote: Wednesday 26 October 2022 14:48 by the way: arilux flux led strip should be supported by Domoticz by native hardware. So you should be able to select it from menu Setup-Hardware

https://github.com/domoticz/domoticz/bl ... Arilux.cpp
/*
Arilux AL-C0x is a Wifi LED Controller based on ESP8266.
Also compatible with Flux LED or any other LED strip controlled by Smart Home App
Multiple version, RGB,RGBWW, with or witout remote controll
Price is from 5 to 20 euro
Protocol if WiFi and TCP, the rgb controller needs to be connected to your wireless network
Domoticz and the lights need to be in the same network/subnet
Based on christianTF boblightwifi plugin for Arilux and Belville Flux Led python plugin
*/
Post Reply