From 53647f4ca80b7c4cdbd029ae496dc9a2c4df211d Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 16 Nov 2013 22:09:51 +0000 Subject: [PATCH] gasleak alert --- go/r3-eventbroker_zmq/sockettoevent.go | 2 ++ 1 file changed, 2 insertions(+) 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 } -- 1.7.10.4