Sonoff not switching through Habmin sitemap switch

  • Platform information:
    • Hardware: rPi 2
    • OS: Jessie, up to date as of now
    • openHAB version: latest stable in apt-get

Hi all,

Thank you in advance for any help, I’ve been banging my head against a wall over this. I have had my home automation working before but it seems to have stopped. Maybe due to an update or me changing something without realising it.

In habmin I can see my simple sitemap, which I have stripped right back. I receive RSSI and the state of a Sonoff switch running tasmota 6.1.1c. Both display correctly and update.

Problem, the UI switch doesn’t seem to work. I don’t think it is sending the MQTT message, or if it is it is wrong somehow. You can see in the openhab log that the sonoff is able to receive commands; I used MQTT Lens in Chrome with the command, “cmnd/shrimp-lights-client/POWER” and payload of either 1 or 0.

Can anyone spot my error, please?

sonoff.items

// Shrimp Tank //

//Switch shrimp_lights_alive "Test-Alive" (sonoff)
//    { mqtt="<[mqtt:tele/shrimp-lights/tele/LWT:state:MAP(unreach.map)]" }
Switch shrimp_lights_switch "Shrimp Lights Switch" (sonoff)
    { mqtt=">[mqtt:cmnd/shrimp-lights-client/POWER:command:*:default],
            <[mqtt:stat/shrimp-lights-client/POWER:state:default]" }
Number shrimp_lights_rssi "Test [%d %%]" (sonoff)
    { mqtt="<[mqtt:tele/shrimp-lights/STATE:state:JSONPATH($.Wifi.RSSI)]" }


//Maintenance
//String        Sonoff_Action "Sonoff Action" <sonoff_basic>

home.sitemap

sitemap home label="Home" {
    Frame label="Date" {
        Text item=Date
    }

    Frame label="Fish Tank" icon="water" {
        Switch item=shrimp_lights_switch  label="Shrimp Lights" icon="light"
        Text   item=shrimp_lights_rssi    label="Shrimp Lights RSSI"
        //Switch item=sonoff_fish_lights_th_reachable
    }
}

mosquitto.log (I have masked my IP)

1534520890: New client connected from ***.***.***.200 as sonoff-fish-lights-th (c1, k15, u'openhab').
1534520906: New connection from ***.***.***.107 on port 1883.
1534520906: New client connected from ***.***.***.107 as sonoff-small-lamp (c1, k15, u'openhab').
1534520908: New connection from ***.***.***.250 on port 1883.
1534520908: New client connected from ***.***.***.250 as sonoff-FISH-FILTER (c1, k15, u'openhab').
1534520926: New connection from ***.***.***.235 on port 1883.
1534520926: New client connected from ***.***.***.235 as sonoff-fish-heater (c1, k15, u'openhab').
1534520966: New connection from 127.0.0.1 on port 1883.
1534520966: New client connected from 127.0.0.1 as openhabserver (c1, k60, u'openhab').
1534521244: New connection from ***.***.***.111 on port 1883.

openhab log from karaf

16:49:35.544 [INFO ] [smarthome.event.ItemStateChangedEvent] - hue_0100_001788296e4b_10_brightness changed from NULL to 100
16:49:35.546 [INFO ] [smarthome.event.ItemStateChangedEvent] - hue_0210_001788296e4b_6_color changed from NULL to 360,99,0
16:49:35.549 [INFO ] [smarthome.event.ItemStateChangedEvent] - hue_0100_001788296e4b_7_brightness changed from NULL to 100
16:49:35.554 [INFO ] [smarthome.event.ItemStateChangedEvent] - hue_0100_001788296e4b_11_brightness changed from NULL to 100
16:50:11.659 [INFO ] [smarthome.event.ItemStateChangedEvent] - shrimp_lights_rssi changed from NULL to 84
16:55:10.536 [INFO ] [smarthome.event.ItemStateChangedEvent] - shrimp_lights_switch changed from NULL to OFF
16:55:13.873 [INFO ] [smarthome.event.ItemStateChangedEvent] - shrimp_lights_switch changed from OFF to ON
17:00:12.549 [INFO ] [smarthome.event.ItemStateChangedEvent] - shrimp_lights_rssi changed from 84 to 82

Can’t believe I didn’t try this before…

Switch in basicUI works fine, just seems to be habmin that is broken.

Only use Habmin for zwave configuration