I am asking for help in solving my problem, I want to control the remote control three buttons, what am I doing wrong?
I have created
Sitemap
Switch item=TV_Pilot mappings=[1=”Blue” , 2=”Green” , 3=”Red”]
ir.map
// transform IR-Code
1={“Protocol”:“NEC”,“Bits”:32,“Data”:“0x00FFB04F”}
2={“Protocol”:“NEC”,“Bits”:32,“Data”:“0x00FFF807”}
3={“Protocol”:“NEC”,“Bits”:32,“Data”:“0x00FF9867”}
Pilot.items
Switch TV_Pilot “1/2/3 [%s]”
Pilot.rules
rule “Wysylanie IR mqtt”
when
Item TV_Pilot received command
then
logInfo(“Wysylanie IR mqtt”, "command "+receivedCommand)
mqtt_topic_irremote_Kod_pilota.sendCommand(transform(“MAP”, “ir.map”, receivedCommand.toString))
end
pilot.things
Thing mqtt:topic:irremote “Zdalne sterowanie” (mqtt:broker:MosquittoMqttBroker) {
Channels:
Type string : Kod_pilota "Dane pilota" [ commandTopic="cmnd/Plytka186/IRsend"]
}