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

mmgg.feeder.fi1 improvements #40

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cristianchelu
Copy link
Contributor

This PR includes 4 changes, in 4 commits:

add debug log for mcu time request

While debugging time-related issues, I had the need to validate that the MCU was actually requesting and receiving the correct time.

This is already logged by the VERBOSE level, but keeping the log open for ~1 hour to catch the MCU requesting this will eat memory+cpu on the browser very quickly.

Just adding it on the DEBUG level seems useful to have. I can separate / remove this part from the PR if you want.

mmgg.feeder.fi1 changes

  • Based on investigations, it seems virgin devices flashed directly with ESPHome are missing some intialization in the contrycode (Siid: 9, Piid: 13) parameter, making the scheduler not work. This initializes it with a known good value. Fixes Smart feeder pending feed plan #39 .
  • Adds automatic DST adjustment and control of the phon_time_zone timezone offset parameter. I experimented a few iterations to make the auto-adjustment optional, but in the end decided it's not worth it.
    • Device timezone is now a compile-time decision only via the auto_dst_timezone substitution. I tried exposing this as a text component, but at runtime, ESPHome can only handle explicit declarations in the form EET-2EEST,M3.5.0/3,M10.5.0/4 instead of human-readable Europe/Bucharest that are available at compile time. This means that while we could change the TZ at runtime, it would be cumbersome, and let's be honest, how often do people change timezones without some change to their smart home config? :)
    • phon_time_zone becomes a read-only diagnostic sensor. Allowing a manual override would mean adding a switch for "Auto-DST" logic, and since the timezone is not easily runtime-changeable, again, there is little benefit for the added complexity.
    • Additionally for the phon_time_zone, seeing as there's a set-phone-time-zone action, as well as the property itself being writeable, there might be some slight differences that could explain the weird behavior described.
  • In order to improve the word-break UI for the raw feed plan, I've separated the schedule entries by a space instead of the MCU-style comma. There's no functional differences as it's a diagnostic value only.

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.

Smart feeder pending feed plan
1 participant