Page 8 of 27

Re: Python Plugin : Broadlink

Posted: Saturday 29 August 2020 22:24
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.

Re: Python Plugin : Broadlink

Posted: Saturday 29 August 2020 22:30
by zak45
Hi,

#
# 1.6.0 : 29/08/2020
# learn IR/RF from Web Admin Page
#
Capture.PNG
Capture.PNG (103.96 KiB) Viewed 2013 times

Re: Python Plugin : Broadlink

Posted: Sunday 30 August 2020 12:34
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 1992 times
Now I have more!!!
Capture1.JPG
Capture1.JPG (49.74 KiB) Viewed 1990 times

Re: Python Plugin : Broadlink

Posted: Sunday 30 August 2020 17:43
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.

Re: Python Plugin : Broadlink

Posted: Sunday 30 August 2020 19:18
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.

Re: Python Plugin : Broadlink

Posted: Sunday 30 August 2020 19:21
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.

Re: Python Plugin : Broadlink

Posted: Monday 31 August 2020 0:28
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!

Re: Python Plugin : Broadlink

Posted: Tuesday 01 September 2020 22:21
by zak45
Hi,
# 1.6.1 : 01/09/2020
# Folder browse refactor
#

Re: Python Plugin : Broadlink

Posted: Wednesday 02 September 2020 10:35
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

Re: Python Plugin : Broadlink

Posted: Wednesday 02 September 2020 11:03
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:

Re: Python Plugin : Broadlink

Posted: Wednesday 02 September 2020 12:22
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.

Re: Python Plugin : Broadlink

Posted: Tuesday 08 September 2020 16:59
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

Re: Python Plugin : Broadlink

Posted: Tuesday 08 September 2020 18:55
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

Re: Python Plugin : Broadlink

Posted: Tuesday 08 September 2020 19:37
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.

Re: Python Plugin : Broadlink

Posted: Tuesday 08 September 2020 20:55
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/.

Re: Python Plugin : Broadlink

Posted: Tuesday 08 September 2020 23:00
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?

Re: Python Plugin : Broadlink

Posted: Tuesday 08 September 2020 23:58
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 1812 times
You can delete all Broadlink-*.html files and restart Domoticz

Re: Python Plugin : Broadlink

Posted: Wednesday 09 September 2020 8:27
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 1780 times
and the version es 1.6.1

Re: Python Plugin : Broadlink

Posted: Wednesday 09 September 2020 10:02
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.

Re: Python Plugin : Broadlink

Posted: Friday 18 September 2020 18:38
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.