Chris, Derek, as you're checking the Leaf code, also have a look at this: Am 15.01.25 um 11:11 schrieb Michael Balzer via OvmsDev:
Speaking of the Leaf, the code there actually does something fishy in `CommandWakeup()`:
unsigned char data = 0; … m_can1->WriteStandard(0x5C0, *_8_*, &data); //Wakes up the VCM (by spoofing empty battery request heating)
Regards, Michael Am 04.02.25 um 02:00 schrieb Derek Caudwell via OvmsDev:
Hi Chris
I can't see any issue with setting the poll state to OFF if the charger state is either CHARGER_STATUS_IDLE or CHARGER_STATUS_PLUGGED_IN_TIMER_WAIT, particularly if the can bus goes to sleep in these states.
Kind regards Derek
On Tue, 4 Feb 2025 at 11:47, Chris Box via OvmsDev <ovmsdev@lists.openvehicles.com> wrote:
On 2025-02-03 07:34, Michael Balzer wrote:
This is the moment the vehicle state change was detected:
2025-02-02 21:08:14.372 GMT D (338493292) events: Signal(vehicle.charge.stop)
The event is emitted automatically by the vehicle framework when metric "v.c.charging" (ms_v_charge_inprogress) changes from true to false.
I don't know the Leaf code, but I think that should directly lead to a poller state change, but doesn't.
In vehicle_nissanleaf.cpp <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/master/vehicle/OVMS.V3/components/vehicle_nissanleaf/src/vehicle_nissanleaf.cpp> there are four places where we have "StandardMetrics.ms_v_charge_inprogress->SetValue(false);" They're all in the same switch statement block. Two of them also say "PollSetState(POLLSTATE_OFF);" These are CHARGER_STATUS_INTERRUPTED and CHARGER_STATUS_FINISHED. The two that don't set poll state are CHARGER_STATUS_IDLE and CHARGER_STATUS_PLUGGED_IN_TIMER_WAIT. For anyone that knows the Leaf code, does it seem reasonable to add PollSetState(POLLSTATE_OFF) to both of those? I note there's a mysterious comment "Separate from vehicle_nissanleaf_poll1() to make it clearer what is going on." but I can find no record of such a function in the current repo. Chris _______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-- Michael Balzer * Am Rahmen 5 * D-58313 Herdecke Fon 02330 9104094 * Handy 0176 20698926