<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body 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><br class=""></div><div>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><br class=""></div><div>I have identified the following standard subtypes, and updated quite a few modules to use them:</div><div><br class=""></div><div><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><br class=""></div><div>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><br class=""></div><div>An example of it working is:</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# notify raise text info test hello</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Raise text notification for info/test as hello</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (25618) ovms-server-v2: Send MP-0 PIhello</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# config set notify test none</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Parameter has been set.</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# notify raise text info test hello</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Raise text notification for info/test as hello</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# config set notify test ovmsv2</span></font></div><div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Parameter has been set.</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class=""><br class=""></span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS# notify raise text info test hello</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Raise text notification for info/test as hello</span></font></div><div><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><br class=""></div><div><div>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>Regards, Mark.</div><div><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; color:rgba(0, 0, 0, 1.0);" 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; color:rgba(0, 0, 0, 1.0);" 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; color:rgba(0, 0, 0, 1.0);" 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; color:rgba(0, 0, 0, 1.0);" 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; color:rgba(0, 0, 0, 1.0);" 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=""></body></html>