Through the help of this forum I posted and got help figuring out how to send data to emoncms.org using only an ESP32/ESP8266.
Thank you for that help because I love emoncms.org and am converting everything over from Blynk.io.
For one of my sensors I need an adc and the ESP adc is very noisy and unusable. So for my present system I have an atmega328 where I use its adc and then send data using a software serial port to an ESP-01 and I get good clean data.
My problem is that I have some kind brain lock and I cannot figure out how convert my code to send data to emoncms.org with this same hardware.
And I can’t seem to find an answer after many hours of googling.There seems to be too many variables for me to hold in my head at the same time. For example, using a software serial port, and using the ESP-01 in its AT command mode.
Can anyone point me to code examples that I can work from?
Hi Steve, I don’t know if my comments will help you but… I don’t use the AT commands. I have an Arduino Mini Pro getting the voltage and current data, because of the better ADC. That data is sent to an ESP8266 by hardware serial, although software serial could also be used. The ESP8266 uses serial receive code ‘distilled’ aka vastly simplified from the emonESP code. The received data is then sent via http POST to emoncms.org. I can also send the data via MQTT to Node-REd, Home Assistant etc. I don’t claim any credit for the code as it is based on what I gleaned from the OpenEnergyMonitor documents. I am happy to share the code by email or Messenger if you wish.
The “Shop” emonESP is an ESP8266 with software that connects directly to the emonTx - which of course uses the ATMega 328P processor. All the software for that is here: GitHub - openenergymonitor/EmonESP: ESP8266 WIFI serial to emoncms link
Thank you bobcroft and Robert. With both your comments I am realizing that it does not talk using the AT commands built into the ESP-01. Probably why I got few results while googling.
Thank you for your offer bobcroft, it would be great if you could send it to [email protected].
And I will spend some time looking at this GitHub so thank you for that Robert.
Sorry my email is wrong.
Please send to [email protected]
It seems like I have to install python and the environment and then compile it in order to get the binary file which I need to program my ESP-01.
Can I just download the file from somewhere? I can’t seem to find this file.
Hi Steve, files emailed to you today as promised.
Sorry Bob, did you email the files? I do not see them?
Maybe a PM here (the Envelope icon when you click on your own icon in the blue header, right-hand side)? I think you both should have PM’s available to you.
Hi Steve, yes I sent them on Wednesday, I’ll sent them again later today as I am about to go out to work. I’ll send them as a reply to this email.
I have deleted my reply to Steve as I did not intend to put the files in a public domain although I am happy to share them with individuals.
It is not clear to me how to reply to people using the PM you refer to on a one to one basis. I think the best way is to exchange emails outside of the OEM forum. I had no idea that a simple offer of help could turn out to be such an issue.
Where’s the issue? For some reason, your email didn’t work - I suggested you use the PM facility. That means you don’t need to make your or anybody’s email address public. A PM is visible to the 3 Admins (Glyn, Trystan & Gwil) but to no-one else.
To access the PM, I think you need to be on the website, not contributing by email. Click on your Icon, then click the envelope twice. You’ll come to the Inbox page, with a list of other mailboxes below, and a (presumably empty) list of messages to the right. Click New Message below the list of mailboxes to generate a message. You’ll need the recipient’s UserName, and that’s about all. A small disc appears attached to your Icon (on every page) when you have an incoming PM.
Hi Robert, that clarifies things. I think I was mixing up the wesite and contributing by email. I’ll see if Steve replies that he has received the files today.
Thank you Bob for your files. Unfortunately it seems like the SPIFFS has been deprecated and I am not sure how to fix this.
So I am looking at the GitHub that Robert sent me and I have spent some time with it and I am still having troubles.
I have finally found the two binary files firmware.bin, spiffs.bin and the python program esptool.py.
And I have installed Python.
Then I have tried these two lines:
esptool.py -b 921600 write_flash 0x000000 firmware.bin 0x7B000 spiffs.bin
These seem to open and close a window so fast I have no idea what happened but I am pretty sure nothing was downloaded.
Now while doing this I have only one com device and it is the ESP8266 board which is on COM14.
I find this whole process really difficult. I think I am almost there but just can’t figure out how to program it.
Sorry, I should add:
-I am using a programming board which I know works with the ESP-01.
-I have tried a lower baud rate as low as -b 9600 and the window flashes so quick I cannot see it.
From the ESPRESSIF page it says to type this to get all available commands:
But when I type this on a command line, as I mentioned before, I see a window pop up for half a second then go away again.