Connect your existing RF devices to the internet with Blynk

@Costas I am not at home now but I remember that it was like this (at least at the last lines, so from there I saw the old blynk library). I will cross check again but I believe that it was quite the same…

OK, but it is more the first part from Mounted file system to parsed json that is important.

I will provide QR code and links for the following version shortly. It is the same as what you have but with Blynk 0.3.7 library and specifically for WeMos. You might want to try it when you are back home.

QR code for WeMosRFv0.3.7a

Link for app, instead of using QR code, http://tinyurl.com/zbhrcjb (access from browser on Smartphone).

New bin file https://thechariot.co.uk/esprf/WeMosRFv0.3.7a.bin

If anyone tries this it might be worth keeping a full log from the Serial Monitor.

Dear @Costas ,
today I will see the “old” log before I OTA the new one and I will let you know. The same for the new version… Cheers

@Costas
Dear Costas, something wrong is happens… Both the old & the new firmware has a log like this:

Mounted file system
*WM: Adding parameter
*WM: blynk
*WM: Adding parameter
*WM: Firmware
*WM: Adding parameter
*WM: Max
*WM: Adding parameter
*WM: Min
*WM: Adding parameter
*WM: Calibration
*WM: Adding parameter
*WM: Email
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client…
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 192.168.0.148
Connected to Central Heating System
[4659] Blynk v0.3.7 on NodeMCU
[5001] Connecting to blynk-cloud.com:8442
[5162] Ready (ping: 0ms).
[10539] Connecting to blynk-cloud.com:8442
[10702] Ready (ping: 1ms).

As you can see there are not all the parameters that I wrote (many times as test) in the THE CHARIOT wifi manager. I suspect something wrong with my SPIFFS. Is there any easy way to erase or to format the SPIFFS in my WeMos D1 mini? Please advice.

Thanks and Best Regards,
Mike Kranidis

P.S. In the size selections I have choose 4M (3M SPIFFS) is that ok?

4M with 3M SPIFFS is fine and the settings I use.

Are you able to turn off the router, reset the WeMos and then turn the router back on?

When the router is off the WeMos will create the AP for you to enter the credentials. Once the WeMos has restarted you can power the router back on and enter the details in the web page created with WiFi Manager.

I have done this all the times in order to put my data (blynk AUTH etc) in the WeMos under testing…
All the times the same as the log above…
Need a way to wipe the WeMos tho

You could try Ken Taylor’s flash eraser:

// https://github.com/kentaylor/EraseEsp8266Flash/blob/master/EraseFlash.ino
// this might recover a bricked ESP8266
#include <WiFiManager.h>          //https://github.com/kentaylor/WiFiManager 
void setup() {
  Serial.begin(115200);
  Serial.println("Starting...");  
  printf("SDK version:%s\n", system_get_sdk_version());
  size_t cfgAddr = 1024; //(ESP.getFlashChipSize() - 0x4000);
  size_t cfgSize = 1024;//ESP.getFlashChipSize();//(8*1024);
  int last = (ESP.getFlashChipSize()/0x10)/(SPI_FLASH_SEC_SIZE);
  Serial.println(last);
 
  noInterrupts();
  for (int j=0; j<last; j++) {
  Serial.print("j = ");
  Serial.println(j);
     if(spi_flash_erase_sector((j * SPI_FLASH_SEC_SIZE/0x100)) != SPI_FLASH_RESULT_OK) {
        printf("addressFail: %d - 0x%x\n", (j * SPI_FLASH_SEC_SIZE), (j * SPI_FLASH_SEC_SIZE));
      }
      else {
        printf("addressSucceed: %d - 0x%x\n", (j * SPI_FLASH_SEC_SIZE), (j * SPI_FLASH_SEC_SIZE));
      }    
    }
  interrupts(); 
}

void loop() {
}

Let me know how that goes as there are a couple of other tools for clearing SPIFFS.

The following short sketch will clear SPIFFS as opposed to FLASH but you will still need to power down the router because clearing FLASH and SPIFFS does not clear WiFi credentials.

#include <FS.h>    //this needs to be first, or it all crashes and burns...

void setup() {
  Serial.begin(115200);
  Serial.println("\nFormatting SPIFFS please wait .....");  
  SPIFFS.format(); //clean FS, for testing
  Serial.println("SPIFFS was formatted");
}

void loop() {

}

Dear @Costas thanks a lot.
I give up for today. I defeated, I admit it…

Tomorrow night I will try again!

@Costas
Dear Costas, after erasing two three times the flash using this method FINALLY I GOT IT WORKING… Now I have to see how to get it useful. I have some couple of MX-RM-5V receivers and transmitters (I took them from your link above). What is the preferable way to connect (can you make a simple drawing) and how can test them?
Thanks and Best Regards
Mike Kranidis

@Costas
I made a test using my remote controlled outlets (ELRO AB440R). After completed the procedure, one message wrote that we will add your… device as soon as possible… The question is where my device will be added? Your application WeMos RF… has any usefulness or it is just a way to import RF devices to your database? Sorry too many questions…

Best Regards,
Mike Kranidis

Morning @mikekgr

I’m glad you finally got it all working, congratulations. A few people have reported issues with WiFi Manager but I have always found it to be very reliable.

I think you have now wired up your RF receiver and transmitter but if not the connection details are covered in the original post of this thread. Let me know if you need any further details.

The app is a fully working product and users can now control their 433 MHz RF devices via the internet. Once the RF transmitter is wired up you can toggle the RF device ON and OFF if your device is already in the database. Simply select your device from the drop down list in the RF Device Menu widget.

There is a MUCH more detailed version of the app that controls RF devices based on room temperature, weather conditions (temperature and wind speed etc) and with Blynk timers etc but we wanted to keep the basic model below 2000 Energy units i.e free for Blynkers.

Does your ELRO AB440R have 3 (ABC) or 4 (ABCD) buttons?
I believe the ELRO’s are configured with DIP switches like the Home Easy RF Central Heating switches we use. Please confirm the number of DIP switches is 10 and advise the state (ON / OFF) of switches 1 to 5. We don’t need to know switches A to E.

We have 1 or 2 reasonably clean “OFF” signals for the ELRO and should be able to provide an updated bin file for you to try in a few days. We might need some clean ON signals but we will advise if we do.

Dear @Costas,
thanks a lot for your detailed answer. Today evening after returned back to my home I will answer your questions and I will attach a photo or two to see exactly the case. The remote control has 4 zones A (On/Off), B (On/Off), C (On/Off), D (On/Off). ELRO is configured using DIP switches both at remote control as well as at each outlet, yes you are right!

I did not understood, using your Blynk application, how to select the various already known RF devices from the menu. I feel that I am not very in for this app…

Later I will give you the rest of answers…

Thanks and Best Regards,
Mike Kranidis

@Costas

Dear Costas, in addition to my replies that I gave you above, please see the picture of remote control as well as the A outlet.

Please instruct me further in order to control these outlets.

Thanks and Best Regards,
Mike Kranidis

Thanks for the details on the Elro @mikekgr

Have you connected the transmitter to the WeMos as detailed in the first post in this thread?

I’ll let you have an update bin file as soon as possible.

Dear Costas, I connected right now. I am very ready to go (?)! Waiting for your instructions! Thanks

@mikekgr bin file for you to check if your ELRO sockets respond at https://thechariot.co.uk/esprf/ELRO-test.bin

Serial Monitor and RF signal shown below. The bin file will turn each of the 4 sockets on and off every second in a continuous loop. If you can confirm this works I’ll incorporate it into the Blynk app and send you a link.

`

Thanks Costas.
Please tell me how to initiate the OTA in order to “flash” the new firmware?
I tested http://192.168.0.148/update but without any responce from WeMos …

@Costas it is replied now, lets see if the OTA will go as it should …