|
Post by Masondb on Oct 28, 2016 15:42:39 GMT
I am new to OpenHab. I am using the gateway from instructables. The light sensor is communicating to the gateway, I know that is good. The gateway reports that is it connected to mqtt. When the value changes openhab does not change. I see the value change on the gateway and it says it is sending to openhab. But openhab does not change.
Sitemap
Frame label="Uber Sensor" {
Switch item=itm_uber1_light_sta
Items
Number itm_uber1_light_mqtt "Light Sensor [%.1f]" (ALL) {mqtt="<[mymosquitto:1272:state:default]"}
Switch itm_uber1_light_sta "Living Room Light"
Rules
rule "Uber Lights"
when
Item itm_uber1_light_mqtt received update
then
if(itm_uber1_light_mqtt.state < 350)
{
sendCommand(itm_uber1_light_sta, OFF)
}
else
{
sendCommand(itm_uber1_light_sta, ON)
}
end
openhab.cfg
################################# MQTT Transport ######################################
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with a id you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
#mqtt:mymosquitto.url=tcp://192.168.1.70:1883
|
|
|
Post by greginkansas on Oct 28, 2016 17:11:52 GMT
You should move over to computourist's code. Its running here for months at a time.
|
|
|
Post by papa on Oct 29, 2016 20:01:11 GMT
I agree with greginkansas. The Uber Instructable is inspiring but has some kinks. The computourist version has been more reliable. In this thread, I've given some detailed documentation on following that computourist approach.
|
|