Most recent activity
-
- 2 comments
- 2,100 views
-
Hi there Ollie
That looks good - can't test it - I've put my stuff away for travelling.... that looks good -but - and this is a guess - should that routine now also include any subscribes that you have lost... and if so is there a way to call that routine normally so that we don't duplicate code.. so perhaps that on disconnect could call a routine with the connect and subscribes - and that routine could also be used at startup??? I'm assuming in all of this that the WIFI reconnects automatically?
Hopefully early next week I can settle down in my office in Spain and try all of this out.
I'm also at a loss as to why the limited space for code - given that the ESP12 has 3 meg spare? I wonder if there are any plans to check for that and expand user space accordingly?
-
-
Using the ESP8266 I've managed a connection - no problem - and an MQTT (https://www.espruino.com/MQTT) connect - with subscribe. All works swimmingly well.
But, if you disconnect and reconnect the router, you've lost your MQTT connection and subscribes - although the WIFI does seem to reconnect automatically.
Has anyone already written something to check for broken MQTT connect - and reconnect automatically? (without which of course it isn't a lot of use :-) )
-
-
-
-
HI there
Thanks to all for the feedback - I'm sure someone will see that it is entirely possible to get this wrong as a first time user.
About the only thing driving me nuts now that I understand, is this "undefined" thing... Shame you can't turn that off - it happens after many lines entered manually - though everything appears to work.I noted that despite using a 4MB ESP12, there's only, what, 12K to store programs? That's what I read in the docs - is there a way around that now ? Seems to me there is around 3MB spare (now I have that getFreeFlash() working - thanks Ollie.
This looks like it might be fun.
-
Also - this - in the docs - is unrecognised.
ESP8266.getFreeFlash()
Mentioned here.. https://www.espruino.com/EspruinoESP8266
An ESP8266 enthusiast, I've written my own C code for the boards to handle WIFI, MQTT and talk to a range of devices with complete reliability - but I'm interested in the possibilities of using Javascript and hence Espruino.
My normal ramblings can be found over at http://tech.scargill.net which has a large following and we chat about everything from SBCs through the tools to use them down to ESP8266 and Arduino. You're welcome to join us.
Pete.