Python Plugin: Broadlink RM2 V3

Python and python framework

Moderator: leecollings

Post Reply
kalinkamaen
Posts: 52
Joined: Sunday 04 January 2015 15:57
Target OS: Windows
Domoticz version: 2022.2
Location: Norway
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by kalinkamaen »

Thank you, that helped. Its working now :)
Windows 10, Domoticz 14784
sennheiser
Posts: 11
Joined: Wednesday 16 August 2017 10:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by sennheiser »

Hi,

Someone can help me with the Broadlink Remote ?

Thx

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

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

sennheiser wrote: Monday 28 August 2017 17:23 Hi,

Someone can help me with the Broadlink Remote ?

Thx

S
please provide more information if you want some help.. put also plugin in debug mode and publish log file.
sennheiser
Posts: 11
Joined: Wednesday 16 August 2017 10:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by sennheiser »

zak45 wrote: Monday 28 August 2017 17:36
sennheiser wrote: Monday 28 August 2017 17:23 Hi,

Someone can help me with the Broadlink Remote ?

Thx

S
please provide more information if you want some help.. put also plugin in debug mode and publish log file.
I don't have the ini file for the remote commande so I can't turn on ..

The log :
>>ini file not found: /home/pi/domoticz/plugins/TEST/BroadlinkRM2-4-254.ini

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

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

@sennheiser
doesn't matter if you have ini file.
put plugin in debug
Capture.JPG
Capture.JPG (113.19 KiB) Viewed 3085 times
sennheiser
Posts: 11
Joined: Wednesday 16 August 2017 10:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by sennheiser »

@zak45

2017-08-28 22:30:05.868 User: Admin initiated a switch command (11/Broadlink - Remote/On)
2017-08-28 22:30:05.907 (Broadlink) Calling message handler 'onCommand'.
2017-08-28 22:30:05.907 (Broadlink) onCommand called for Unit 254: Parameter 'On', Level: 0 , Connected : True
2017-08-28 22:30:05.908 (Broadlink) Generate on Command for learned code stored on unit/ini :254
2017-08-28 22:30:05.914 (Broadlink) Code loaded : b20184030a22210b0b210b210b22200c0a0001570a220a220a220a220b210b210b220a220a220a220a220a220a22210b0b21210c0a22200c0a22200c0a220b210b21210c0a0001570a220a220a220a220b210a220b210b220a$
2017-08-28 22:30:06.353 (Broadlink) Connected to Broadlink device.
2017-08-28 22:30:06.353 Error: (Broadlink) 'onCommand' failed 'ValueError':'non-hexadecimal number found in fromhex() arg at position 178'.
2017-08-28 22:30:06.353 Error: (Broadlink) ----> Line 217 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2017-08-28 22:30:06.353 Error: (Broadlink) ----> Line 319 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function genCommand
2017-08-28 22:30:06.353 Error: (Broadlink) ----> Line 448 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function send
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

thanks @sennheiser
but need to have full log, this include all the parameters.
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by markjgabb »

hey zak

im in a similar boat to other people....

ive loaded the plugin according to the wiki,
when i load it it complains of no place to put ini files...that was my bad....
after i added the path to a location to store ini, the system went under a kinda crash
it shows no hardware, no ability to add hardware, all devices and everything else is gone....
if i remove the ini folder everything returns, but obviously no ability to use it....
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
sennheiser
Posts: 11
Joined: Wednesday 16 August 2017 10:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by sennheiser »

zak45 wrote: Monday 28 August 2017 23:27 thanks @sennheiser
but need to have full log, this include all the parameters.

Code: Select all

2017-08-29 07:49:14.070 MQTT: connected to: localhost:1883
2017-08-29 07:49:14.132 (Broadlink) Connected to Broadlink device.
2017-08-29 07:49:14.132 (Broadlink) Device Number begin to : 15
2017-08-29 07:49:14.158 (Broadlink) ini file read..../home/pi/domoticz/plugins/BroadlinkRM2ini/remote/plugin_remote_4.ini
2017-08-29 07:49:14.158 (Broadlink) Custom Commands:
2017-08-29 07:49:14.158 (Broadlink) Heartbeat interval set to: 30.
2017-08-29 07:49:14.170 MQTT: Subscribed
2017-08-29 07:49:14.689 Incoming connection from: 192.168.0.52
2017-08-29 07:49:14.757 (Zwave) Usage (Unknown)
2017-08-29 07:49:14.766 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:14.807 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:14.854 (Zwave) Usage (Unknown)
2017-08-29 07:49:14.863 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:14.903 (Zwave) Light/Switch (Alarm Type)
2017-08-29 07:49:14.910 (Zwave) Light/Switch (Alarm Level)
2017-08-29 07:49:14.915 (Zwave) General/Alarm (Alarm Type: Heat 4 (0x04))
2017-08-29 07:49:14.923 (Zwave) Light/Switch (Heat)
2017-08-29 07:49:14.953 (Zwave) Light/Switch (Alarm Type)
2017-08-29 07:49:14.961 (Zwave) Light/Switch (Alarm Level)
2017-08-29 07:49:14.965 (Zwave) General/Alarm (Alarm Type: Power Management 8 (0x08))
2017-08-29 07:49:14.974 (Zwave) Light/Switch (Power Management)
2017-08-29 07:49:14.999 OpenZWave: All Nodes queried
2017-08-29 07:49:15.001 (Zwave) Light/Switch (Alarm Type)
2017-08-29 07:49:15.008 (Zwave) Light/Switch (Alarm Level)
2017-08-29 07:49:15.012 (Zwave) General/Alarm (Alarm Type: System 9 (0x09))
2017-08-29 07:49:15.020 (Zwave) Light/Switch (System)
2017-08-29 07:49:18.746 Incoming connection from: 192.168.0.62
2017-08-29 07:49:23.175 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:49:23.460 (Weather) Temp + Humidity + Baro (THB)
2017-08-29 07:49:23.469 (Weather) Wind (Vent)
2017-08-29 07:49:23.493 (Weather) Rain (Pluie)
2017-08-29 07:49:26.548 PROXY: Authenticate result: success.
2017-08-29 07:49:27.579 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:27.624 (Zwave) Usage (Unknown)
2017-08-29 07:49:27.634 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:39.680 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:39.725 (Zwave) Usage (Unknown)
2017-08-29 07:49:39.735 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:49:53.181 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:50:10.783 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/lua/script_time_waze.lua has been running for more than 10 seconds
2017-08-29 07:50:12.010 LUA: 49mn55 par A4
2017-08-29 07:50:12.013 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_waze.lua
2017-08-29 07:50:15.878 (Zwave) Usage (Unknown)
2017-08-29 07:50:15.885 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:50:23.189 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:50:23.232 (Temp Salon) Updating device from 1:'28.3' to have values 1:'28.2'.
2017-08-29 07:50:23.238 (Broadlink) Update 1:'28.2' (Temp Salon)
2017-08-29 07:50:27.932 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:50:27.979 (Zwave) Usage (Unknown)
2017-08-29 07:50:27.986 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:50:40.032 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:50:40.080 (Zwave) Usage (Unknown)
2017-08-29 07:50:40.088 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:50:53.194 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:51:16.236 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:51:16.283 (Zwave) Usage (Unknown)
2017-08-29 07:51:16.291 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:51:23.199 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:51:28.338 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:51:28.385 (Zwave) Usage (Unknown)
2017-08-29 07:51:28.393 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:51:53.207 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:52:04.539 (Zwave) Usage (Unknown)
2017-08-29 07:52:04.566 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:52:10.330 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/lua/script_time_waze.lua has been running for more than 10 seconds
2017-08-29 07:52:10.516 LUA: 50mn47 par A4
2017-08-29 07:52:10.536 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_waze.lua
2017-08-29 07:52:16.592 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:52:16.639 (Zwave) Usage (Unknown)
2017-08-29 07:52:16.647 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:52:23.209 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:52:23.652 (Temp Salon) Updating device from 1:'28.2' to have values 1:'28.2'.
2017-08-29 07:52:23.658 (Broadlink) Update 1:'28.2' (Temp Salon)
2017-08-29 07:52:28.693 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:52:28.740 (Zwave) Usage (Unknown)
2017-08-29 07:52:28.748 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:52:53.260 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:53:04.913 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:53:04.943 (Zwave) Usage (Unknown)
2017-08-29 07:53:04.951 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:53:16.998 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:53:17.045 (Zwave) Usage (Unknown)
2017-08-29 07:53:17.053 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:53:23.260 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:53:50.306 Incoming connection from: 127.0.0.1
2017-08-29 07:53:53.199 (Zwave) Usage (Unknown)
2017-08-29 07:53:53.207 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:53:53.264 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:54:05.263 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:54:05.301 (Zwave) Usage (Unknown)
2017-08-29 07:54:05.310 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:54:10.373 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/lua/script_time_waze.lua has been running for more than 10 seconds
2017-08-29 07:54:10.956 LUA: 50mn48 par A4
2017-08-29 07:54:10.959 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_waze.lua
2017-08-29 07:54:17.355 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:54:17.401 (Zwave) Usage (Unknown)
2017-08-29 07:54:17.409 (Zwave) General/kWh (kWh Meter)
2017-08-29 07:54:23.272 (Broadlink) Calling message handler 'onHeartbeat'.
2017-08-29 07:54:23.312 (Temp Salon) Updating device from 1:'28.2' to have values 1:'28.2'.
2017-08-29 07:54:23.318 (Broadlink) Update 1:'28.2' (Temp Salon)
Capture d’écran 2017-08-29 à 07.53.23.png
Capture d’écran 2017-08-29 à 07.53.23.png (72.69 KiB) Viewed 3051 times
srill
Posts: 6
Joined: Tuesday 29 August 2017 15:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by srill »

Hi,
I installed the plugin in my Rpi3 and i want to use it with my Broadlink RM3 mini. On time it works but i had to reinstall the plugin.
Now when i click on learn the LED is On but xxx-command doesn't put On and nothing is learned. :|
I'm on domoticz Version: 3.8153

Could you help me please?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

@sennheiser
your ini file for remote customization is :
/home/pi/domoticz/plugins/BroadlinkRM2ini/remote/plugin_remote_4.ini

you need to edit it and put under command param / section [custom] the ini file you want to affect to each button.
Have seen that you should have more or less 10 switchs created so this could be like that (just example) :
[Custom]
command = 5, 8, 6

in this case when you click on Home button, this will execute /home/pi/domoticz/plugins/BroadlinkRM2ini/broadlink_5.ini
by clicking on Up this will execute /home/pi/domoticz/plugins/BroadlinkRM2ini/broadlink_8.ini
etc...
see wiki for that.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

srill wrote: Tuesday 29 August 2017 15:29 Hi,
I installed the plugin in my Rpi3 and i want to use it with my Broadlink RM3 mini. On time it works but i had to reinstall the plugin.
Now when i click on learn the LED is On but xxx-command doesn't put On and nothing is learned. :|
I'm on domoticz Version: 3.8153

Could you help me please?
you have trouble on IR or RF command ?
srill
Posts: 6
Joined: Tuesday 29 August 2017 15:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by srill »

my problem is only on IR and i haven't got any error in the log.
sennheiser
Posts: 11
Joined: Wednesday 16 August 2017 10:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by sennheiser »

@zak45

Hi,

I dont understand. It didn't work before and now it's okay so I didn't touch anything.

But thanks for you help.

Yes I saw the wiki it's ok for me now.

Just a last question,

In "command" it's possible to use a script instead of Broadlink ini ? Because I can command my TV with

script:///usr/local/bin/iSamsungTV F 192.168.0.xxx -KEY KEY_HDMI

for exemple and I want to use the remote command.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

sennheiser wrote: Tuesday 29 August 2017 17:55 @zak45

Hi,

I dont understand. It didn't work before and now it's okay so I didn't touch anything.

But thanks for you help.

Yes I saw the wiki it's ok for me now.

Just a last question,

In "command" it's possible to use a script instead of Broadlink ini ? Because I can command my TV with

script:///usr/local/bin/iSamsungTV F 192.168.0.xxx -KEY KEY_HDMI

for exemple and I want to use the remote command.
happy that it works...
no way to put script.
Do you have tried the Samsung Python plugin: in the last version, have put also the remote feature.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

srill wrote: Tuesday 29 August 2017 17:45 my problem is only on IR and i haven't got any error in the log.
let's try with Broadlink officiall application and import the json files.
srill
Posts: 6
Joined: Tuesday 29 August 2017 15:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by srill »

srill wrote: Tuesday 29 August 2017 17:45 my problem is only on IR and i haven't got any error in the log.
@zak45
I don't find any ini file too in the directory it should be. Is it normal?
srill
Posts: 6
Joined: Tuesday 29 August 2017 15:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by srill »

zak45 wrote: Tuesday 29 August 2017 19:25
srill wrote: Tuesday 29 August 2017 17:45 my problem is only on IR and i haven't got any error in the log.
let's try with Broadlink officiall application and import the json files.
Oups, i'm not a developper and i don't know how to do that :oops:
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 »

srill wrote: Tuesday 29 August 2017 19:27
srill wrote: Tuesday 29 August 2017 17:45 my problem is only on IR and i haven't got any error in the log.
@zak45
I don't find any ini file too in the directory it should be. Is it normal?
to generate a ini file, in Domoticz you need to click on learn, near Broadlink device press your remote button, if all is ok, in Domoticz click on save.
srill
Posts: 6
Joined: Tuesday 29 August 2017 15:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by srill »

zak45 wrote: Tuesday 29 August 2017 20:05
srill wrote: Tuesday 29 August 2017 19:27
srill wrote: Tuesday 29 August 2017 17:45 my problem is only on IR and i haven't got any error in the log.
@zak45
I don't find any ini file too in the directory it should be. Is it normal?
to generate a ini file, in Domoticz you need to click on learn, near Broadlink device press your remote button, if all is ok, in Domoticz click on save.
I do this but Domoticz say "nothing to save" that's why i haven't got any ini file... :(
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest