[Ovmsdev] App notification help

Michael Balzer dexter at expeedo.de
Thu Aug 6 00:54:58 HKT 2020


Derek,

the "stat" command & notification text (created by
OvmsVehicle::CommandStat()), depends on the chargeport door status. If
the chargeport is closed, it sends "Not charging".

The server v2 code OTOH simply transmits the charge state metric
directly and independantly of the charge poort status.

So if your CAN processing detects a charge start, it should basically
also set the charge port door state to "open" (true). Or, if you need
some delay to e.g. validate the charge state or wait for the door state,
you can force that by overriding the
OvmsVehicle::GetNotifyChargeStateDelay() method in your vehicle.

Or, if you'd rather customize the command / notification text, override
OvmsVehicle::CommandStat().

Or, if you'd rather take full control of these notifications, set
m_autonotifications to false and add your own metrics listeners (see
OvmsVehicle::MetricModified() for the standard handling).

Regards,
Michael


Am 05.08.20 um 09:36 schrieb Derek Caudwell:
> Any help appreciated to understand why App alerts are being sent with different information to that in the MP-0 message. I assume it is being triggered earlier and then delayed for some reason? 
> 2020-08-05 18:25:08 NZST I (325841) ovms-server-v3: Tx event vehicle.charge.start
> 2020-08-05 18:25:08 NZST I (325861) ovms-server-v3: Tx event vehicle.charge.state
> 2020-08-05 18:25:08 NZST I (325891) ovms-server-v3: Tx event vehicle.charge.mode
> 2020-08-05 18:25:08 NZST I (326031) webserver: HTTP POST /api/execute
> 2020-08-05 18:25:08 NZST I (326051) webserver: HTTP POST /api/execute
> 2020-08-05 18:25:08 NZST I (326071) webserver: HTTP POST /api/execute
> 2020-08-05 18:25:08 NZST I (326091) webcommand: HttpCommandStream[0x3f89a4bc]: 3601112 bytes free, executing: stat
> /2020-08-05 18:25:08 NZST I (326101) ovms-server-v2: Send MP-0
> S62.0,K,371,0,charging,standard,132,101,16,1,0,0,3,1,0,0,0,0,65.44,0,0,0,80,-1,0,0,0,0,0,164,0,-0.51,511.50,82/
> 2020-08-05 18:25:08 NZST I (326131) ovms-server-v2: Send MP-0 D80,8,4,12.5,0,16,0,447560,0,325,12.5,1,1,1,12.17,0,12.5,0,0,0,16
> 2020-08-05 18:25:08 NZST I (326091) webcommand: HttpCommandStream[0x3f895bf4]: 3598540 bytes free, executing: stat
> 2020-08-05 18:25:08 NZST I (326091) webcommand: HttpCommandStream[0x3f89a3f4]: 3600896 bytes free, executing: stat
> /2020-08-05 18:25:10 NZST I (328121) ovms-server-v2: Send MP-0 PINot
> charging|SOC: 62.0%|Ideal range: 132km|Est. range: 102km|ODO:
> 44756.0km|CAC: 65.4Ah|SOH: 82%/
> 2020-08-05 18:25:10 NZST I (328131) ovms-server-v3: Tx notify ovms/nismo/notify/info/charge.started=Not charging|SOC: 62.0%|Ideal range: 132km|Est. range: 102km|ODO: 44756.0km|CAC: 65.4Ah|SOH: 82%
> 2020-08-05 18:25:10 NZST I (328191) ovms-server-v3: Tx event notify.info.charge.started
> 2020-08-05 18:25:11 NZST I (328301) ovms-server-v3: Message publishing acknowledged (msg_id: 216)
> 2020-08-05 18:25:11 NZST I (329151) ovms-server-v3: Tx event vehicle.charge.pilot.on
> 2020-08-05 18:25:11 NZST I (329171) ovms-server-v3: Tx event vehicle.charge.prepare
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20200805/ce1188ac/attachment.htm>


More information about the OvmsDev mailing list