Control Aircon with Broadlink Black Bean (RM 3 Mini) IR Controller

It seem to be working now i updated the code.

BlackBeanControl.ini

[General]
IPAddress = 192.168.38.171
Port = 80
MACAddress = c8:f7:42:16:b3:c6
Timeout = 10

[Commands]
AirconON = 2600d8000001279411381136131312130f1510141237113811381138113911131113121211381113111410141014111312121138113812371213111311131113111311141014101411131113121211131312103910141237111311131113111410141113111311131113121310141014111312371212111311141212111311131212111311131114101411131212111311131113111410141113111311131113111312381014101411131113111311141014101411131212113811131139101411131113111312121138113910391137121311131138113911000d05
AirconOFF = 2600d800000127941237123811131113121211131138123810391039113811131114101410391014111311131113111312131039103911381113121212121213101411131113111311131114111310141113113811131237111411131014111311131113121211141014111311131212111410381114101411131113111312121114101410141212121211131113111410141113111311131212121212131014101411131113121211141113101411131212111410131114103910141138111411121113121310141138113811381138111410391113113812000d05

ir.things

Thing exec:command:remote-send [command="/usr/bin/python /usr/share/openhab2/exec/BlackBeanControl/BlackBeanControl.py -c %2$s", interval=0, timeout=5, autorun=true]

ir.items

Switch LVAircon <"player"> [ "Switchable" ]

Switch Remote_Send      { channel="exec:command:remote-send:run" }
String Remote_Send_Args { channel="exec:command:remote-send:input" }
String Remote_Send_Out  { channel="exec:command:remote-send:output" }

ir.rules

rule "Aircon"
  when
     Item LVAircon received command
  then

        //while(Remote_Send.state == ON){
            //Thread::sleep(500)
        //}

        //if(LVAircon.state == ON){
	    if(receivedCommand == ON){
                Remote_Send_Args.sendCommand("AirconON")
        }else{ 
                Remote_Send_Args.sendCommand("AirconOFF")
        }

        // wait for the command to complete
        while(Remote_Send.state != ON){
            Thread::sleep(100)
        }

        Thread::sleep(400)
        logInfo("Aircon", "Resuts are: \n" + Remote_Send_Out.state )
end

home.sitemap

    Frame label="Remote Control"
        {
            Text label="Aircon" icon="climate-off"
            {
		        Switch item=LVAircon label="Aircon" 
            }
        }

This is the python scripts im using:


It doesn’t work with me. I do not understand the problem? But when I run the command manually, the mini broadlink 3 has feedback from the led as well as on the Fan.

My command: /usr/bin/env python /usr/share/openhab2/addons/python-broadlink/BlackBeanControl/BlackBeanControl.py -c %2$s or ( -c FanOn) -> work OK.

My things: Thing exec:command:fan [command="/usr/bin/env python /usr/share/openhab2/addons/python-broadlink/BlackBeanControl/BlackBeanControl.py -c %2$s", interval=0, timeout=5, autorun=true]

My items:
Switch Office_Fan <“player”> [ “Switchable” ]
Switch fan { channel=“exec:command:fan:run” }
String fan_Args { channel=“exec:command:fan:input” }
String fan_Out { channel=“exec:command:fan:output” }

My sitemap:
Text label=“Fan” icon=“fan_ceiling” {
Default item=Office_Fan label=“Office”
}

[General]
IPAddress = 192.168.31.9
Port = 80
MACAddress = 34:EA:34:D1:DC:CE
Timeout = 5

[Commands]
FanOn = 260060000001359412121114111313131114121312131214113911381237113810381337113811381113121313371114123711141213121312381335131312381212123811381138120005220001354$
FanOff = 26006000000135941212111411131313111412131213121411391138123711381038133711381138111312131337111412371114121312131238133513131238121212381138113812000522000135$
FanSpeed = 260058000001389511131114121313121214121312131214133711361438113811381238103811391212111413371138121312141113131312381238111312131238123813371138110005220001$
FanSwing = 2600500000013a9214131213131212141114121312141114133712381138123712371138123811381114111314121114121314121114121313381237113812381138113812361238110005230001$
FanCool = 2600500000013c94121212131312131311141213131311141337123813371138113812381138103812381138101413121312121412131313111413121338113811381238113811381200052200014$
FanIon = 26005800000140941113111412131213121412131313111412381238133711361338123812371137141211141213133812371114121312131239123812371114111412381238113812000522000146$
FanSleep = 2600580000013e9511131213131212141213131212141213143711381238133711381138133711381138131211141337111413121313111413121437123811141138123812381138110005210001$
FanTimer = 260058000001449411121313111412131214111412131313123812381238113812371238113812381013133811381114121313131114121313381213121312381337123811381238110005230001$