It seems that it’s very unclear to old-school-blynkers that the dashboard is just a template before it’s applied to actual devices. Thanks for this feedback!
This will be solved in 3 stages:
We already added a note to the docs in the hope that someone will read it
We will add a note to the dashboard explaining that it’s a template
UX will be improved by allowing to choose (or create) a “Preview Device” in the dashboard constructor + a couple of other improvements.
Looks like I am going to expire before I figure it out myself. Is there anyway to do static provisioning at the moment? I think the Blynk Twitter feed promised an example video? Has that happened and where can I find it please? I only have a Wemos D1 mini to test with WiFi and am not able to connect via the app. Wifi is enabled and my phone is connected via that to the Wemos D1 mini. Sorry if I am missing something obvious.
Thank you
lines to your old sketch and populate your template ID/Name information, and add your device auth token, and compile with Blynk library 1.0.0 or later (not one of the beta versions).
I then clicked on the link for Dynamic provisioning template for ESP8266 and was led to the Github page.
Clicked on the Edgent_ESP8266.ino and pasted it in Arduino and get the following errors.
Arduino: 1.8.13 (Windows 10), Board: “LOLIN(WEMOS) D1 mini (clone), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, DOUT (compatible), 40MHz, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600”
sketch_jun23a:18:10: fatal error: BlynkEdgent.h: No such file or directory
Okay, your question was about static provisioning, so I assume you have a working Blynk 0.1 sketch, which has SSID, pass and auth token defined in it.
Don’t touch your phone at all, do this from your web dashboard…
Create a template. You can add some datastreams if you wish, but that’s not necessary at this stage.
Copy the template I’d and name code snippet from the template and paste it into your old sketch near the top.
Ckick the magnifying glass on the left hand side to show devices. Click add and create a device from your template,
Locate the auth code on the device info tab and copy it, and paste it into your sketch.
Compile the sketch and upload it to your board, then reboot. It should connect to Blynk and tour device will show as online in the web dashboard.
You can then go back to your template and add-in datastreams and deploy them to your device.
Yes, I asked about static because dynamic has proven to be beyond my grasp. I didn’t want to completely give up on it though so I continued to try. Anyway, Ill give the suggestion a go and let you know the results.
Thank you as always for your time and patience
@PeteKnight,getting closer! Using the ESP8266 Standalone example. Entered template ID, auth token (man I had a hard time locating that!) and my wifi credentials. Flashed the firmware and am connected to my wifi but not blynk cloud? Missed something???
I did not specify the server. The firmware comes from Files/Examples/Blynk/Boards WiFi/ESP8266_Standalone. I did enter both Template ID and then tried adding Template ID and Blynk Device Name without success
/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
This example runs directly on ESP8266 chip.
Note: This requires ESP8266 support package:
https://github.com/esp8266/Arduino
Please be sure to select the right ESP8266 module
in the Tools -> Board menu!
Change WiFi ssid, pass, and Blynk auth token to run :)
Feel free to apply it to any other example. It's simple!
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID "YourTemplateID"
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
Strange, I flashed the firmware again and now even though I still cannot connect to the cloud, it is no longer trying to connect to blynk.cloud.com but rather blynk.cloud.
Your sketch from post #18 doesn’t have any virtual pin handlers (BLYNK_WRITE(vPin)) or Blynk.virtualWrite() commands, so not sure what you expect to happen?
I assume that if you have widgets in the app connected to the same virtual pin numbers then the app and the dashboard mirror each other?