<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body><div>Found the subtypes in the vehicle.cpp.</div><div><br></div><div>Thanks a lot!</div><div><br></div><div>Chris</div><div><br></div><div>Am Montag, den 31.08.2020, 14:19 +0200 schrieb Michael Balzer:</div><blockquote type="cite">
The logic is currently defined as…<br>
<br>
<tt> std::string filter = MyConfig.GetParamValue("notify",
subtype);</tt><tt><br>
</tt><tt> if (!filter.empty() && filter.find(m_caller) ==
string::npos)</tt><tt><br>
</tt><tt> return false;</tt><br>
<br>
So you need to define the config param to be non-empty, but without
containing "ovmsv2".<br>
<br>
The parameter is also named after the notification subtype. See the
Notify…() calls for the subtypes currently in use.<br>
<br>
So to disable all notifications for charge start, state and stop
events, do:<br>
<br>
<tt>config set notify charge.started -</tt><br>
<tt>config set notify charge.stopped -</tt><br>
<tt>config set notify charge.done -</tt><br>
<tt>config set notify heating.started -</tt><br>
<br>
…that should cover all of these notifications.<br>
<br>
I think it would be good to extend the config logic, to allow
excluding single channel tags. For example, "<tt>*,-ovmsv2</tt>"
could mean "all but ovmsv2". I'll do that after office.<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="moz-cite-prefix">Am 31.08.20 um 12:25 schrieb Chris van
der Meijden:<br>
</div>
<blockquote type="cite" cite="mid:1598869532.2946.4.camel@arachnon.de">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div>
<div>The vehicle.charge notifications are default on.</div>
<div><br>
</div>
<div>They are not shown when you check with</div>
<div><br>
</div>
<div>config list notify</div>
<div><br>
</div>
<div>I can add with</div>
<div><br>
</div>
<div>config set notify vehicle.charge ovmsv2</div>
<div><br>
</div>
<div>and then list again.</div>
<div><br>
</div>
<div>I also can remove with</div>
<div><br>
</div>
<div>config rm notify vehicle.charge</div>
<div><br>
</div>
<div>Is there a way known to remove the default vehicle.charge
notifications?</div>
<div><br>
</div>
<div>Thanx</div>
<div><br>
</div>
<div>Chris</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>Am Montag, den 31.08.2020, 16:11 +0800 schrieb Mark
Webb-Johnson:</div>
<blockquote type="cite">From what I can see, the filtering is by
subtype, on caller.
<div class=""><br class="">
</div>
<div class="">In the case of ovms_server_v2, I see:</div>
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;" class="">
<div class="">
<div class="">MyOvmsServerV2Reader =
MyNotify.RegisterReader("ovmsv2", COMMAND_RESULT_NORMAL,
std::bind(OvmsServerV2ReaderCallback, _1, _2),</div>
<div class="">
true, std::bind(OvmsServerV2ReaderFilterCallback, _1,
_2));</div>
</div>
</blockquote>
<div class="">
<div><br class="">
</div>
<div>Which seems to enable filtering, and uses ‘ovmsv2’ as the
caller.</div>
<div><br class="">
</div>
</div>
<div>Then we have:</div>
<div><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;" class="">
<div class="">
<div>
<div>bool OvmsNotifyCallbackEntry::Accepts(OvmsNotifyType*
type, const char* subtype, size_t size)</div>
<div> {</div>
<div> // Check size</div>
<div> if (size > m_verbosity)</div>
<div> return false;</div>
<div> // Check filter by config:</div>
<div> if (m_configfiltered)</div>
<div> {</div>
<div> std::string filter =
MyConfig.GetParamValue("notify", subtype);</div>
<div> if (!filter.empty() &&
filter.find(m_caller) == string::npos)</div>
<div> return false;</div>
<div> }</div>
<div> // Check filter by callback:</div>
<div> if (m_filtercallback)</div>
<div> {</div>
<div> if (m_filtercallback(type, subtype) == false)</div>
<div> return false;</div>
<div> }</div>
<div> return true;</div>
<div> }</div>
</div>
</div>
</blockquote>
<div class="">
<div><br class="">
</div>
<div>So I’m guessing ‘config set notify vehicle.charge
ovmsv2’? Or is that filter out, so needs to list the
notifications that it will accept? First time I’ve noticed
this, and can’t even remember us having this facility.</div>
<div><br class="">
</div>
<div>Regards, Mark.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 30 Aug 2020, at 8:43 PM, Chris van der
Meijden <<a href="mailto:chris@arachnon.de" class="" moz-do-not-send="true">chris@arachnon.de</a>>
wrote:</div>
<div class="">
<div class="">
<div class="">I just finished the implementation of
the "charging detection" for the komfort-can VW
e-Up. Works like charm :-) (Msg ID 0x61C, d2. No
Ampere and Volt yet).</div>
<div class=""><br class="">
</div>
<div class="">Because I have email notifications
activated I now receive mails when I start or end
charging. For me it is enough to see the charging in
the app and I would like to configure the
notifications to not sent me messages on <span style="font-family: sans-serif; font-size:
14.7323px;" class="">vehicle.charge.start, </span><span style="font-family: sans-serif; font-size:
14.7323px;" class="">vehicle.charge.state and </span><span style="font-family: sans-serif; font-size:
14.7323px;" class="">vehicle.charge.stop</span></div>
<div class=""><br class="">
</div>
<div class="">I found this thread from 2018:</div>
<div class=""> <a href="http://lists.openvehicles.com/pipermail/ovmsdev/2018-May/004980.html" class="" moz-do-not-send="true">http://lists.openvehicles.com/pipermail/ovmsdev/2018-May/004980.html</a></div>
<div class=""><br class="">
</div>
<div class="">and I found the "Notification filtering"
and "Event filtering" under Config ->
Notifications, but I did not see a way to disable an
specific notification. Or just do not understand
how. Am I overlooking something?</div>
<div class=""><br class="">
</div>
<div class="">Thanx</div>
<div class=""><br class="">
</div>
<div class="">Chris</div>
<div class=""><br class="">
</div>
</div>
_______________________________________________<br class="">
OvmsDev mailing list<br class="">
<a href="mailto:OvmsDev@lists.openvehicles.com" class="" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a><br class="">
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre>_______________________________________________
OvmsDev mailing list
<a href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre></blockquote></body></html>