diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-16 17:21:13 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-16 17:21:13 +0200 |
commit | d47cfeb625ffcd08e6391b52f05504886bc54338 (patch) | |
tree | 64367f046c94101c9008883d5c07eea23fecdbe6 /diller | |
parent | 446931c5f5d09a62e167c1754fbe17773eaae6a4 (diff) | |
download | esp-playground-d47cfeb625ffcd08e6391b52f05504886bc54338.tar.gz esp-playground-d47cfeb625ffcd08e6391b52f05504886bc54338.tar.bz2 esp-playground-d47cfeb625ffcd08e6391b52f05504886bc54338.tar.xz esp-playground-d47cfeb625ffcd08e6391b52f05504886bc54338.zip |
wip
Diffstat (limited to 'diller')
-rw-r--r-- | diller/README.md | 2 | ||||
-rw-r--r-- | 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 /<device id> - /sensors + /sensor /<sensor id> /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") |