Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console with 'script' command. #23

Open
msillano opened this issue Feb 3, 2018 · 2 comments
Open

Console with 'script' command. #23

msillano opened this issue Feb 3, 2018 · 2 comments

Comments

@msillano
Copy link

msillano commented Feb 3, 2018

My test configuration: Win 10, mosquitto, node-red, Putty.
On Putty console I get:

    CMD>show config
    STA: SSID:FRITZ!Box 3272 PW:cirohomewifi
    AP:  SSID:MQTT_home PW:sonoffbroker IP:192.168.4.1/24
    Network console access on port 7777 (mode 3)
    MQTT broker max. subscription: 30
    MQTT broker max. retained messages: 30
    MQTT broker max. clients: 0
    MQTT client enabled
    MQTT client host: 192.168.178.23
    MQTT client port: 1883
    MQTT client user: none
    MQTT client password:
    MQTT client id: ESPBroker_ 9c593
    MQTT SSL: off
    NTP server: 1.it.pool.ntp.org (interval: 300 s, tz: 1)
    Clock speed: 160
    Serial bitrate: 115200
    CMD>show stats
    System uptime: 0:03:28
    Free mem: 18896
    Interpreter loop: 65982 us
    External IP-address: 192.168.0.53
    0 Stations connected to AP
    NTP synced: 20:24:19
    CMD>echo config       (hops!)

    Invalid Command       (one blak line before message 'Invalid command')
    CMD>

All ok. Now I send a 'script delete' (I must do it before any new srcript ) the I download the script.
(It is 'script.sonoff', modifiend ONLY on start config as you see before)

   CMD>script http://192.168.178.23:85/www/sonoff/sonoffscript02.txt
   HTTP request to http://192.168.178.23:85/www/sonoff/sonoffscript02.txt started
   HTTP script download completed (2733 Bytes)
   _

Here it stops: no [CMD>] prompt, and I never seen the "Syntax okay" message.
I must press [CR], the prompt shows, and then I can do the 'reset' command.
(continue)

@martin-ger
Copy link
Owner

If you type "show script", you see that the script is loaded? Seems so, when looking on thr other topic.

There is no need to delete an old script. Loading a new one automatically deletes the prior.

@msillano
Copy link
Author

msillano commented Feb 4, 2018

Yes, 'show script' shows the new script, i.e. the download works, also without 'Sintax check'.
And 'script delete' is really not required.

added:
But i must use it:
Here a transcript (serial):

CMD>script http://192.168.178.23:85/www/sonoff/sonoffscript05.txt
HTTP request to http://192.168.178.23:85/www/sonoff/sonoffscript05.txt started
CMD>
HTTP script download completed (3617 Bytes)
Error (action command expected) at >>"/user "{Time: | $timestamp | ",ON} retained publish 
CMD>                                                                                                        
                                                                                       [script debug..]
CMD>script http://192.168.178.23:85/www/sonoff/sonoffscript05.txt
HTTP request to http://192.168.178.23:85/www/sonoff/sonoffscript05.txt started
CMD>
HTTP script upload failed (error code -1)                        [after a bad script I get it. To exit]
CMD>script delete
Script deleted
CMD>script http://192.168.178.23:85/www/sonoff/sonoffscript05.txt
HTTP request to http://192.168.178.23:85/www/sonoff/sonoffscript05.txt started
HTTP script download completed (3599 Bytes)
Syntax okay                                                           [  same script as before]
CMD>

Thanks
m.s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants