Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP, OpenEVSE merge 2020-08 #74

Merged

Conversation

jeremypoulter
Copy link
Contributor

@jeremypoulter jeremypoulter commented Aug 19, 2020

This is a merge of work from OpenEVSE back to EmonESP. Loads of features including, but not limited to

  • HTML/JS embeded into the firmware, no more uploading the SPIFFS separately
  • Better WiFi management
  • Improved GUI dev tools, makes it easier to develop the UI
  • Remote display of both the EmonTX serial and the Debug output
  • Config saved as JSON in the 'EEPROM', makes adding additional config easier
  • The Input process is more robust, parsed into ArduinoJson 'document' for passing to the different outputs

Still need to test on different devices, currently only really tested on a Huzzah

Also moved all the board specific setup to the platform.ini and based on #defines, makes the code less complicated
both for the timer branch and (my)pre-timer branch
- last data now a propper JSON doc
- merged logs and latest value view models to stop extra fetches
- added more units
- added a few more system values to the input data
@glynhudson
Copy link
Member

  • saving config is now working and persisting between reboots, the version I compiled locally now includes this fix 👍

Current issues remaining:

  • HTTP firmware update
  • WiFi PSK printed as plain text in serial debug

@jeremypoulter
Copy link
Contributor Author

Both those issues should now be fixed

@glynhudson
Copy link
Member

glynhudson commented Sep 8, 2020

I've just tested HTTP update, the progress bar looks nice! However, the bar gets about 1/4 of the way before hanging for a few seconds then reporting 'update failed'. Nothing is shown in the debug window:

Screenshot from 2020-09-08 13-14-12

@jeremypoulter
Copy link
Contributor Author

I suspect this may be memory related, in my tests only 7k free when upgrading :( need to review the memory usage.

@glynhudson
Copy link
Member

I've been testing the latest version for a few days now, It works perfectly on the Huzzah: receiving data from emonTx, posting to MQTT/HTTP and HTTP firmware update 👍

However, running on the WiFi relay the issue of losing the config when restarted / power cycled has returned. Also HTTP update does not work on the WiFi relay. It's a shame the firmware update does not work on the wifi relay but maybe it's not possible given the hardware limitation. However, the issue of losing the config and dropping off the WiFi on reboot is obviously a major issue.

Screenshot from 2020-09-25 01-03-40

@danbates2
Copy link
Contributor

danbates2 commented Sep 25, 2020

Heya, chipping in here that the wifi relay has only 1MB flash. The config as EEPROM emulation on the esp8266 will be put at the end of the flash, so EEPROM would be lost on the 1MB flash if it's expecting it to be elsewhere.
We've noticed also that Tasmota have got around the issue of updatability by having a separate, smaller, binary for updates. Something to do with firmware mapping, which I don't know much about unfortunately.

@jeremypoulter
Copy link
Contributor Author

Ah that would explain both issues, thanks @danbates2.

@jeremypoulter
Copy link
Contributor Author

@glynhudson I have fixed the WiFi relay image to be 1Mb, give it a try.

@glynhudson
Copy link
Member

Fantastic! It works great now 👍

I think we're good to merge this.

The WiFi relay actually has 2Mb of flash. I've made the change to build the 2Mb image.

@glynhudson glynhudson merged commit a0538cb into openenergymonitor:master Sep 28, 2020
@stuartpittaway
Copy link

Hi, I've just tried this firmware on an old SONOFF WIFI Relay (basic). It only has 1Mb flash.

The version in the releases 3.1.0 seems to work fine, please stay at 1Mb !

Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 5c:cf:7f:e9:ec:ae
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0320
Compressed 845472 bytes to 498612...
Wrote 845472 bytes (498612 compressed) at 0x00000000 in 44.3 seconds (effective 152.6 kbit/s)...
Hash of data verified.

@jeremypoulter
Copy link
Contributor Author

The different envs should be configured with the correct amount of flash so that shouldn't be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants