-
Notifications
You must be signed in to change notification settings - Fork 66
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
Pytes battery: Add support for native CAN protocol #1196
Conversation
Thanks for your PR, cool that we can get more details about the battery by switching it to a different protocol. Things that we should adjust:
|
The UI is generic, as far as I remember. Only info that is put into the respective JSON array is displayed in the UI. So I am not sure why you mention this. We have to take care that in the backend, only relevant info is serialized into JSON. The respective BatteryProvider implementation is responsible for that. |
@schlimmchen That is exactly what i meant with my comment. Don't touch the UI code, adjust the BatteryStats for 'Pytes' to not add values into the JSON that are not available. |
6a95a5c
to
9a59048
Compare
Updated the pull request with support for alarms, warnings and online/offline module count (based on Ghidra analysis). |
ad32ed8
to
6bc1cc6
Compare
6bc1cc6
to
a16a92c
Compare
Added HASS auto-discovery for new fields. |
9e97dea
to
da43028
Compare
91cc2fc
to
8ff94e7
Compare
@ranma could you do me a favor and update the description of the PR to reflect what features/changes we can expect from this PR? Thank you. |
I switched to the PYTES protocol and the web ui is showing a strange value for It happens randomly and i could not find anything strange in the CAN messages, they all looked fine and showed the correct voltage of 53,xx Did you have the same experience @ranma ? |
I don't remember seeing any drops like that, not in the UI nor in the MQTT data. |
849d249
to
dc5ae84
Compare
I can currently reproduce this in testing right now, I sometimes see |
dc5ae84
to
091fca3
Compare
Everything works fine now. I will re-review this PR after my holidays and then we can finally merge it, thanks for providing this :) |
This one-byte message is set to 0xff to request charging below a certain SoC threshold (10% in my tests).
The recently added PytesCanReceiver.cpp implements the Victron CAN protocol. This change additionally adds support for the native Pytes CAN protocol messages. Features only supported in Pytes protocol: - High-resolution state of charge / full and remaining mAh - Charge cycle counter - Balancing state Features only supported in Victron protocol: - FW version - Serial number Note that the only known way to select the native Pytes protocol is via the serial console (Cisco-compatible cables work): ``` login config setprt PYTES logout ``` to return to Victron protocol use: ``` login config setprt VICTRON logout ``` to retrun to DIP-switch based protocol setting: ``` login config setprt DIP logout ``` The protocol switch should take effect immediately. Tested on Pytes E-Box 4850
091fca3
to
87c299e
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
The recently added PytesCanReceiver.cpp implements the Victron CAN protocol.
This change additionally adds support for the native Pytes CAN protocol messages.
Features only supported in Pytes protocol:
Features only supported in Victron protocol:
Note that the only known way to select the native Pytes protocol is via the serial console (Cisco-compatible cables work):
to return to Victron protocol use:
The protocol switch will take effect immediately.
Tested on Pytes E-Box 4850
See #1188