Skip to content

v0.3.0 - Rewrite to async

Compare
Choose a tag to compare
@Snuffy2 Snuffy2 released this 04 Jun 00:22
· 19 commits to master since this release
e4085bd

Large, behind the scenes rewrite to change to async functions. The existing Docker and Command-line settings didn't change so all previous setups will continue to work.

Changes

  • Change JuiceboxTelnet from telnetlib to telnetlib3 (Fixes #25)
    • This started the cascade of needing to update every other class to async as well
  • Update JuiceboxUDPCUpdater, JuiceboxMQTTHandler (fka. JuiceboxMessageHandler) to async and moved to separate files.
    • In JuiceboxMQTTHandler, built out framework that should better support sending commands from JPP to the JuiceBox as well as storing the latest value sent to HA. Hopefully this, along with the Experimental option below, will facilitate further development of controlling the JuiceBox from JPP/HA.
  • Updating PyProxy required essentially a full rewrite so renamed to JuiceboxMITM. Incorporated asyncio-dgram
  • Add EXPERIMENTAL option for users to opt in to the in development functions. Currently this exposes:
    • Data from JuiceBox and Data from EnelX sensors to HA
    • A MVP Text field to send "commands" to the JuiceBox
  • Improved logging including logging to both stderr and a file. Implement log rotation to keep 14 days of file logs.
  • Implemented aiorun and tini for better garbage management, thread cleanup, and graceful shutdowns
  • Attempted to incorporate better handling when connections or updates fail. This includes restarting connections, implementing timeouts to prevent freezing, as well as fully exiting the program when too many errors have occurred to allow a docker restart of the app.
  • Incorporate several items from #55
    • Add ignore remote option, now called IGNORE_ENELX option to prevent commands from EnelX to going to the JuiceBox and data from the JuiceBox from going to EnelX
      • Any commands from EnelX will still be captured by JPP
    • Add Current Rating sensor
    • Add the parsed fields from the JuiceBox status messages as attributes in the Local Data experimental sensor
  • Moving away from SRC and DST in both the settings and the code as it was not clear what they should contain.
    • Deprecated the SRC option and replaced it with LOCAL_IP
    • Deprecated the DST option and replaced it with ENELX_IP
    • Current setups using SRC and DST will continue to work for now but should eventually be updated to the new terms.
  • Add LOCAL_PORT option (Fixes #60)

What's Changed

Full Changelog: v0.2.2...v0.3.0