v11.0.0
What's Changed 馃摝
Version 11 is a new major release of the Battery-Emulator, with many wireless cybersecurity enhancements and MQTT changes that might require attention when updating. Please familiarize yourself with the release notes before OTA updating to this version.
-
This release brings us several cybersecurity improvements. From now on, when the Wi-Fi access point (AP) is running with the factory-default password (123456789), and no client connects to it, it is automatically disabled after 5 minutes (raising a corresponding event). If a custom AP password has been set, behavior is unchanged and the AP stays enabled indefinitely. Limiting the default-password AP to a short provisioning window mitigates the attack vector while keeping first-time setup and recovery access fully functional. The log window had Wi-Fi/AP passwords printed in cleartext, in the settings UI the Wi-Fi/AP/MQTT/HTTP-auth password fields rendered the stored value into their HTML value attribute making it possible for malicious actors to read them. This has changed so that these fields remain empty, and when submitting the form without any of these filled, they will not be changed.
-
Long-pressing the board BOOT/FLA button at runtime brings three new features useful for on-site work and troubleshooting: long-press 5 to 15s starts the AP if it's not on (perfect to restart the provisioning window introduced above); 15s to 30s will wipe the Wi-Fi client settings and reboot with AP on (useful when local network changes, or runs in trouble); long-press more than 30s will perform a full factory reset and reboot (a physical, UI-independent recovery of last resort). All actions are decided on button release, based on how long it was held. Color led blinks white at various speeeds to confirm the selected stage (slow-, mid-, and fast blink respectively).
-
MQTT possible breaking change
鈿狅笍 From now on Battery Emulator always sets a hostname, which defaults tobattery-emulator-xxxx(the last two bytes of its MAC address lowercase). This value is used to identify the device on all the supported platforms: this will be the SSID of the AP, the broadcasted mDNS name, the identifier in the DHCP lease request, the value for "MQTT topic name", "Prefix for MQTT object ID," "HA device name", "HA device ID", and the host identifier in the syslog messages. Consequently, the "Customized MQTT topics" checkbox and its four dependent fields ("MQTT topic name", "Prefix for MQTT object ID," "HA device name", "HA device ID"), the "Access point name:" field were removed from the web interface. This counts as a breaking change: if you rely on MQTT for your automations related to Battery Emulator, prepare for the potential adjustments (tip: if you used the same value for the four custom MQTT topics, you'll likely get away easy by setting that as Hostname from now on). This not only makes long term usage more straightforward especially when multiple emulators are in use, but also significantly reduced flash space requirements. -
Display support (128x64 OLED) has been removed for "LilyGo T鈥怌AN485". This breaking change also frees up the GPIOs - but please don't be disappointed by this - support for ESPNow v2 is in the works, which has many more advantages for display usage: a plethora of full-color display types will be able to show data even from multiple nearby emulators, much more data (including individual cell voltages) in a customizable interactive form, in a safer manner without physical connection.
-
A new logging backend has been added: syslog. This self-contained solution introduces no new libraries, no new sink patterns: reuses the same engine that was already in for USB / web / SD logging thus it was very cheap to add. The big benefit here is that events happening in Battery Emulator can be logged independently from the system (even on a NAS which supports log receiving for free) making troubleshooting easier on long term.
Apart from all this, there are several other bugfixes and enhancements. Please check out the full list of changes below
Taking this release into use 鈿欙笍
Important
In order to OTA update to this version, you already need to be on a v10 release!
Note that v10 was a major new release of the Battery-Emulator software. The first time when taking a version > v10.0.0 version into use, you are required to perform an initial one time USB setup via this webpage! This is because we changed the flash frequencies, partitioning layouts and other under the hood changes to ensure longterm system stability. After any v10 has been installed via USB, following 10.X.X releases can be updated over the air.
Quickstart video: https://youtu.be/sR3t7j0R9Z0
Batteries 馃攱
- BYD vehicle: Add U014100 description by @dalathegreat in #2538
- Volkswagen MEB: Open contactors if inverter demands so by @dalathegreat in #2533
- VCU: Always assume inverter is alive to avoid fault mode by @dalathegreat in #2546
- Double/Triple battery: Add hysteresis to out of sync voltage event by @dalathegreat in #2536
- CMFA platform: Add support for triple battery operation by @dalathegreat in #2542
- Tesla S/3/X/Y: Full CAN alert-matrix (DTC) decoding by @hpetersen in #2558
- Tesla S/3/X/Y: Reduce USB debugging string length, comment out unused code to save flash by @dalathegreat in #2574
Hardware 馃
- Feature: Add CAN bus error detection and handling, and allow NativeCAN bus-off recovery by @jonny5532 in #2568
- Safety: Wait for Battery3 current to drop to 0A to pause/reset checks by @jonny5532 in #2553
- Safety: Make Equipment Stop STOP/RESUME explicit by @jonny5532 in #2554
- Safety: Skip BMS reset incase Equipment Stop is active by @dalathegreat in #2549
- Safety: Do a graceful restart for reboot/MQTT/OTA, keeping CAN active to avoid any welded contactors by @jonny5532 in #2551
Connectivity
- Improvement: MQTT and AP UI reductions, settings page UI by @nagyrobi in #2562
- Feature: long-press board BOOT button to start AP or factory reset by @nagyrobi in #2541
- Cybersecurity: Don't expose passwords in web log and settings page by @nagyrobi in #2534
- Cybersecurity: Provisioning window for AP with default pass by @nagyrobi in #2566
Housekeeping 馃Ч
- Feature: Add general logging to a syslog server by @nagyrobi in #2555
- Update short SHA length in firmware rename step by @nagyrobi in #2548
- Improvement: Flash reduction by @dalathegreat in #2550
- Improvement: Guard display against SMALL_FLASH_DEVICE to save flash usage by @nagyrobi in #2565
- Improvement: Union datalayer entries, rejig constructors, to save Flash+RAM by @jonny5532 in #2570
- Improvement: Remove unnecessary initializations for extended_datalayer by @dalathegreat in #2572
- Github: Make compile action use more caches for faster builds by @jonny5532 in #2559
- GitHub: Fix PR measure action to use correct base commit by @jonny5532 in #2569
- Github: New GitHub action to measure and report firmware size of PRs by @jonny5532 in #2547
New Contributors
- @hpetersen made their first contribution in #2558
Full Changelog: v10.13.0...v11.0.0