We will probably create an Instructable for this when time permits but we thought we would give Blynkers a head start.
The project currently requires just 1800 Energy units so FREE for everyone.
Terminal prompts guide you through the process once you have the system set up and a couple of the prompts are shown below.
Rather than go out and buy new IOT connected devices you can quite often connect what you already have to the internet for a fraction of the price. For less than $1 you can buy an RF transmitter and receiver set on Ebay like these http://www.ebay.com/itm/140719918135
We are big fans of the WeMos D1 Mini but the details below should work for all â16 pinâ ESPâs. You will need to wire up a voltage divider (220K and 68K) for the analogue port if you are using regular ESPâs as they will only accept 1V without the voltage divider.
The circuit for the RF transmitter and receiver couldnât be simpler:
Receiver GND, 3V3 and AO.
Transmitter GND 3V3 (or 5V) and D0
The sketch actually uses standard GPIO references so D0 is GPIO 16 on a regular â16 pinâ ESP.
Currently the project uses the inbuilt LED on the WeMos which is D4 (GPIO 2) which should be ok for the â16 pinâ ESPâs.
We will try to make an ESP-01 version available (ESP-01 memory permitting) by changing the pin assignment for the RF transmitter from GPIO16 to GPIO 2 and the LED from GPIO 2 to GPIO 1 (TX Pin on the ESP-01).
Once you have the circuit wired up use a simple sketch like the one below to upload bin files to the ESP via a web bowser and OTA:
/*
To upload through terminal you can use: curl -F "image=@firmware.bin" theCHARioT.local/update
*/
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <ESP8266HTTPUpdateServer.h>
const char* host = "theCHARioT";
const char* ssid = "routerSSID";
const char* password = "routerPWD";
ESP8266WebServer httpServer(80);
ESP8266HTTPUpdateServer httpUpdater;
void setup(void){
Serial.begin(115200);
Serial.println();
Serial.println("Booting Sketch...");
WiFi.mode(WIFI_AP_STA);
WiFi.begin(ssid, password);
while(WiFi.waitForConnectResult() != WL_CONNECTED){
WiFi.begin(ssid, password);
Serial.println("WiFi failed, retrying.");
}
MDNS.begin(host);
httpUpdater.setup(&httpServer);
httpServer.begin();
MDNS.addService("http", "tcp", 80);
Serial.printf("HTTPUpdateServer ready! Open http://%s.local/update in your browser\n", host);
}
void loop(void){
httpServer.handleClient();
delay(1);
}
Be sure to enter you own SSID and PWD in the sketch for routerSSID and routerPWD.
As shown in the screenshot above the bin file for the project is available for download in the directory at https://thechariot.co.uk/esprf/
Once you have downloaded the bin file and uploaded the sketch above Serial Monitor should give you the following prompt:
Booting Sketch...
HTTPUpdateServer ready! Open http://theCHARioT.local/update in your browser
It can be done without Serial Monitor as the sketch is actually for OTA updates and you just need to cut and paste http://theCHARioT.local/update into your browser a few seconds after you power up the ESP.
The web browser should now show this:
Despite what it shows in the graphics above you should include the http:// when you paste in the url. From here you click the Choose File button and browse to the bin file you downloaded. Select the bin file and you will then be able to press the Update button. You will see the progress of the OTA update in the bottom left hand corner of your web browser.
If you are doing a true OTA update i.e. without connecting up to Serial Monitor your ESP should then reboot. If you have Serial Monitor connected you may need to manually reset the ESP at this point.
You now need the QR code for the Blynk project which is shown below.
You might also be able to access the Blynk project at http://tinyurl.com/gwehlur but is wasnât working for us when we tried it. Edit - the link seems to work for Android devices but MUST be accessed from your Smartphone not a PC and might not work with an iPhone.
We suggest you then email the Blynk token for the project to yourself by pressing the Nut icon and clicking the Email link.
The project makes use of @tzapulica excellent WiFiManager and ideally you should start with SPIFFS newly formatted (i.e. as the ESPâs come from the supplier).
If you restart the ESP now (perhaps connected to Serial Monitor but not essential) WiFiManager will set up an Access Point called THECHARIOT
*WM: Connection result:
*WM: 1
*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: THECHARIOT
*WM:
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
Look for the Access Point in your WiFi settings, select it and enter the password ACCESSCHS and then enter the following url 192.168.4.1 into your web browser.
It should then bring up the WiFiManager Access Point front page as shown below.
Click Configure WiFI to reveal this screen.
Click on the link for the SSID of your router (Office in our case), enter the WiFi password, paste in the Blynk token that you emailed to yourself and enter your email address. The other fields donât require any details and can be left as they appear on the screen. When you click the save button your ESP should connect to Blynk and you are ready to connect to your RF devices from anywhere with internet access.
Were sure that the details above look more involved than they really are but it can all be done in a few minutes, but we have had quite a bit of practise
We would be interested to know how long it takes you from start to finish.
We will follow up by providing details of how the App works but it is fairly obvious from the screenshots.
Meanwhile please note that the App will email details of the RF signals to us for âdecodingâ purposes. If you donât want the details to be emailed to us, donât use the App.