update spaceapi code for immediate update on door state
authorBernhard Tittelbach <xro@realraum.at>
Sat, 22 Jun 2013 20:26:11 +0000 (20:26 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Sat, 22 Jun 2013 20:26:11 +0000 (20:26 +0000)
r3-webstatus-spaceapi/main.go

index f4e4e76..a34390b 100644 (file)
@@ -82,6 +82,7 @@ func parseSocketInputLine(line string) {
         spaceapidata.MergeInSensor(spaceapi.MakeDoorLockSensor("TorwaechterLock", "Türschloß", match_status[1] == "closed"))
         spaceapidata.MergeInSensor(spaceapi.MakeDoorLockSensor("TorwaechterAjarSensor", "Türkontakt", match_status[3] == "shut"))
         //spaceapidata.MergeInSensor(spaceapi.MakeDoorAjarSensor("Torwaechter", "Front Door", match_presence[3] == "shut"))
+        publishStateToWeb()
        } else if match_button != nil {
                statusstate.buttonpress_until = time.Now().Unix() + 3600
                spaceapidata.AddSpaceEvent("PanicButton", "check-in", "The button has been pressed")