From 0d76607403e4c6219347ae7be41a64d69b2cf186 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sun, 6 Oct 2013 00:21:37 +0000 Subject: [PATCH] backdoor parse --- go/r3-eventbroker_zmq/main.go | 2 -- go/r3-eventbroker_zmq/sockettoevent.go | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/r3-eventbroker_zmq/main.go b/go/r3-eventbroker_zmq/main.go index 8ea5fe4..6745752 100644 --- a/go/r3-eventbroker_zmq/main.go +++ b/go/r3-eventbroker_zmq/main.go @@ -3,8 +3,6 @@ package main import ( - "fmt" - "os" "flag" //~ "time" pubsub "github.com/tuxychandru/pubsub" diff --git a/go/r3-eventbroker_zmq/sockettoevent.go b/go/r3-eventbroker_zmq/sockettoevent.go index a7a21bf..64c71dd 100644 --- a/go/r3-eventbroker_zmq/sockettoevent.go +++ b/go/r3-eventbroker_zmq/sockettoevent.go @@ -79,6 +79,8 @@ func ParseSocketInputLine(lines [][]byte, ps *pubsub.PubSub, keylookup_socket *z ps.Pub(r3events.DoorAjarUpdate{string(lines[4]) == "shut", ts}, "door") case "open", "close", "toggle", "reset": 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 "photo0:": //~ newphoto, err := strconv.ParseInt(string(lines[1]), 10, 32) //~ if err == nil { -- 1.7.10.4