X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=bin%2Fkhatus_controller;h=c4a6cfdd18390b7b0b9e65336b66d309d085bac2;hb=1b82be542b4db50148ddcae94713cfe8ecbeec01;hp=c67e640245d436770b1a6bb02a333af4c81d4879;hpb=b4612a8afc54fdba4622309e085f6cbff80d44ee;p=khatus.git diff --git a/bin/khatus_controller b/bin/khatus_controller index c67e640..c4a6cfd 100755 --- a/bin/khatus_controller +++ b/bin/khatus_controller @@ -3,12 +3,12 @@ /^OK/ { debug("OK line", $0) } /^ERROR/ { - debug("ERROR line", $0) - shift() - msg_head = $1 - shift() - msg_body = $0 - alert_trigger_hi(msg_head, "KhatusSensorError", msg_body) + debug("ERROR line", $0) + shift() + msg_head = $1 + shift() + msg_body = $0 + alert_trigger_hi(msg_head, "KhatusSensorError", msg_body) } /^OK in:ENERGY battery/\ @@ -133,13 +133,22 @@ db["mpd_status_percent"] = $3 } -/^OK in:WEATHER/\ +/^OK in:WEATHER temperature/\ { + shift() shift() shift() db["weather_temperature"] = $0 } +/^OK in:WEATHER phenomenon/\ +{ + shift() + shift() + shift() + alert_trigger_low("weather_phenomenon", "WeatherPhenomenon", $0) +} + /^OK in:DATE_TIME/\ { shift()