Commencé la partie cliente pour le zdyndns
This commit is contained in:
32
Mesures/ADC/ADS1115/0_zdyndns.lua
Normal file
32
Mesures/ADC/ADS1115/0_zdyndns.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- Petit script pour s'inregistrer sur zdyndns
|
||||
|
||||
function send_zdyndns()
|
||||
if verbose then print("\n 0_zdyndns.lua zf200216.1822 \n") end
|
||||
|
||||
zip = wifi.sta.getip()
|
||||
zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port).." "..zip
|
||||
if verbose then print("zdyndns_str: "..zdyndns_str) end
|
||||
|
||||
srv_zdyndns = net.createConnection(net.TCP, 0)
|
||||
srv_zdyndns:on("connection", function(sck)
|
||||
print("connected...")
|
||||
print("sending...")
|
||||
|
||||
sck:send(zdyndns_str, function(sk)
|
||||
sk:close()
|
||||
print("close...")
|
||||
end)
|
||||
|
||||
print("je ne sais pas quoi afire ici")
|
||||
|
||||
end)
|
||||
|
||||
srv_zdyndns:connect(console_port,console_host)
|
||||
|
||||
zdyndns_str=nil zip=nil send_zdyndns=nil
|
||||
if verbose then print(node.heap()) end
|
||||
collectgarbage()
|
||||
if verbose then print(node.heap()) end
|
||||
end
|
||||
|
||||
send_zdyndns()
|
||||
@@ -1,9 +1,10 @@
|
||||
# Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom
|
||||
# zf200216.1656
|
||||
# zf200216.1702
|
||||
|
||||
|
||||
Todo à faire pour ce projet !
|
||||
|
||||
- regarder pour mettre "Welcome to NodeMCU world." quand connected, en fait quand on arrive dans le telnet_listener après la redirection du port série !
|
||||
- ajouter l'adresse du zdyndns dans les secrets projets
|
||||
- se connecter sur le zdyndns avec le numéro du port du telnet reverse utilisé
|
||||
- y regarder pour faire tourner en MEME temps le reverse et le forward telnet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
print("\n boot.lua zf200216.1650 \n")
|
||||
print("\n boot.lua zf200216.1757 \n")
|
||||
|
||||
function boot()
|
||||
verbose = true
|
||||
@@ -13,7 +13,7 @@ function boot()
|
||||
--f="0_cron.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
f="0_btn_flipflop.lua" if file.exists(f) then dofile(f) end
|
||||
f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end
|
||||
--f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
--f = "web_ide2.lua" if file.exists(f) then dofile(f) end
|
||||
print("verbose:",verbose)
|
||||
|
||||
Reference in New Issue
Block a user