Python Plugin : Broadlink

Python and python framework

Moderator: leecollings

User avatar
rolandtwilt
Posts: 74
Joined: Monday 05 October 2020 18:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by rolandtwilt »

I don't understand and sorry for the english
I use google translate.
I keep getting the same error code, who can help me?

2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/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'.
2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) Module Import failed, exception: 'ModuleNotFoundError'
2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) Module Import failed: ' Name: requests_toolbelt'
2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) Error Line details not available.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

rolandtwilt wrote: Monday 30 August 2021 11:48 I don't understand and sorry for the english
I use google translate.
I keep getting the same error code, who can help me?

2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/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'.
2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) Module Import failed, exception: 'ModuleNotFoundError'
2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) Module Import failed: ' Name: requests_toolbelt'
2021-08-30 11:19:55.715 Error: Broadlink: (Broadlink) Error Line details not available.
This error you get when installation of the modules is not performed correctly in your environment.
Try setup with sudo

Code: Select all

sudo python setup.py
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
rolandtwilt
Posts: 74
Joined: Monday 05 October 2020 18:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by rolandtwilt »

pi@raspberrypi:~/domoticz/plugins/BroadlinkRM2 $ sudo pip3 install pyaes
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pyaes in /usr/local/lib/python3.7/dist-packages (1.6.1)
Help?
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

Why not run "sudo python setup.py"

pyaes is not the module that gives issues, and the installation indicates that it is already installed, so no problem. It is the requests-toolbelt.
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
rolandtwilt
Posts: 74
Joined: Monday 05 October 2020 18:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by rolandtwilt »

waltervl wrote: Monday 30 August 2021 16:11 Why not run "sudo python setup.py"

pyaes is not the module that gives issues, and the installation indicates that it is already installed, so no problem. It is the requests-toolbelt.
Thanks for your patience

pi@raspberrypi:~ $ sudo python setup.py
python: can't open file 'setup.py': [Errno 2] No such file or directory

everything is in the directory: /home/pi/domoticz/plugins/BroadlinkRM2

so that's not good?
Phyton is already running for me, so I don't get it...

pi@raspberrypi:~ $ python3 --version
Python 3.7.3
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

Well I am not using this plugin but according the first post of this topic and its installation procedure there should be a setup.py file. Perhaps you need to add execute rights to the setup.py.

According what instructions did you install the plugin?

else try
sudo pip3 install requests-toolbelt
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
rolandtwilt
Posts: 74
Joined: Monday 05 October 2020 18:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by rolandtwilt »

waltervl wrote: Tuesday 31 August 2021 16:26 Well I am not using this plugin but according the first post of this topic and its installation procedure there should be a setup.py file. Perhaps you need to add execute rights to the setup.py.

According what instructions did you install the plugin?

else try
sudo pip3 install requests-toolbelt
I have used and followed the instructions from this forum.
(sudo pip3 install requests-toolbelt) works.
but after een reboot i get:
2021-09-01 18:21:48.209 Error: Broadlink: (Broadlink) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Broadlink/:/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'.
2021-09-01 18:21:48.209 Error: Broadlink: (Broadlink) Module Import failed, exception: 'AttributeError'
2021-09-01 18:21:48.210 Error: Broadlink: (Broadlink) Error Line details not available.

I get discouraged. This weekend I will provide an empty sd-card with new os and new Domticz and then try again. Or do you have any tips?
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

As I cannot download the plugin source I have no idea.

You can check in the plugin.py to see what modules should be used. Those modules should be installed with

sudo pip3 install <module name>
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

rolandtwilt wrote: Wednesday 01 September 2021 18:30 I get discouraged. This weekend I will provide an empty sd-card with new os and new Domticz and then try again. Or do you have any tips?
The simplest way to install is to use the setup.py procedure.
Be sure that all pre request are in place and the most important one, your default python version need to be 3.x and not 2.x.

what's the output of this command ?? :

sudo python --version
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

zak45 wrote: Thursday 02 September 2021 10:36 The simplest way to install is to use the setup.py procedure.
Be sure that all pre request are in place and the most important one, your default python version need to be 3.x and not 2.x.

what's the output of this command ?? :

sudo python --version
Hello @zak45. Is it possible to upload this plugin to github as it would facilitate better support including downloads
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

@waltervl,
what kind of trouble with the download ?
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

zak45 wrote: Thursday 02 September 2021 13:58 @waltervl,
what kind of trouble with the download ?
https://synnas.publicvm.com:4430/s/Czn9r8G8QwrZ7ji to download setup.py. I cannot open it, some users here neither.

Edit: Perhaps put it as a ZIP as attachment to the first post?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

waltervl wrote: Thursday 02 September 2021 15:51 https://synnas.publicvm.com:4430/s/Czn9r8G8QwrZ7ji to download setup.py. I cannot open it, some users here neither.

Edit: Perhaps put it as a ZIP as attachment to the first post?
Thanks for the information.
Please, try this two links and provide any error: usually nextcloud manage that very well, except when my server is down for x reasons ... :)
nextcloud.png
nextcloud.png (60.68 KiB) Viewed 1672 times
the 1 should give you a possibility to download all files in zip format
the 2 should give you a choice depend of your os settings for py files.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin : Broadlink

Post by waltervl »

I see the link works on my other network so it will be a proxy/firewall issue on my side.
Nevertheless, most Domoticz plugins are stored on github so people can submit changes/enhancements/issues to your plugin.
See wiki page https://www.domoticz.com/wiki/Plugins for an overview.

Off-course you are free to do whatever you like, it is your plugin ;-)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
kollemt
Posts: 29
Joined: Monday 18 February 2019 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Broadlink

Post by kollemt »

I am using the plugin 4.2.0 by zak45 in Domoticz and have the problem that occasionally get an error that the RM3 does not have a connection anymore with the message : error connecting to broadlink device.
Will the new plugin resolve my issue?
If yes what to do to install your modified plugin on my Raspberry pi with Linux Debian, including the steps to remove the current 4.2.0 version?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Broadlink

Post by zak45 »

kollemt wrote: Thursday 09 September 2021 15:08 I am using the plugin 4.2.0 by zak45 in Domoticz and have the problem that occasionally get an error that the RM3 does not have a connection anymore with the message : error connecting to broadlink device.
Will the new plugin resolve my issue?
If yes what to do to install your modified plugin on my Raspberry pi with Linux Debian, including the steps to remove the current 4.2.0 version?
you should find all informations on this forum... but
see the first post and this one :viewtopic.php?f=65&t=33223&p=259571&hil ... rt#p259571
kalinkamaen
Posts: 52
Joined: Sunday 04 January 2015 15:57
Target OS: Windows
Domoticz version: 2022.2
Location: Norway
Contact:

Re: Python Plugin : Broadlink

Post by kalinkamaen »

Latest Domoticz beta
Python version: 3.9.7
Windows 10

PLugin is working but doesnt find any devices. It is working on another computer with same setup.

Image
Windows 10, Domoticz 14784
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

kalinkamaen wrote: Wednesday 13 October 2021 17:58 Latest Domoticz beta
Python version: 3.9.7
Windows 10

PLugin is working but doesnt find any devices. It is working on another computer with same setup.

Image
Sorry, this topic is not for this plugin.
DrMacabre
Posts: 71
Joined: Monday 26 December 2016 16:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11590
Location: France
Contact:

Re: Python Plugin : Broadlink

Post by DrMacabre »

Hi guys,

i'm giving another try to this but i don't get how to import the json files from e-control. The wiki is outdated and refers to some device that is not there anymore.

Thanks for any help.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink

Post by zak45 »

DrMacabre wrote: Friday 07 January 2022 16:53 Hi guys,

i'm giving another try to this but i don't get how to import the json files from e-control. The wiki is outdated and refers to some device that is not there anymore.

Thanks for any help.
to summarize:
you generate the json file with the e-control application.(android)
you transfer jsonSubIr, jsonButton & jsonIrCode under your domoticzPlugin/import directory (android)
you click on the e-control button, this should generate corresponding ini files (domoticz)
you click on import button (domoticz)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest