Interesting one this — I've been down a similar rabbit hole with my shepherd's hut setup.
Running a Victron Phoenix 24/500 here alongside a SmartSolar MPPT, with a Raspberry Pi Zero W doing the monitoring. The MPPT side has been rock solid using the VE.Direct hex protocol for months — pulling historic yield data, bulk/absorption cycle counts, all the good stuff. No drama whatsoever.
But when I wired up the Phoenix via VE.Direct and started parsing the text protocol stream, I noticed something similar to what you're describing — occasional hex-framed bytes appearing inline within what should be a clean ASCII text output. Took me a while to realise the Phoenix firmware seems to interleave async hex notifications (unsolicited responses, I think — flagged by the 0x0 frame type) into the text stream without any clean delimiter separation from the human-readable fields.
My current bodge is filtering on the : prefix character to separate hex frames from text records before passing anything to my parser. Seems to work, but it feels fragile.
A few questions for anyone who's tackled this:
- Is this behaviour documented anywhere in the VE.Direct Protocol PDF? I'm on version 3.33 and can't find a clear explanation.
- Does the Phoenix behave differently from the MPPT in terms of how frequently these async frames appear?
- Has anyone found a more robust parsing approach in Python or C that handles both frame types gracefully in a single read loop?
The Victron Community forum has some threads but they tend to go quiet or disappear behind ESS-specific discussions. Hoping someone here with hands-on VE.Direct experience might have dug deeper into this.