Added example for telnet command
This commit is contained in:
parent
2f9f9fdc68
commit
344fb0ab9a
2
init.lua
2
init.lua
@ -49,7 +49,7 @@ tmr.alarm(1, 5000, 0, function()
|
||||
(file.open("timecore.lua")) or
|
||||
(file.open("wordclock.lua")) or
|
||||
(file.open("displayword.lua")) or
|
||||
(file.open("webserver.lua"))
|
||||
(file.open("telnet.lua"))
|
||||
) then
|
||||
c = string.char(0,128,0)
|
||||
w = string.char(0,0,0)
|
||||
|
17
telnet.lua
17
telnet.lua
@ -50,7 +50,22 @@ if ( (_ssid == nil) and
|
||||
(_bcolor == nil) and
|
||||
(_threequater == nil) ) then
|
||||
print("one parameter is mandatory:")
|
||||
print("storeConfig(ssid, password, timezoneoffset, sntpserver, inv46, dim, fcolor, colorMin1, colorMin2, colorMin3, colorMin4, bcolor, threequater)")
|
||||
print("storeConfig(ssid, ")
|
||||
print(" password,")
|
||||
print(" timezoneoffset,")
|
||||
print(" sntpserver,")
|
||||
print(" inv46,")
|
||||
print(" dim,")
|
||||
print(" fcolor,")
|
||||
print(" colorMin1,")
|
||||
print(" colorMin2,")
|
||||
print(" colorMin3,")
|
||||
print(" colorMin4,")
|
||||
print(" bcolor,")
|
||||
print(" threequater)")
|
||||
print(" ")
|
||||
print("e.g.:")
|
||||
print('storeConfig(nil, nil, 1, nil, "on", true, "00FF00", "00FF88", "008888", "00FF44", "004488", "000000", true)')
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -59,6 +59,6 @@ for f in $FILES; do
|
||||
done
|
||||
|
||||
echo "Reboot the ESP"
|
||||
$LUATOOL -p $DEVICE -r -b 115200
|
||||
echo "node.restart()" >> $DEVICE
|
||||
|
||||
exit 0
|
||||
|
@ -94,7 +94,7 @@ def main(nodeip, luafile, volatile=None):
|
||||
print "add a space at the end"
|
||||
|
||||
if (volatile is None):
|
||||
if (not sendCmd(s, "w([[" + l + "]]);")):
|
||||
if (not sendCmd(s, "w([==[" + l + "]==]);")):
|
||||
print "Cannot write line " + str(i)
|
||||
s.close()
|
||||
sys.exit(4)
|
||||
|
Loading…
Reference in New Issue
Block a user