I am new to OpenHab2 and want to control some existing blinds with a 433Mhz remote. The blind brand is Rollease Acmeda. I have a Raspberry pi with a 433 transmitter. I can record the codes etc
rule “Single Blind”
when
Item Blind12A changed
then
logInfo("Blinds", "Member " + triggeringItem.name + " to " + receivedCommand)
try {
// Lock transmitter so other executed rules dont't use it at the same time.
// Concurrent calls of the rule will wait till the resource is free again.
transmitter.lock()
// Set the command which should be executed to the output channel
// Auto trigger will then execute the Thing.
if(receivedCommand == DOWN){
Blind12_Input.sendCommand(“DOWN”)
}else{
Blind12_Input.sendCommand(“UP”)
}
// Wait for the command to complete
//while(Remote_Send.state != OFF){
//Thread::sleep(100)
//}
// Mulltiple trigger do not work if there is no break here
// maybe external skript needs some time to properly free resources.
Thread::sleep(400)
logInfo("Blinds", Remote_Send_Out.state.toString.replaceAll("\r|\n"," ") )
}catch(Throwable t) {}
finally {
// Free the resource for the next call.
transmitter.unlock()
}
end
What I want to achieve is to be able to user the Rollershutter Blind12A Item to issue the command line for blind12. I hope to use the IOS app to control the blinds
I think the rule is ok but I cannot see how to make the UI work. The Blind12 Thing does present using the IOS app although I cannot enter values into the input field
Thank you for the suggestion but unfortunately it did not make a difference. There is still no evidence in the log of the rule being fired. The rules are being refreshed.
I have also tried the example for 433Mhz control with the exec binding. That rule also does not trigger
I have the feeling that there is something simple wrong
Yes the item is changing.
I have just done a restart of openhab2. And of course the rules are now being triggered. I did see other threads that implied that Thread::sleep(100) can cause issues with rule execution so I am hoping that is the problem. If so maybe the 433Mhz exec example should be updated to reflect a better model for waiting
A Thread::sleep(100) by itself is unlikely to caused this problem unless you can end up with lots and lots of that rule trying to run at the same time.
I’m also interested in this, I tried to duplicate the RF signal for my RollEase Blind and was unable to do so. I know it isn’t directly you question but could you please explain how you were able to get the code?
Regards,