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 »

do you run setup.py with sudo ????

Please provides Domoticz version, Python version and OS version.
If you are on Bulleseye you must use the latest Domoticz from development branch as the Stable 2022.1 is not compatible with the Python3.9 embedded with Bulleseye or downgrade to python 3.8
pfloryann
Posts: 174
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.1
Contact:

Re: Python Plugin : Broadlink

Post by pfloryann »

zak45 wrote: Monday 09 May 2022 23:16 No problem to have more than one device.
you need to create two hardware in domoticz.
I solved the problem was from the listener port. I changed to 9001 from the second Broadlink and 9000 for the first. Thank you!
Domoticz on Raspberry Pi 4 with Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy
DrMacabre
Posts: 74
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 »

Hello,

What are these errors ?

Code: Select all

 2022-05-12 13:13:25.594 Error: RM2 Salon: Unknown verb in request: HEAD
2022-05-12 13:13:25.594 Error: RM2 Salon: Nothing to do ...
2022-05-12 13:13:26.347 Error: RM2 Salon: ERROR Unknown key from : 165.22.229.28:44630 to : /system_api.php
2022-05-12 13:13:26.347 Error: RM2 Salon: Nothing to do ...
2022-05-12 13:13:26.999 Error: RM2 Salon: ERROR Unknown key from : 165.22.229.28:44972 to : /c/version.js
2022-05-12 13:13:27.000 Error: RM2 Salon: Nothing to do ...
2022-05-12 13:13:27.702 Error: RM2 Salon: ERROR Unknown key from : 165.22.229.28:45394 to : /streaming/clients_live.php
2022-05-12 13:13:27.702 Error: RM2 Salon: Nothing to do ...
2022-05-12 13:13:28.355 Error: RM2 Salon: ERROR Unknown key from : 165.22.229.28:45824 to : /stalker_portal/c/version.js
2022-05-12 13:13:28.355 Error: RM2 Salon: Nothing to do ...
2022-05-12 13:13:29.007 Error: RM2 Salon: ERROR Unknown key from : 165.22.229.28:46186 to : /stream/live.php
2022-05-12 13:13:29.007 Error: RM2 Salon: Nothing to do ...
2022-05-12 13:13:29.660 Error: RM2 Salon: ERROR Unknown key from : 165.22.229.28:46530 to : /flu/403.html
2022-05-12 13:13:29.660 Error: RM2 Salon: Nothing to do ...
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 »

you have some process sending requests to the plugin listener port.
this come from this address : 165.22.229.28
DrMacabre
Posts: 74
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 »

zak45 wrote: Thursday 12 May 2022 23:39 you have some process sending requests to the plugin listener port.
this come from this address : 165.22.229.28
my question was more about if this is normal behavior for the plugin, what's 165.22.229.28 ? that's none of my devices IP

got another on today

Code: Select all

Error: RM2 Salon: Async Read Exception (193.142.146.216:58636): 104, Connection reset by peer
btw it's named RM2 but it's the new RM4 that i used to replace the dead RM2, i just kept the name of the device to not mess with all my setup.
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 »

if this is no one of your address, so you have some security concern.
This is not normal behavior of the plugin and this kind of Error has been set to provide some kind of alert.
You need to be sure that the pugin port can not been accessed from outside (WAN), verify your LAN/Port redirection, should be something wrong with.
DrMacabre
Posts: 74
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 »

Yeah, that’s what i thought.

Thank you.
solarboy
Posts: 333
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Python Plugin : Broadlink

Post by solarboy »

Hi, looking for a bit of help from someone who knows this plugin better than myself.

I have managed to install the plug in and it is able to discover and connect to my RM3 mini (0x5F36). I have it set as "Remote Control Mini RM2/3" in the Domoticz hardware page entry.

However, I am not able to set the device correctly in the "overwrite default device type" from 0x272a to 0x5f36 in the webadmin page as after I hit "update". The device type reverts to 0x272a after a plugin restart.

I presume this is why I am unable to "learn" IR codes failing with the following error;

Code: Select all

2022-07-29 13:33:34.428  Status: User: Admin (IP: 192.168.2.18) initiated a switch command (1912/Broadlink2 - IR Commands/Set Level)
2022-07-29 13:33:34.468  (Broadlink2 - RM2M-Status) Updating device from 0:'Off' to have values 1:'Learn IR command'.
2022-07-29 13:33:34.595  (Broadlink2 - IR Commands) Updating device from 0:'Off' to have values 1:'10'.
2022-07-29 13:33:38.424  (Broadlink2) Deallocating connection object '127.0.0.1:60138' (127.0.0.1:60138).
2022-07-29 13:33:38.429  Queued asynchronous read aborted (127.0.0.1:60140), [2] End of file.
2022-07-29 13:33:38.476  (Broadlink2) Deallocating connection object '127.0.0.1:60140' (127.0.0.1:60140).
2022-07-29 13:33:38.477  (Broadlink2 - RM2M-Status) Updating device from 1:'Learn IR command' to have values 1:'Error to learn IR code'.
So far I have tried various different device types in the Domoticz hardware page with no result. I have also tried to search for an INI file that defines the hardware type with no result. I have read this thread from beginning to end. Or perhaps I am missing something else ?
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 333
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Python Plugin : Broadlink

Post by solarboy »

It appears the install instructions almost anywhere online are out of date. I was finally able to get things working using the instructions here
https://gist.github.com/jovimon/1c23681 ... 42347dabf7
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

Hello everyone and congratulations to zak45 for this very useful plugin.

I would like to create a switch in Domoticz with several options to easily select the temperature of an air conditioner :
Capture.PNG
Capture.PNG (12.94 KiB) Viewed 2341 times
For this pupose, I want to use the following command with several .ini files:

Code: Select all

http://10.0.0.11:9000/SendCode?key=AABBCCDDEEFF?ini=Broadlink-7-010.ini
But in the log, I get this message:

Code: Select all

2022-09-27 18:30:04.608 Error: Infrared: Unknown url error from: 10.0.0.11: 58049 for: /SendCode?key=AABBCCDDEEFF&ini=Broadlink-7-010. ini
On a browser, with the same command, the screen shows "Broadlink not know what to do!"...

Can you give me the exact syntax of the command?
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 »

Aile wrote: Tuesday 27 September 2022 18:51

Code: Select all

http://10.0.0.11:9000/SendCode?key=AABBCCDDEEFF?ini=Broadlink-7-010.ini
Can you give me the exact syntax of the command?
Hi, should be something like this: (replace second ? by &)

Code: Select all

http://10.0.0.11:9000/SendCode?key=AABBCCDDEEFF&ini=Broadlink-7-010.ini
Tip: On the plugin Admin web page, for each captured command (RF or IR) , if you click on the World Icon (http link), should appear the http command for the corresponding ini file...
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

zak45 wrote: Tuesday 27 September 2022 23:51 Hi, should be something like this: (replace second ? by &)

Code: Select all

http://10.0.0.11:9000/SendCode?key=AABBCCDDEEFF&ini=Broadlink-7-010.ini
I tried too, but the response is the same: "Broadlink doesn't know what to do!"
zak45 wrote: Tuesday 27 September 2022 23:51 Tip: On the plugin Admin web page, for each captured command (RF or IR) , if you click on the World Icon (http link), should appear the http command for the corresponding ini file...
This button does not work, as well as the "#" button, while the "edit" button works.
I also can't use the "View Code" button.
Maybe I have to delete the order to recreate it?
However, the air conditioner receives the order and executes it when I press the button created in Domoticz.
Nothing happens when I press the "Send code" button in the plugin Admin web page.
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 »

All of the buttons that do not work, call some jQuery functions....

You can execute the WebAdmin page without Domoticz web interface, just enter: http://10.0.0.11:9000
This will help to debug as it's look like related to your installation.

If you are on linux, verify your rights.

Once you have opened the WebAdmin page, right-click on some blank area, the contextual menu should give you option to see source code.
Do that and verify that you can access the "link href" defined in the <head> section and these two links:
http://10.0.0.11:8080/js/jquery-3.4.1.min.js
http://10.0.0.11:8080/js/jquery-ui.min.js
(here, we suppose that your Domoticz port is 8080)
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

Many thanks zak !
For some strange reason, the file jquery-3.4.1.min.js was missing from the js directory.
Everything works now !
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

If I may, I have another question:
Can I create a temperature sensor in Domoticz that uses the temperature information from the Broadlink rm4 mini?
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 »

Aile wrote: Thursday 29 September 2022 12:58 If I may, I have another question:
Can I create a temperature sensor in Domoticz that uses the temperature information from the Broadlink rm4 mini?
let's try with "Remote control RM4 with temp" as device type, this should create Domoticz temperature device.
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

Great ! It works. The device appeared in temperature sensors.
Thanks again :)
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

Unfortunately, the Broadlink RM4 mini does not work with "Remote control RM4 with temp" as device type.
The message is "File not found" in Webadmin.
So I removed the temperature sensor to try a device search with the correct product (RM4 mini), unsuccessful.
However, the temperature sensor is well recognized in Webadmin.
Would you have a solution?
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 »

Hummm... need more information.
Explain "The message is "File not found" in Webadmin.": where did you see that?, maybe provide some screenshot etc ...
Aile
Posts: 8
Joined: Tuesday 27 September 2022 11:05
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin : Broadlink

Post by Aile »

Hi zak,
My device is a Broadlink RM4 mini. When I choose "Remote Control RM4 with Temp" in Domoticz hardware (instead of "Remote Control mini RM4"), the WebAdmin page at http://10.0.0.11:9000/ shows only "File not found".
I think it is normal because it is not the correct device. When I put "Remote Control mini RM4" again, the WebAdmin works again.

My concern is about creating a temperature device (and may be humidity too?) related with my Broadlink RM4 mini.
I noticed that my device ID for the Broadlink is 0x520c, but it's not in the list of devices in WebAdmin.
May be you can add this ID in the list (or explain how to do that ;-) ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest