[Ovmsdev] GPS theft alert

Michael Balzer dexter at expeedo.de
Sat Feb 13 06:12:56 HKT 2021

Am 12.02.21 um 23:02 schrieb Michael Balzer:
> Am 12.02.21 um 22:57 schrieb Michael Balzer:
>> Craig,
>> Am 12.02.21 um 22:42 schrieb Craig Leres:
>>> On 2/12/21 1:32 PM, Michael Balzer wrote:
>>>>> I also got a theft alert last night. Considering that I had never 
>>>>> seen this alert until a few weeks ago it feels like something has 
>>>>> changed. This includes the vehicle_cadillac_c2_cts which until a 
>>>>> few days ago was not updating 
>>>>> StandardMetrics.ms_v_env_on->SetValue() (which I believe maps to 
>>>>> v.e.on?) And looking at OvmsLocations::CheckTheft() it's not even 
>>>>> clear to me that a vehicle module that never sets ms_v_env_on can 
>>>>> even trigger an alert?!?!
>>>> The cadillac_c2_cts module did set ms_v_env_on before your recent 
>>>> change, the call is on line 113.
>>> I wasn't very clear here; after the first theft alert I saw around 
>>> the beginning the of month Steve suggested checking ms_v_env_on and 
>>> *then* I changed the module to manage the metric. So I believe at 
>>> that time of my first alert there was nothing in the cadillac_c2_cts 
>>> module itself that was ever changing ms_v_env_on.
>> According to the git log & git blame, the call on line 113 has been 
>> in the module unchanged since you initially added it (commit 
>> 4aaf421f9bfcbbd9e2db23f53ff0c7978e469887).
> Ah, sorry, just saw the #ifdef around the case… and your local build 
> also didn't set "notdef"?
> That's totally strange then.

Nonsense, sorry, it's late.

Of course the check in CheckTheft()…

   if (StandardMetrics.ms_v_env_on->AsBool()) return;

…will pass without setting ms_v_env_on, as the bool metric default is false.

So your vehicle essentially was "off" all the time, which lets me think 
the location module could have picked the persistent coordinates as the 
park coordinates on boot. I'll have a look at that tomorrow.


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20210212/94227921/attachment.sig>

More information about the OvmsDev mailing list