Broadlink binding for RMx, A1, SPx and MP. Any interest?

don’t have an issue with the error log entries - do have a problem with the binding not working properly. The Thing has 4 switches and it exposes 4 channels. 3 of these channels work in that I can switch them on. I can however not switch them off - the log however shows the channels going from off to on and then, spontaneously, go off again. Below are the log events resulting from me switching first port 1 and then port 2 on - I never switched them off. The physical switch however switches the first two ports on and leaves them that way…

18-02-19 19:14:02.822 [ome.event.ItemCommandEvent] - Item ‘sofa1’ received command ON
2018-02-19 19:14:02.840 [vent.ItemStateChangedEvent] - sofa1 changed from OFF to ON
2018-02-19 19:14:04.052 [vent.ItemStateChangedEvent] - sofa1 changed from ON to OFF
2018-02-19 19:14:13.229 [ome.event.ItemCommandEvent] - Item ‘sofa2’ received command ON
2018-02-19 19:14:13.243 [vent.ItemStateChangedEvent] - sofa2 changed from OFF to ON
2018-02-19 19:14:34.087 [vent.ItemStateChangedEvent] - sofa2 changed from ON to OFF

any ideas??

thnx

Ofir, Did you make some progress with Red-node

Could you share it pleasE?

job, what I meant stating that IP-Address shouldn’t be necessary is that on a local network segment, the IP addresses are resolved to Mac addresses through ARP resolution. Given that the binding already knows the device Mac, IP address is irrelevant as TCP packets will ultimately be addressed by Mac address, that it’s already know.
Hence, if the binding knows the plug MAC as it does, configuring the IP then requires to set static IP (maybe through DHCP, yes, but static) when this step would be unnecessary. Cumbersome in the sense of an unnecessary configuration step rather than working directly no matter what dynamic IP the plug has today, and without any need to access and configure the router

OK, i understand @Dixon .

The only problem is that nobody has access to @Cato_Sognen’s source code and he is no longer here. So we cannot adjust the binding to no longer requiring the IP address if it works like you describe. :frowning:

Sorry for the stupid question but I installed a new RM Pro and I’m trying the binding but it seems that I’m not putting in correctly the Auth and IV. I found the site and got the two key, I removed the commas but I receive the following error:
hexBinary needs to be even-length.
If I remove also the spaces between it tells me that I have some illegal characters. Can you help me, please?

Sorry it was a stupid problem in copying ad pasting the codes. Everything’s ok…

I own 2 SP3’s and still have troubles with the 2.2 BETA2 binding.
In the log file it is filled up with lines like “Socket is closed” and lines with switch ONLINE - OFFLINE status etc.

2018-02-22 11:40:01.269 [hingStatusInfoChangedEvent] - 'broadlink:sp3:d23xxxxe3' changed from OFFLINE (COMMUNICATION_ERROR): Could not control device at IP address 192.168.178.73 to ONLINE
2018-02-22 11:40:17.383 [hingStatusInfoChangedEvent] - 'broadlink:sp3:d23xxxe3' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not control device at IP address 192.168.178.73
2018-02-22 11:40:47.427 [hingStatusInfoChangedEvent] - 'broadlink:sp3:51bxxxa9' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not control device at IP address 192.168.178.67
2018-02-22 11:41:17.482 [hingStatusInfoChangedEvent] - 'broadlink:sp3:d23xxxe3' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not control device at IP address 192.168.178.73
2018-02-22 11:41:17.502 [hingStatusInfoChangedEvent] - 'broadlink:sp3:51bxxxa9' changed from OFFLINE (COMMUNICATION_ERROR): Could not control device at IP address 192.168.178.67 to ONLINE
2018-02-22 11:41:31.403 [hingStatusInfoChangedEvent] - 'broadlink:sp3:d23xxxe3' changed from OFFLINE (COMMUNICATION_ERROR): Could not control device at IP address 192.168.178.73 to ONLINE```

Thanks to Dixon I managed to get the "Socket is closed" out of the log via the Karaf console.
Can someone help me how I get the ONLINE - OFFLINE statuses out of the log?
Or maybe solve this problem, instead of not logging?

Do you have an issue with your WIFI range?
Move your broadlink device closer to the router and see if the issue goes away.

They are 2,5 meters from the router, so the range is not the issue.
The devices work perfectly. Via manual command or via rule, they work good.
I only get these lines filling up my log file…

Hi guys,

Fisrt i would like say: Thanks Cato! You are awesome! :slight_smile: The bindig is working correctly.
But I am trouble… I wanna see switches on my sitemap and not the ON and OFF buttoms.(example FOLYO is working fine) But if I try to use rules, then the switch doesn’t working… Could you please check where is the problem?

Item:

String FOLYO "Folyosó lámpa" <wallswitch> (gFolyoso, gVilagitas)
String Broadlink "Broadlink" {channel="broadlink:rm2:xx:xx:xx:xx:xx:xx:command" }
Switch Nappali_kapcsolo "Nappali lámpakapcsoló" <light>

sitemap:

Frame label="Világítás"
       {
		Switch item=FOLYO mappings=[FOLYOSO_LAMPA_ON="Be", FOLYOSO_LAMPA_OFF="ki"]
		Switch item=Nappali_kapcsolo
	}

rule:

rule "Lámpa kapcsoló"
when
	Item Nappali_kapcsolo changed
then
	if (Nappali_kapcsolo.state == ON)
	{
		Broadlink.sendCommand(“NAPPALI_LAMPA_ON”)
	}else if (Nappali_kapcsolo.state == OFF)
	{
		Broadlink.sendCommand(“NAPPALI_LAMPA_OFF”)
	}
end

map file:

FOLYOSO_LAMPA_ON = b2143400290e290d0e250e25290d0e25290d290d0e25290d0e250e240e25290d0e25290d0e250e25290d0e250e250e250e25290d0e00017300000000
FOLYOSO_LAMPA_OFF = b21534000c24240d240d0c250c00016f240d240d0c240c24240d0c24240c240d0c24240d0c240c250c24240d0c24240d0c240c25240d0c2400000000

NAPPALI_LAMPA_ON = b21034000d25270d270d270d270d0d250d25270d0d250d25270d0d250d250d250d24270d0d0001720d250d240d25270d0d250d25270d0d2500000000
NAPPALI_LAMPA_OFF = b20f3400240d0c250c250c25230d0c240c0001700c240c240c25240d0c250c24240d0c250c25240d240d240d240d0c250c25240d0c240c2500000000

Thanks guys :slight_smile:

Try to use
sendCommand(Broadlink,“NAPPALI_LAMPA_ON”) instead.

Holger

@jcf6288. I’m unclear what you meant by copying a folder off a phone and directing it to that folder. Is this an Android only? What folder should be copied? What is “it” that needs to be directed to that folder? How do the codes show up on that folder?

I am using android and am not sure about IOS. On android under broadlink there is a ShareData folder. Copy that to somewhere on you NODE-Red machine and direct the Node to that folder. It will grab the ir and rf codes and you can work from there.

Why? Isn’t it recommended the object specific way of calling item.sendCommand(NewState) instead of the generic one sendCommand(item, NewState)?

https://docs.openhab.org/configuration/rules-dsl.html#sendcommand-method-vs-action

Really interesting!

you mean that you are not using this binding but red node to manage RM ?

could you please share a screenshot of the config ?

As requested, node-red-contrib-broadlink is the one you want to use.

Thanks a lot but how did you integrate node red and openhab ?

This looks promising. I already some tests and it works. I can put the RM in learn mode but I don’t know where to store it and call it up later. Any tips?

Search in node red pallete for openhab

I am not sure where it is stored, I keep using the econtrol app and copy over the folder.