[Ovmsdev] Configuring notifations

Chris van der Meijden chris at arachnon.de
Mon Aug 31 18:25:32 HKT 2020


The vehicle.charge notifications are default on.

They are not shown when you check with

config list notify

I can add with

config set notify vehicle.charge ovmsv2

and then list again.

I also can remove with

config rm notify vehicle.charge

Is there a way known to remove the default vehicle.charge
notifications?

Thanx

Chris


Am Montag, den 31.08.2020, 16:11 +0800 schrieb Mark Webb-Johnson:
> From what I can see, the filtering is by subtype, on caller.
> In the case of ovms_server_v2, I see:
> 
> MyOvmsServerV2Reader = MyNotify.RegisterReader("ovmsv2",
> COMMAND_RESULT_NORMAL, std::bind(OvmsServerV2ReaderCallback, _1, _2),
>                                                    true,
> std::bind(OvmsServerV2ReaderFilterCallback, _1, _2));
> Which seems to enable filtering, and uses ‘ovmsv2’ as the caller.
> 
> 
> Then we have:
> 
> bool OvmsNotifyCallbackEntry::Accepts(OvmsNotifyType* type, const
> char* subtype, size_t size)
>   {
>   // Check size
>   if (size > m_verbosity)
>     return false;
>   // Check filter by config:
>   if (m_configfiltered)
>     {
>     std::string filter = MyConfig.GetParamValue("notify", subtype);
>     if (!filter.empty() && filter.find(m_caller) == string::npos)
>       return false;
>     }
>   // Check filter by callback:
>   if (m_filtercallback)
>     {
>     if (m_filtercallback(type, subtype) == false)
>       return false;
>     }
>   return true;
>   }
> 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.
> Regards, Mark.
> > On 30 Aug 2020, at 8:43 PM, Chris van der Meijden <chris at arachnon.d
> > e> wrote:
> > 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).
> > 
> > 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 vehicle.charge.start,
> > vehicle.charge.state and vehicle.charge.stop
> > 
> > I found this thread from 2018:
> >  http://lists.openvehicles.com/pipermail/ovmsdev/2018-May/004980.ht
> > ml
> > 
> > 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?
> > 
> > Thanx
> > 
> > Chris
> > 
> > _______________________________________________
> > OvmsDev mailing list
> > OvmsDev at lists.openvehicles.com
> > http://lists.openvehicles.com/mailman/listinfo/ovmsdev
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20200831/ac1645ca/attachment.htm>


More information about the OvmsDev mailing list