From d47cfeb625ffcd08e6391b52f05504886bc54338 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 16 Oct 2015 17:21:13 +0200 Subject: wip --- diller/README.md | 2 +- diller/main.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/diller/README.md b/diller/README.md index 72d5778..b2d96f8 100644 --- a/diller/README.md +++ b/diller/README.md @@ -7,7 +7,7 @@ Is registration required? Can't the firmware just send an update without a value ## Device / Sensor hierarchy / - /sensors + /sensor / /value /type (retained) diff --git a/diller/main.lua b/diller/main.lua index 234a84b..533ecc8 100644 --- a/diller/main.lua +++ b/diller/main.lua @@ -48,8 +48,9 @@ local function on_cmd(cmd, args) else property = properties[id] - local name_path = id.."/name" - local description_path = id.."/description" + local value_path = "sensors/"..id.."/value" + local name_path = "sensors/"..id.."/name" + local description_path = "sensors/"..id.."/description" if not property then print("new property: "..id) @@ -60,8 +61,7 @@ local function on_cmd(cmd, args) end if args.value then - local path = id.."/value" - mq.publish(path, args.value) + mq.publish(value_path, args.value) end if args.name and property.name ~= args.name then print("publishing name") -- cgit v1.2.3