aboutsummaryrefslogtreecommitdiff
path: root/diller
diff options
context:
space:
mode:
Diffstat (limited to 'diller')
-rw-r--r--diller/README.md2
-rw-r--r--diller/main.lua8
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")