-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfig.lua
More file actions
31 lines (27 loc) · 730 Bytes
/
Copy pathconfig.lua
File metadata and controls
31 lines (27 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--
-- Basic configuration
--
-- This should be the same for all my apps. Secrets are stored in secrets.lua
--
local module = {}
-- identify NodeMCU by chipid
local nodenames = {}
nodenames[10702156] = "balcony"
nodenames[944910] = "nodedev"
module.SELF = nodenames[node.chipid()]
if module.SELF == nil then
module.SELF = node.chipid()
print("FAILED TO IDENTIFY NODEMCU CHIP")
end
-- configure wifi
module.WIFI = {}
module.WIFI.ssid = "W00t"
module.WIFI.pwd = G.secrets.WIFIPASS
-- configure MQTT
module.MQTT = {}
module.MQTT.host = "192.168.1.8"
module.MQTT.port = 1883
module.MQTT.user = "home-assistant"
module.MQTT.pass = G.secrets.MQTTPASS
module.MQTT.endpoint = "/home-assistant/" .. module.SELF .. "/"
return module