Hello again,
I have done the last things you mentioned but they sonoff isn’t seeing any messages published. If I subscribe to the topic in my MQTT viewer the messages also aren’t coming through.
Here’s my configuration files:
Projector.items -
Switch TVScreen
String TVScreenCommand { channel="mqtt:topic:mosquitto:genericthing:tvscreen" }
mqtt.things
mqtt:broker:mosquitto [ host="127.0.0.1",secure=false, username="openhab", password="habopen" ]
Bridge mqtt:broker:mosquitto [ host="localhost", secure=false, username="openhab", password="habopen" ]
{
Thing topic genericthing {
Channels:
Type string : tvscreen "TV Screen" [ commandTopic="tasmota/cmnd/sonoff-rfbridge/rfraw" ]
}
}
projector.rules
rule "TV Screen UP"
when
Item TVScreen received command ON
then
TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "up"))
end
rule "TV Screen DOWN"
when
Item TVScreen received command OFF
then
TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "down"))
createTimer(now.plusSeconds(5), [ |
TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "stop"))
])
end
default.sitemap
Switch item=TVScreen label="TV Screen UP" mappings=[ON="UP"]
Switch item=TVScreen label="TV Screen DOWN" mappings=[OFF="DOWN"]
The only thing I can think I had to input into your example config was the channel name. The channel name was the generic mqtt string thing from paper ui: mqtt:topic:mosquitto:genericthing:tvscreen
Any ideas why this might not be working?
the logs show the following
14:19:51.984 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'TVScreen' received command ON
14:19:51.997 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreen changed from OFF to ON
14:19:52.032 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'TVScreenCommand' received command AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
14:19:52.038 [INFO ] [arthome.event.ItemStatePredictedEvent] - TVScreenCommand predicted to become AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
14:19:52.055 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreenCommand changed from AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955 to AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
14:20:15.788 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_iPhone changed from OFF to ON
14:20:15.801 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_Response_Time changed from UNDEF to 22.0
14:21:20.843 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_iPhone changed from ON to OFF
14:21:20.853 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_Response_Time changed from 22.0 to UNDEF
14:21:26.327 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'TVScreen' received command OFF
14:21:26.357 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreen changed from ON to OFF
14:21:26.365 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'TVScreenCommand' received command AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
14:21:26.375 [INFO ] [arthome.event.ItemStatePredictedEvent] - TVScreenCommand predicted to become AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
14:21:26.383 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreenCommand changed from AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955 to AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
14:21:31.376 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'TVScreenCommand' received command AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955
14:21:31.385 [INFO ] [arthome.event.ItemStatePredictedEvent] - TVScreenCommand predicted to become AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955
14:21:31.395 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreenCommand changed from AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955 to AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955