summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-04-30 09:36:51 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-04-30 09:36:51 +0200
commitbe299bddada89bc24c133fb9030a015fff1eb7cd (patch)
tree82b40cd98eac73fb0bdaede6cee39f62a8f904d2 /init.lua
parentdefbe0ad98624925f8475b45f2435325925c1e0c (diff)
use hexadecimal chipid
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index dd01070..7fbfb1e 100644
--- a/init.lua
+++ b/init.lua
@@ -2,12 +2,11 @@ station_cfg = {}
dofile("config.lua")
delayed_restart = tmr.create()
-chip_id = node.chipid()
+chip_id = string.format("%06X", node.chipid())
device_id = "esp8266_" .. chip_id
mqtt_prefix = "sensor/" .. device_id
mqttclient = mqtt.Client(device_id, 120)
-
print("ESP8266 " .. chip_id)
ledpin = 4