Python Plugin : Broadlink
Moderator: leecollings
-
- Posts: 1
- Joined: Sunday 08 October 2023 1:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin : Broadlink
Hi,
I'm tryng to move from the old version of the plugin to this one but I'm struggling as the setup.py does not work ...
I have the follwoing error :
File "setup.py", line 230
print("\r>> Bytes downloaded -->" + state + str(leng) + state, end='', flush=True)
^
SyntaxError: invalid syntax
I don't really know what to do there... Other point is that I have quite some IR and RF devices made with my current plugin . Will it cange anything when migrating ?What I have to do to keep it working ?
thanks a lot in advance.
I'm tryng to move from the old version of the plugin to this one but I'm struggling as the setup.py does not work ...
I have the follwoing error :
File "setup.py", line 230
print("\r>> Bytes downloaded -->" + state + str(leng) + state, end='', flush=True)
^
SyntaxError: invalid syntax
I don't really know what to do there... Other point is that I have quite some IR and RF devices made with my current plugin . Will it cange anything when migrating ?What I have to do to keep it working ?
thanks a lot in advance.
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin : Broadlink
looks like you still use python 2.x ????
First, always made a backup of your existing plugin folder (with ini files)
You need to copy old ini files to your new path, and import them
No more is needed to have Domoticz device linked to the ini file, but can be done if necessary.
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin : Broadlink
New plugin version 2.1. Released:
broadlink module to 0.18.0
RF learn bug fixes
broadlink module to 0.18.0
RF learn bug fixes
Re: Python Plugin : Broadlink
Hello,
I just tested the installation of the pluging, unfortunately without success . . .
Domoticz is installed on a linux distribution (Yunohost), is using python 3.9.2, has " python3-pip" installed, and domoticz plugin folder is /var/www/domoticz/plugins
In a first time I created the Broadlink folder :
/var/www/domoticz/plugins/Broadlink/
Copy in this folder the file :
https://raw.githubusercontent.com/zak-4 ... n/setup.py
Make it executable, and launcht it with the command "python setup.py"
But I get the following error message :
A strange thing is in "/var/www/domoticz/plugins/Broadlink/" I have the follwing files and folder :
setup.py has installed broadlink not in /var/www/domoticz/plugins/Broadlink/, but in /var/www/domoticz/plugins/Broadlink/Broadlink-Domoticz-plugin-main :
I had manually make the folder scr executable, try to launch again setup.py, without success.
Does somebody has an idea about the problem ?
Thank's.
I just tested the installation of the pluging, unfortunately without success . . .
Domoticz is installed on a linux distribution (Yunohost), is using python 3.9.2, has " python3-pip" installed, and domoticz plugin folder is /var/www/domoticz/plugins
In a first time I created the Broadlink folder :
/var/www/domoticz/plugins/Broadlink/
Copy in this folder the file :
https://raw.githubusercontent.com/zak-4 ... n/setup.py
Make it executable, and launcht it with the command "python setup.py"
But I get the following error message :
Code: Select all
put *.py files executable (+x) OK
chmod: impossible to access at 'scr/*.sh': no file or folder of this type
ERROR to start subprocess
1s
sudo chmod +x scr/*.sh
b''
ERROR to put +x to *.sh files
Code: Select all
drwxr-xr-x 8 domoticz domoticz 4096 24 mars 17:04 Broadlink-Domoticz-plugin-main
-rw-r--r-- 1 domoticz domoticz 571514 24 mars 17:32 BroadlinkSetup.zip
-rwxr-xr-x 1 domoticz domoticz 8880 24 mars 16:50 setup.py
Code: Select all
root@yunohost2:/var/www/domoticz/plugins/Broadlink/Broadlink-Domoticz-plugin-main# ls -l
total 524
drwxr-xr-x 2 domoticz domoticz 4096 24 mars 17:04 bkp
-rw-r--r-- 1 domoticz domoticz 7840 24 mars 17:32 broadlink_cli.py
-rw-r--r-- 1 domoticz domoticz 1452 24 mars 17:32 broadlink_discovery.py
-rw-r--r-- 1 domoticz domoticz 35505 24 mars 17:32 Dombroadlink.py
drwxr-xr-x 3 domoticz domoticz 4096 24 mars 17:04 ini
-rw-r--r-- 1 domoticz domoticz 1063 24 mars 17:32 LICENSE
drwxr-xr-x 2 domoticz domoticz 4096 24 mars 17:04 lng
drwxr-xr-x 2 domoticz domoticz 4096 24 mars 17:04 log
-rw-r--r-- 1 domoticz domoticz 214226 24 mars 17:32 plugin.py
-rw-r--r-- 1 domoticz domoticz 7313 24 mars 17:32 README.md
-rw-r--r-- 1 domoticz domoticz 247 24 mars 17:32 requirements.txt
drwxrwxrwx 2 domoticz domoticz 4096 24 mars 17:04 scr
-rw-r--r-- 1 domoticz domoticz 8880 24 mars 17:32 setup.py
-rw-r--r-- 1 domoticz domoticz 214164 24 mars 17:32 tst-plugin
drwxr-xr-x 5 domoticz domoticz 4096 24 mars 17:04 web
Does somebody has an idea about the problem ?
Thank's.
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin : Broadlink
you just need to move all from Broadlink-Domoticz-plugin-main to plugins/Broadlink.
and made chmod +x to scr/*.sh
Will take a look to the extraction process.
and made chmod +x to scr/*.sh
Will take a look to the extraction process.
Re: Python Plugin : Broadlink
Hello,
I finally have been able to install the script after have downloading it in domoticz/plugin (instead of domoticz/plugin/Broadlink) and updating it in two points :
Line 284 :
Become
And from lines 339 to 364, I commented the lines like this :
As I understood, we need to create the folder "Broadlink" here : domiticz/plugin
Then copy the script in domoticz/plugin/Broadlink and execute it.
I suppose the problem is that the script downloads and unzips the files here : domoticz/plugin/Broadlink /Broadlink-Domoticz-plugin-main
But as the script is in the folder domoticz/plugin/Broadlink, he tries to execute some functiond in this folder, while the files (sub folder scr) are in reality in another folder, domoticz/plugin/Broadlink /Broadlink-Domoticz-plugin-main.
I finally have been able to install the script after have downloading it in domoticz/plugin (instead of domoticz/plugin/Broadlink) and updating it in two points :
Line 284 :
Code: Select all
command = 'sudo chmod +x scr/*.sh '
Code: Select all
command = 'sudo chmod +x Broadlink-Domoticz-plugin-main/scr/*.sh '
Code: Select all
#
# we check directory structure
###mydir = ['ini', 'lng', 'log', 'scr', 'web']
###
###for items in mydir:
### if os.path.exists(items):
### print('Directory {} exist, OK'.format(items))
###
### else:
###
### print('Error : Directory {} do not exist, verify error... exiting'.format(items))
### sys.exit()
#
# we check files
###if os.path.exists(updname):
### print('Error : zip file : {} still exist, not normal !!!'.format(updname))
### sys.exit()
###
###filelist = ['plugin.py', 'Dombroadlink.py']
###
###for items in filelist:
### if os.path.exists(items):
### print('File {} exist, OK'.format(items))
###
### else:
###
### print('Error : File {} do not exist, verify error... exiting'.format(items))
### sys.exit()
Then copy the script in domoticz/plugin/Broadlink and execute it.
I suppose the problem is that the script downloads and unzips the files here : domoticz/plugin/Broadlink /Broadlink-Domoticz-plugin-main
But as the script is in the folder domoticz/plugin/Broadlink, he tries to execute some functiond in this folder, while the files (sub folder scr) are in reality in another folder, domoticz/plugin/Broadlink /Broadlink-Domoticz-plugin-main.
Re: Python Plugin : Broadlink
I can't setup (SSID+password) the RM4 mini following the instructions. I even tried to follow the advanced ones here https://github.com/mjg59/python-broadlink that specify the ip and i get "got an unexpected keyword argument 'ip_address'" error. Is it supposed to be "BroadlinkProv" in the SSID? I can only get to normal AP mode with the light blinking fast. I connect it to the laptop (windows 10) that I am running the commands on, but nothing happens. The "broadlink.setup('myssid', 'mynetworkpass', 3)" doesnt seem to work, the device is still in AP mode. Any ideas?
Re: Python Plugin : Broadlink
I managed to connect it on my network and it gets detected in the Network Scan with a temperature reading.
However it shows as 0x520c and I cant switch the device on the Webadmin. Clicking "overwrite default device type" and selecting 0x520c from the list does nothing, its still 0x272a even after rebooting plugin or domoticz. I can see the device on the switches tabs but no temperature reading. What file is supposed to be selected on the top of the page?-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin : Broadlink
Do you have the external temp module ?
-
- Posts: 1
- Joined: Friday 25 October 2024 3:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin : Broadlink
Hello, a have a problem, the plugin same to work in log but if i try to create one new device, Broadlink with kod.......,. is not in menu.
Some one can help me,,Please.
Thank in advance!
Some one can help me,,Please.
Thank in advance!
- Attachments
-
- Log Domoticz 1st resrat Broadlink.txt
- (7.73 KiB) Downloaded 20 times
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin : Broadlink
not sure this work :
2024-10-24 22:07:18.492 Error: Brooadlink RM3 mini: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was ':/usr/lib/python311.zip:/usr/lib/python3.11:/usr/lib/python3.11/lib-dynload:/usr/local/lib/python3.11/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.11/dist-packages'.
2024-10-24 22:07:18.532 Status: RFLink: Using serial port: /dev/ttyUSB0
2024-10-24 22:07:18.628 Status: Python EventSystem: Initializing event module.
2024-10-24 22:07:18.628 Status: EventSystem: Started
2024-10-24 22:07:18.629 Status: EventSystem: Queue thread started...
2024-10-24 22:07:18.655 Error: Brooadlink RM3 mini: Exception: 'ModuleNotFoundError'. No traceback available.
2024-10-24 22:07:18.829 Status: controler Z: using config in: /home/pi/domoticz/Config
- Thuis
- Posts: 270
- Joined: Tuesday 11 September 2018 11:36
- Target OS: Linux
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: Python Plugin : Broadlink
Due to latest ubuntu 24.04 everything python is f$@#% up. Got everything python working again, but not for broadlink.
I get:
I am guessing something with a python package? I have no clue. Anyone an idea i could try ?
Thanks in advance.
I get:
- Spoiler: show
- Spoiler: show
- Spoiler: show
I am guessing something with a python package? I have no clue. Anyone an idea i could try ?
Thanks in advance.
I Love Domoticz ! And the community around it :-)
Who is online
Users browsing this forum: Google [Bot] and 1 guest