-->
Page 1 of 2

luatool

PostPosted: Thu Nov 27, 2014 3:40 pm
by 4refr0nt
luatool - simple way for loading "clear" lua file into NodeMCU flash memory.

New version 0.5 released

Main difference from drag-and-drop method on CoolTerm:
- not needed lines for open and close file: file.open("init.lua", "w+"), file.close()
- you can use "clear" lua files, script automatically add wrapper construction "file.writeline([[" + file_string + "]])\r"
- luatool check NodeMCU answer after sending data


Changelog

v0.5

add new option -r, --restart : auto restart module, send command "node.restart()", after file load
add new option -d, --dofile : auto run, send command "dofile('file')", after file load
delete line "lua script loaded by luatool", lines number now equal lines number in original file
add 0.3 sec delay after write

Re: luatool

PostPosted: Thu Nov 27, 2014 4:33 pm
by alonewolfx2
Maybe you can explain how to usage your tool :) step by step.
Example: luatool.py just send main.lua on com3
luatool.py - f init. lua not working and help comment not enough.
I found right command after examine py code.
luatool.py - p com1 - f init. lua - t init.lua

Re: luatool

PostPosted: Thu Nov 27, 2014 5:09 pm
by 4refr0nt
alonewolfx2 wrote:Maybe you can explain how to usage your tool :) step by step.


Already on github.
README.md on github - all helpfull information and examples.
Another discuss about luatool on esp8266.ru (English and Russian)

Re: luatool

PostPosted: Thu Nov 27, 2014 5:42 pm
by gerardwr
I like it, reporting the progress of uploading is very informative.

I'm really pleased that my suggestions on v0.3 were implemented.

I've not done much testing with the new versions, but please allow me some further (minor) suggestions for improvement:
- when running print the version# of the tool , that may be helpfull when you get questions on the tool
- in main.lua you have good code waiting for a valid IP number. Why not use this code also in init.lua, would make it more "bulletproof".
- in main.lua you connect to a not very well-known website (esp8266.ru). I think that using a well-known website (google.com?) might be better. Security, vulnerability,virus,blabla…..
- After the last output line (->ok) there's no CRLF, output looks like this:--->>> All down <<<---
Code: Select all->file.close() -> okMac-mini-van-gerard:ESP8266 gerard$


Thanks for sharing!