Hi again,
the Sonoff Bridge cant receive raw. The decoding is done in a dedicated IC.
A alternative firmware for that is in early development…
But the good news when you can receive your codes it is just a Openhab job to do magic and send all the codes you need
Here is my rules file for the 433mhz stuff…
rule "RF433 switch sonoff"
when
Item RfBridge_RfReceive changed
then
if (RfBridge_RfReceive.state == NULL)
{
logInfo("RfBridge.rules", "Item is null, cancelling...")
return;
}
var rfData = RfBridge_RfReceive.state.toString
logInfo("rfbridge.rules", "Received IT Codes: " + rfData)
switch (rfData) {
case "A00A1F":
{
publish("broker", "cmnd/sonoff-13D92F/POWER", "ON")
}
case "A00A17":
{
publish("broker", "cmnd/sonoff-13D92F/POWER", "OFF")
}
case "A00A1B":
{
publish("broker", "cmnd/sonoff-065CA6/POWER", "ON")
}
case "A00A13":
{
publish("broker", "cmnd/sonoff-065CA6/POWER", "OFF")
}
case "A00A1D":
{
publish("broker", "cmnd/sonoff-101AEE/POWER", "ON")
}
case "A00A15":
{
publish("broker", "cmnd/sonoff-101AEE/POWER", "OFF")
}
case "A00A1E":
{
publish("broker", "cmnd/sonoff-5DE6D5/POWER", "ON")
}
case "A00A16":
{
publish("broker", "cmnd/sonoff-5DE6D5/POWER", "OFF")
}
/*
case "on1":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#150551")
}
case "off1":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#150554")
}
case "on2":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151151")
}
case "off2":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151154")
}
case "on3":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151451")
}
case "off3":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151454")
}
case "on4":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151511")
}
case "off4":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151514")
}
case "on5":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151541")
}
case "off5":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151544")
}
case "on6":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#150151")
}
case "off6":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#150154")
}
case "on7":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151051")
}
case "off7":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151054")
}
case "on8":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151411")
}
case "off8":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#151414")
}
case "on9":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#150501")
}
case "off9":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "11320")
publish("broker", "cmnd/" + device_id + "/RfLow", "360")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1090")
publish("broker", "cmnd/" + device_id + "/RfCode", "#150504")
}
case "on10":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "12880")
publish("broker", "cmnd/" + device_id + "/RfLow", "420")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1270")
publish("broker", "cmnd/" + device_id + "/RfCode", "#3575C0")
}
case "off10":
{
publish("broker", "cmnd/" + device_id + "/RfSync", "12880")
publish("broker", "cmnd/" + device_id + "/RfLow", "420")
publish("broker", "cmnd/" + device_id + "/RfHigh", "1270")
publish("broker", "cmnd/" + device_id + "/RfCode", "#35750C")
} */
}
RfBridge_RfReceive.postUpdate(rfData)
end
and the items part
String RfBridge_RfReceive "RfReceive [%s]"
{ mqtt="<[broker:tele/sonoff-8E8329/RESULT:state:JSONPATH($.RfReceived.Data)]" }