Python Plugin : Broadlink

Python and python framework

Moderator: leecollings

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 »

malliaso wrote: Saturday 29 August 2020 19:32
I am running the setup.py from within the Broadlink folder under the plugins in domoticz (actual path for reference is /home/pi/homeassistant/domoticz/plugins/BroadlinkRM2). /home/pi/homeassistant/domoticz is the config directory that i defined in my docker-compose file for domoticz (i am on a raspberry pi 3 using domoticz docker image lsioarmhf/domoticz) . So maybe that is why it is "substituting"' with /config. I have default python set as 3.7. restarted domoticz. i did the entire process from scratch just to be sure. Not getting any errors when running setup.py. All seems ok, but i am still getting the same error when adding my Broadlink RM2
\\ (Broadlink) failed to load 'plugin.py', Python Path used was '/config/plugins/BroadlinkRM2/:/usr/lib/python36.zip:/usr/lib/python3.6:/usr/lib/python3.6:/usr/lib/python3.6/lib-dynload:/usr/lib/python3.6/site-packages'.
2020-08-29 08:06:26.660 Error: (Kitchen Remote) Module Import failed, exception: 'ModuleNotFoundError'
Not sure whether it adds any info but i also tried the "old" broadlink plugin version and it seems to be working fine (i can add all RM2 remotes), just gettin constant 0 reading on temperature(although they are RMpros with temp sensors). But all command, import etc switches appear fine.

Thank you again.
try to do manual installation.
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 »

Hi,

#
# 1.6.0 : 29/08/2020
# learn IR/RF from Web Admin Page
#
Capture.PNG
Capture.PNG (103.96 KiB) Viewed 1890 times
maninblack30
Posts: 17
Joined: Thursday 10 November 2016 0:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by maninblack30 »

Hi Zac45, I just updated your plugin via the web page and it's created a whole bunch of extra pages! I have 2 devices, but now I have 8 pages!!
Also, the 2 correct pages don't load when you click on them, you need to click on it, then refresh the page.
Cheers! :-)
Ubuntu 20.04 LTS
Domoticz Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 11:47:55
dzVents Version: 3.0.2
Python Version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
Capture.JPG
Capture.JPG (63.66 KiB) Viewed 1869 times
Now I have more!!!
Capture1.JPG
Capture1.JPG (49.74 KiB) Viewed 1867 times
malliaso
Posts: 3
Joined: Saturday 29 August 2020 7:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by malliaso »

Hi ,

Thank you again for your prompt reply. I tried the manual way and still same error. Unfortunately, i dont think there is any issue with the plugin. I think the issue is Python versioning. I noticed in the Domoticz log that is says when domoticz starts PluginSystem: Started, Python version '3.6.5'."As mentioned i am on version 3.7.3 hence i believe this has something to do with the error i am getting above, since it seems to be looking into python 3.6 folders. I dont want to downgrade to 3.6 a the moment. Looked around on whether there is any way to upgrade the python version in domoticz plugin system, but there seems to be no way that does not have system-wide effects and i am running other things on the raspberry as well. So i guess i am stuck with the old plugin (that seems to be working) until the above discrepancy is somehow resolved.
Thank you for looking into this though.
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 »

malliaso wrote: Sunday 30 August 2020 17:43 Hi ,

Thank you again for your prompt reply. I tried the manual way and still same error. Unfortunately, i dont think there is any issue with the plugin. I think the issue is Python versioning. I noticed in the Domoticz log that is says when domoticz starts PluginSystem: Started, Python version '3.6.5'."As mentioned i am on version 3.7.3 hence i believe this has something to do with the error i am getting above, since it seems to be looking into python 3.6 folders. I dont want to downgrade to 3.6 a the moment. Looked around on whether there is any way to upgrade the python version in domoticz plugin system, but there seems to be no way that does not have system-wide effects and i am running other things on the raspberry as well. So i guess i am stuck with the old plugin (that seems to be working) until the above discrepancy is somehow resolved.
Thank you for looking into this though.
Agree with you... another tip, do not like it but could work, just copy the 'broadlink' module into the Broadlink folder:
for example e.g. cp /usr/local/lib/python3.7/dist-packages/broadlink <domoticz home folder>/plugins/Broadlink/broadlink
Once you have found what's wrong, remove it.
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 »

maninblack30 wrote: Sunday 30 August 2020 12:34 Hi Zac45, I just updated your plugin via the web page and it's created a whole bunch of extra pages! I have 2 devices, but now I have 8 pages!!
Also, the 2 correct pages don't load when you click on them, you need to click on it, then refresh the page.
Cheers! :-)
Ubuntu 20.04 LTS
Domoticz Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 11:47:55
dzVents Version: 3.0.2
Python Version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
yep, that's the one way I had found to be able to have the Domoticz device appear in html popup.
maninblack30
Posts: 17
Joined: Thursday 10 November 2016 0:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by maninblack30 »

zak45 wrote: Sunday 30 August 2020 19:21
yep, that's the one way I had found to be able to have the Domoticz device appear in html popup.
No worries, Thanks for you reply, this is an awesome plugin!
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 »

Hi,
# 1.6.1 : 01/09/2020
# Folder browse refactor
#
robgeisink
Posts: 7
Joined: Wednesday 27 May 2020 13:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by robgeisink »

Hi there,

Got the plugin installed and read a lot about it....
But nowhere to find a clear manual how to learn ir codes and make a "Button" for it in domoticz.
I have a aircon and i would like some switches to control it. like;
on/off
Temp settings
mode (auto)
and so on.
Where can i find a clear manual to add these buttons end connect them to ir?

Kind regards
robgeisink
Posts: 7
Joined: Wednesday 27 May 2020 13:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by robgeisink »

zak45 wrote: Tuesday 07 July 2020 21:44 Great that you have it working.
Do not forget to remove the debug mode !
How?...Ican't find anywhere how to learn a ir code and how to connect it to my aircon???? :cry:
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 »

robgeisink wrote: Wednesday 02 September 2020 11:03
zak45 wrote: Tuesday 07 July 2020 21:44 Great that you have it working.
Do not forget to remove the debug mode !
How?...Ican't find anywhere how to learn a ir code and how to connect it to my aircon???? :cry:
You should found information on this topic, all of this work is done on spare time, so ...
With the last version, all (more or less) should be done from the WebAdmin Page and hope with self-explanary labels.
In case of trouble, just come back.
runy
Posts: 11
Joined: Monday 28 January 2019 15:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by runy »

zak45 wrote: Sunday 30 August 2020 19:21
maninblack30 wrote: Sunday 30 August 2020 12:34 Hi Zac45, I just updated your plugin via the web page and it's created a whole bunch of extra pages! I have 2 devices, but now I have 8 pages!!
Also, the 2 correct pages don't load when you click on them, you need to click on it, then refresh the page.
Cheers! :-)
Ubuntu 20.04 LTS
Domoticz Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 11:47:55
dzVents Version: 3.0.2
Python Version: 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
yep, that's the one way I had found to be able to have the Domoticz device appear in html popup.
Hi zak45,

I have got three devices RM3 mini. The plugin has detected all and now I have six new pages but always shows me the same device
I tried with three browsers and clean cache bud didn't work
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 »

runy wrote: Tuesday 08 September 2020 16:59
I have got three devices RM3 mini. The plugin has detected all and now I have six new pages but always shows me the same device
Hi,
show me content of : \Domoticz\www\templates
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 »

zak45 wrote: Tuesday 08 September 2020 18:55
runy wrote: Tuesday 08 September 2020 16:59
I have got three devices RM3 mini. The plugin has detected all and now I have six new pages but always shows me the same device
Hi,
show me content of : \Domoticz\www\templates
have seen a problem into the code, just update your plugin.
nicholosonjack
Posts: 1
Joined: Tuesday 08 September 2020 20:52
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by nicholosonjack »

Open a terminal session, go to Broadlink directory and execute this command : python setup.py (tested on Windows with admin right, maybe need sudo on linux e.g; : sudo python setup.py)

Provide response to questions.
Restart Domoticz.
Create a new hardware, type : Broadlink with Kodi Remote

Manual installation:
download all files from provided link to the Broadlink directory.
install these required modules:
['googletrans', 'translate', 'requests', 'requests_toolbelt']
for Broadlink module, install the provided version not the one from pip:
for win : python -m pip install python-broadlink-master/.
for other : sudo -H python -m pip install python-broadlink-master/.
US Travelers planning to visit Baku can check mandatory information required for applying Azerbijan Visa for US citizens here.
runy
Posts: 11
Joined: Monday 28 January 2019 15:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by runy »

zak45 wrote: Tuesday 08 September 2020 19:37
zak45 wrote: Tuesday 08 September 2020 18:55
runy wrote: Tuesday 08 September 2020 16:59
I have got three devices RM3 mini. The plugin has detected all and now I have six new pages but always shows me the same device
Hi,
show me content of : \Domoticz\www\templates
have seen a problem into the code, just update your plugin.
I have updated the plugin but I have the same error, three webpages but the only one device. My template folder is:
Broadlink-RM24M-16.html Broadlink-RM2M-15-126.html custom.example
Broadlink-RM24M-17.html Broadlink-RM2M-15-133.html readme.txt
Broadlink-RM2M-15-125.html Broadlink-RM2M-15.html

how to I can see the version of the plugin?
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 »

runy wrote: Tuesday 08 September 2020 23:00
how to I can see the version of the plugin?
Capture.PNG
Capture.PNG (100.8 KiB) Viewed 1689 times
You can delete all Broadlink-*.html files and restart Domoticz
runy
Posts: 11
Joined: Monday 28 January 2019 15:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by runy »

zak45 wrote: Tuesday 08 September 2020 23:58
runy wrote: Tuesday 08 September 2020 23:00
how to I can see the version of the plugin?
Capture.PNG

You can delete all Broadlink-*.html files and restart Domoticz
Didn't work for me...
The plugin found the devices

Code: Select all

Found 3 devices --2020-09-09 08:17:33
###########################################
Device : RM4
Devtype : 0x5f36 Host : 192.168.2.53 Mac : 24dfa77ac746

###########################################
Device : RM2
Devtype : 0x2737 Host : 192.168.2.12 Mac : c8f74254bc0a
temperature = 0.0
###########################################
Device : RM4
Devtype : 0x5f36 Host : 192.168.2.52 Mac : c8f742402841
and I have created the three devices
broadlink.jpg
broadlink.jpg (78.95 KiB) Viewed 1657 times
and the version es 1.6.1
runy
Posts: 11
Joined: Monday 28 January 2019 15:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by runy »

Ok, it's working!!! I have deleted all Broadlink devices and create again and now it's workig.

just for your information, two Rm3 mini are new and only use the Broadlink app to connect them to my network, but I have another RM3 mini older (three years maybe) and for this I need to complete the process in the Broadlinkg app to work fine.
yo3ggx
Posts: 14
Joined: Tuesday 03 September 2019 13:13
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by yo3ggx »

I have a RM2 Pro and installed the plugin successfully. I want to add a new RF device (an X10rf remote), but no device is created after clicking on save. What's the normal procedure to add a new RF command?

Thank you.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest