I tried compiling with platformio earlier and while it did compile and upload, the user interface was very sluggish ultimately crashing all together. I went back to the Arduino IDE and it all worked fine. I’ve copied bin and spiffs compiled for esp8285 to the github repo here compiled for esp8285 · openenergymonitor/EmonESP@42054c9 · GitHub
I havent yet worked out how to upload these via command line:
I hadn’t switched beta on. Once I did that the switch appeared.
How do you update just the demand module? I haven’t updated to 9.9.7 yet, waiting for a week or so while I concentrate on getting best out of Octopus Agile.
pi@emonpi:~/demandshaper $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
pi@emonpi:~/demandshaper $ git pull
fatal: unable to access 'https://github.com/emoncms/demandshaper.git/': Could not resolve host: github.com
At last success! My board is esp8285. Nothing happened when I uploaded precompiled esp8266 so I tried esp8285 and at last the AP appeared. Interesting nothing appeared on the serial port until after I had filled in SSiD and connected.
Some people are never satisfied. I cannot connect to my MQTT broker as although I can enter server URL there is no provision for port number and I use non standard port number for security reasons. Is there a way to enter port number? I tried 192.168.1.??:20??
Still having git pull issues. Setting up a new SD so I can backup and restore.
Hello @ian, after you mentioned that you had no issues with the tasmota firmware I thought I would have a look at their platformio.ini file to try and compile using it. I removed the unused language flags, changed the flash size + a couple of other minor modifications and it worked! The tasmota platformio specified the build environment in more detail and included the flash size.
I’ve uploaded the platformio.ini file to the EmonESP repository. Would you be able to test it?
I had to update platformio as well:
pio update
pio upgrade
then:
pio run -t upload
pio run -t uploadfs
I have copied the compiled binaries to the compiled folder.
I did a git pull and got the ini changes.
My platformio was up to date. I then ran the uploads to my S20 plug. It immediately appeared as an AP. Entered SSid and password and it came up on the network. I can switch on and off no problems. It appeared as an input requesting connection to be allowed. I had hard coded the MQTT port so I can control it from emonCMS demandshaper interface!
I am pleased to say it past my test.
If the MQTT port was configurable from the web interface (and possibly name and node number) it think it should now just run on any installation.
It defaults to 1883 if the value in the EEPROM is 0. I needed to click on Factory Reset to fully reset the EEPROM so that the default is applied. I havent yet implemented the transfer of the port setting from the demandshaper module as part of the auto authentication process, so you will need to set the port manually in the EmonESP interface.
I’ve also added an ID based on the ESP chip ID (its shortened by dividing by 5120)
The compiled binaries have been updated and the old arduino IDE versions removed.
pi@piserver:~ $ git clone https://github.com/openenergymonitor/EmonESP.git
Cloning into 'EmonESP'...
git checkout timer
Branch timer set up to track remote branch timer from origin.
Switched to a new branch 'timer'
I think there might be some files overlooked in the new platformio.ini
src/mqtt.cpp:32:107: fatal error: PubSubClient.h: No such file or directory
In file included from src/web_server.cpp:31:0:
src/web_server.h:30:25: fatal error: ESPAsyncTCP.h: No such file or directory
stry!
*********************************************************************
compilation terminated.
Please try $ git pull then $pio run again to test.
This is one of the best features of platformio to be able to specify exactly which libs we want and which version.
Looking at the new platformio file it looks like most of these options which have been exposed are just the default settings for the ESP. As a result it looks unnecessarily complicated! I’ll take a look to see exactly what is needed. Was just specifying board esp01_1m not enough?
Just tested and it seems esp01_1m was all that’s needed. I’ve just successfully uploaded to an S20 and it seems to be working fine It’s just connected to WiFi
I dont see any harm having the additional detail, you can see exactly which version of the core esp8266 its using etc, the flash size setting Teagle.flash.1m512.ld and DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY