34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
-- Petit script pour configurer les secrets dans ce projet
|
|
-- et que l'on n'aimerait pas être exportés sur Internet (github)
|
|
-- Il faut donc modifier le .gitignore avec secrets*.lua
|
|
-- il faut le renommer en 'secrets_project.lua' et sera exécuté
|
|
-- par 'wifi_init.lua' au moment du boot
|
|
|
|
function secrets_project()
|
|
print("\n secrets_project.lua zf20018.1503 \n")
|
|
|
|
zLED=4 -- NodeMCU
|
|
--zLED=7 -- SonOff
|
|
zRELAY=6 -- SonOff
|
|
|
|
node_id = "generic"
|
|
if node.chipid() == 6734851 then node_id = "sonoff_1" zLED=7 end
|
|
if node.chipid() == 16110605 then node_id = "sonoff_2" zLED=7 end
|
|
if node.chipid() == 3049119 then node_id = "adc_1" end
|
|
if node.chipid() == 3048906 then
|
|
node_id = "bolo_1"
|
|
thingspeak_url="http://api.thingspeak.com/update?api_key=kkk&"
|
|
end
|
|
if node.chipid() == 3049014 then
|
|
node_id = "tst_temp_1"
|
|
thingspeak_url="http://api.thingspeak.com/update?api_key=kkk&"
|
|
end
|
|
print("node_id: "..node_id)
|
|
end
|
|
secrets_project()
|
|
secrets_project=nil
|
|
|
|
--[[
|
|
=node.chipid()
|
|
]]
|