<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">The modifications below have been implemented. Works for me on the bench.</div><div class=""><br class=""></div><div class="">Individual vehicle modules can turn this off (it defaults to on) by setting m_autonotifications=false in their constructor. Implementations can also override the individual Notify…() functions to disable particular notifications, or customise the output. For example, a Tesla Model S module may want to override NotifyValetHood() and send the alert as ‘frunk’ rather than ‘hood’.</div><div class=""><br class=""></div><div class="">For those testing this with individual vehicle support, you should be able to see the following standardised vehicle alerts now:</div><div class=""><br class=""></div><div class=""><div class=""><ul class="MailOutline"><li class="">charge.started (a charge session has started)</li><li class="">heating.started (the battery is being heated, as part of a charge session)</li><li class="">charge.stopped (a charge session has been interrupted)</li><li class="">charge.done (a charge session has completed normally)</li><li class="">valet.enabled (valet mode has been enabled)</li><li class="">valet.disabled (valet mode has been disabled)</li><li class="">valet.hood (the vehicle hood has been opened, while in valet mode)</li><li class="">valet.trunk (the vehicle trunk has been opened, while in valet mode)</li><li class="">alarm.sounding (the vehicle alarm is sounding)</li><li class="">alarm.stopped (the vehicle alarm has stopped)</li><li class="">batt.12v.alert (the 12v battery is at a critically low voltage level)</li><li class="">batt.12v.recovered (the 12v battery voltage level has recovered)</li></ul></div></div><div class=""><br class=""></div><div class="">I’ll be updating the user guide documentation now, as there are quite a lot of configuration options for this now. Should finish by tomorrow.</div><div class=""><br class=""></div><div class="">I think we’re about ready for 3.1.006 now? I need to test Michael’s new initial config system, but that code is in place so should be good to go.</div><div class=""><br class=""></div><div class="">Perhaps people can commit what they have this week, and we will build a 3.1.006 OTA release at the weekend?</div><div class=""><br class=""></div><div class="">As always, comments/suggestions/improvements welcome.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><blockquote type="cite" class="">It is time to implement vehicle notifications (charge started, charge completed, charge interrupted, etc) in the vehicle modules I am supporting. It seems that this can be done in the vehicle.{h,cpp} framework in a standard manner, and work across all vehicle types. However, I guess that will break any notifications already being produced by other vehicle types.<div class=""><br class=""></div><div class="">My suggestion is:</div><div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">A config parameter ‘notifications’, with individual instances to turn on/off the notifications. Default is all enabled.<br class=""><br class=""></li><li class="">OvmsVehicle::MetricModified picks up metric changes and issues the standard notifications (checking ‘notifications’ parameter appropriately).</li><ul class=""><li class="">charge_mode=>charging: Notify charge started</li><li class="">charge_mode=>topoff: Notify charge started</li><li class="">charge_mode=>heating: Notify battery heating started</li><li class="">charge_mode=>done: Notify charge completed</li><li class="">charge_mode=>stopped: Notify charge interrupted</li><li class="">valet_mode=>on: Notify valet mode enabled</li><li class="">valet_mode=>off: Notify valet mode disabled</li><li class="">alarm=>on: Notify alarm is sounding</li><li class="">alarm=>off: Notify alarm is off<br class=""><br class=""></li></ul><li class="">All the above should be suppressed for the initial setting of each parameter. I will have to look into metrics to see how best that should be done; one neat way is to keep a modification count (rather than the current m_defined boolean).</li></ol></div><div class=""><br class=""></div><div class="">Does that make sense? Any objections/suggestions?</div><div class=""><br class=""></div><div class="">Regards, Mark</div></blockquote></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 9 May 2018, at 9:33 AM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’ve extended the notifications framework to include the concept of notification subtypes. This is in addition to the existing notification base types.<br class=""><div class=""><br class=""></div><div class="">This allows us to automatically filter notifications based on the granular subtypes. The filtering is done at the framework level, so all notification listeners need to do is turn it on (when they register).</div><div class=""><br class=""></div><div class="">I have identified the following standard subtypes, and updated quite a few modules to use them:</div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">charge.stopped</li><li class="">charge.state</li><li class="">batt.alert</li><li class="">batt.12v (seems similar to batt.alert, but not yet decided)</li><li class="">homelink</li><li class="">debug.crash</li><li class="">xks.aux</li><li class="">xrt.battmon</li><li class="">xrt.power</li><li class="">xrt.gps</li><li class="">xrt.trip</li><li class="">xrt.sevcon</li><li class="">xrt.logs</li><li class="">xrt.reset</li></ul></div><div class=""><br class=""></div><div class="">I would really rather have all the alert types standardised (including things like trip logs, gps tracking, etc) and working across all vehicle types. But this at least is a starting point.</div><div class=""><br class=""></div><div class="">An example of it working is:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# notify raise text info test hello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Raise text notification for info/test as hello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (25618) ovms-server-v2: Send MP-0 PIhello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# config set notify test none</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Parameter has been set.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# notify raise text info test hello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Raise text notification for info/test as hello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# config set notify test ovmsv2</span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Parameter has been set.</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# notify raise text info test hello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Raise text notification for info/test as hello</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (71368) ovms-server-v2: Send MP-0 PIhello</span></font></div></div></div></div></div></blockquote><div class=""><br class=""></div><div class=""><div class="">I am working on the vehicle module automated alerts we previously discussed, and this is a pre-requisite. New standardised subtypes will come with that (such as charge.start, charge.done, etc).</div><div class=""><br class=""></div></div><div class="">Regards, Mark.</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">GitHub <<a href="mailto:noreply@github.com" class="">noreply@github.com</a>><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">[openvehicles/Open-Vehicle-Monitoring-System-3] 7516c9: test framework commands for testing can bus tx/rx</b><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">9 May 2018 at 9:18:53 AM HKT<br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Reply-To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">GitHub <<a href="mailto:noreply@github.com" class="">noreply@github.com</a>><br class=""></span></div><br class=""><div class=""><div class=""> Branch: refs/heads/master<br class=""> Home: <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3" class="">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3</a><br class=""> Commit: 7516c9681055ec7986a94ccb8cfb29bda5f1bce8<br class=""> <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/7516c9681055ec7986a94ccb8cfb29bda5f1bce8" class="">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/7516c9681055ec7986a94ccb8cfb29bda5f1bce8</a><br class=""> Author: Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>><br class=""> Date: 2018-05-09 (Wed, 09 May 2018)<br class=""><br class=""> Changed paths:<br class=""> M vehicle/OVMS.V3/main/test_framework.cpp<br class=""><br class=""> Log Message:<br class=""> -----------<br class=""> test framework commands for testing can bus tx/rx<br class=""><br class=""><br class=""> Commit: 183d26dc107bb21cd956776228d0a24030b115db<br class=""> <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/183d26dc107bb21cd956776228d0a24030b115db" class="">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/183d26dc107bb21cd956776228d0a24030b115db</a><br class=""> Author: Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>><br class=""> Date: 2018-05-09 (Wed, 09 May 2018)<br class=""><br class=""> Changed paths:<br class=""> M vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp<br class=""> M vehicle/OVMS.V3/components/ovms_server_v3/src/ovms_server_v3.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle/vehicle.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle_kiasoulev/src/vehicle_kiasoulev.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle_renaulttwizy/src/rt_battmon.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle_renaulttwizy/src/rt_notify.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle_renaulttwizy/src/rt_sevcon.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle_renaulttwizy/src/rt_sevcon_faults.cpp<br class=""> M vehicle/OVMS.V3/components/vehicle_renaulttwizy/src/vehicle_renaulttwizy.cpp<br class=""> M vehicle/OVMS.V3/main/ovms_boot.cpp<br class=""> M vehicle/OVMS.V3/main/ovms_notify.cpp<br class=""> M vehicle/OVMS.V3/main/ovms_notify.h<br class=""><br class=""> Log Message:<br class=""> -----------<br class=""> Notifications: Framework extensions to add support for subtypes on notifications, and automatic filtering by subtype and distribution mechanism<br class=""><br class=""><br class="">Compare: <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/compare/57d8f1b449d6...183d26dc107b" class="">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/compare/57d8f1b449d6...183d26dc107b</a><br class=""> **NOTE:** This service been marked for deprecation: <a href="https://developer.github.com/changes/2018-04-25-github-services-deprecation/" class="">https://developer.github.com/changes/2018-04-25-github-services-deprecation/</a><br class=""><br class=""> Functionality will be removed from <a href="http://github.com/" class="">GitHub.com</a> on January 31st, 2019.<br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>