From: Bernhard Tittelbach Date: Sat, 16 Nov 2013 22:09:51 +0000 (+0000) Subject: gasleak alert X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=53647f4ca80b7c4cdbd029ae496dc9a2c4df211d;p=svn42.git gasleak alert --- diff --git a/go/r3-eventbroker_zmq/sockettoevent.go b/go/r3-eventbroker_zmq/sockettoevent.go index 9e4907e..a6c479d 100644 --- a/go/r3-eventbroker_zmq/sockettoevent.go +++ b/go/r3-eventbroker_zmq/sockettoevent.go @@ -88,6 +88,8 @@ func ParseSocketInputLine(lines [][]byte, ps *pubsub.PubSub, keylookup_socket *z ps.Pub(r3events.DoorCommandEvent{string(lines[0]), string(lines[1]), string(lines[2]), ts},"doorcmd") case "BackdoorInfo(ajar):": ps.Pub(r3events.BackdoorAjarUpdate{string(lines[len(lines)-1]) == "shut", ts},"door") + case "GasLeakAlert": + ps.Pub(r3events.GasLeakAlert{ts},"sensors") case "temp0:","temp1:", "temp2:", "temp3:": sensorid, err := strconv.ParseInt(string(lines[0][4]), 10, 32) if err != nil {return }