Local Server

Hi…

I don’t get, how to get my esp8266 as standalone to compile code for using it on a local server. I read the doc here as well as this post… but no luck so far.

To connect I need the SSID as well as the password to connect first and than I can define the server, where the script is running with the IPAddress? Sorry, but I’m lost here…
Server is running fine (at least I think) on a RPi within the same network…

Thanks…

@Minc

You need to :

Blynk.begin(auth, SSID, pass, IPAddress(192,168,0,1));

Where 192.168.0.1 - IP Address of your raspberry PI (you could check it by typing “ifconfig” on your rasp)
Also you have to put this IP when logging in to the Application.

Let me know if you still have questions.

Also have in mind that you need auth token generated exactly for that IPAddress.

Doesn’t the Blynk-App, when run in the “local server-mode” provide the above mentioned token exactly for that IP? Or do you just want to point out, that it might be good to use fixed IPs?

:slight_smile:

It is. Just reminder. Have you made it work?

Just having a coffee… will do so afterwards… :smiley:

1 Like

@Dmitriy

I’ve got it up and running. Very nice… with the additional info you provided it is straight forward even for a beginner like me. But I would change the documentation from

Change you sketch
...
Blynk.begin(auth, IPAddress(xxx,xxx,xxx,xxx));

to something like

Change you sketch from 
...
Blynk.begin(auth, SSID, pass));
to
Blynk.begin(auth, SSID, pass, IPAddress(XXX,XXX,XXX,XXX));

And mention the stuff with the auth for the (static) IP over there. This would have made a clearer I think.

Two follow-up questions:

  1. How long is the timeout until the app needs to re-connect to the
    server?
  2. Is there a chance to log the data that is transfered via the local server - be it a key-press or some senor-data? Or is this in the works and like the log-widget you mentioned elsewhere?

:slight_smile:

Good points! Thank you. I’ll update docs right now.

How long is the timeout until the app needs to re-connect to theserver?

Timeout is 15 minutes (configurable via server.properties). So if app opens connection and doesn’t send anything - connection will be closed by server after 15 mins.

Is there a chance to log the data that is transfered via the local server

Right now there is only in-memory storage for graph data. But… Give me few days and I’ll make some basic storage. Right now I have a time to implement it.

By the way do you have preferences regarding how data should be stored and what is critical for you?

I mean what data do you plan to store. How often you plan to store values, what statistic do you plan to see as output (for instance average value during a day or something like that).

Reply moved here.