[Ovmsdev] Basic OVMS concepts

Michael Balzer dexter at expeedo.de
Mon Jun 10 15:48:20 HKT 2019


Craig,

see comments in "main/metrics_standard.h" on their meanings & usage, i.e.

    OvmsMetricBool*   ms_v_env_awake;               // Vehicle/bus awake (switched on)
    OvmsMetricBool*   ms_v_env_on;                  // "Ignition" state (drivable)

Minimal support doesn't need any metric to be set by the vehicle (see TRACK vehicle).

Sleep support hasn't been implemented yet. The "on" metric is only used to enable server V2 GPS streaming.

If your car provides standard OBD2 PIDs you might try beginning with a copy of the OBD2 vehicle.

Regarding monitoring and decoding your process data frames on the bus, use the RE tools.
A first web UI for the RE tools is in the "retools/web" directory, install it as a plugin.

Regards,
Michael


Am 09.06.19 um 04:39 schrieb Craig Leres:
> After a long period of procrastination it's time for me to get a OVMS module working in my Cadillac. If I can get it to the point where it doesn't kill the
> battery and lets me see where the car is it'll be about as usable as my free onstar account and I'll be able to kill that off.
>
> The last time I worked on it I was able to decode/display/store the vin. I thought I had figured out the car awake messages but a capture I made today makes
> me doubt I have that correct. Either way I don't think I understand what it is I need.
>
> I assume when the vehicle is "off" the ovms module wakes up periodically to check location, upload current status. And when the vehicle is "on" it stays
> booted. And this driven by some metrics?  Looking at other vehicles I was using:
>
>     StdMetrics.ms_v_env_on->SetValue();
>     StdMetrics.ms_v_env_awake->SetValue();
>
> But I'm not sure what events should set/clear these. I'm used to thinking of a car being a few different states:
>
>     off
>     accessories on
>     engine on
>     engine running
>
> So I guess "awake" is when something wakes up the bus (e.g. door unlock, key fob press, door open, etc.) and everybody starts sending their "I'm here"
> messages for awhile and if nothing else happens they go back to sleep. I see logic for this in vehicle_nissanleaf.cpp (awake on certain can ids, asleep from a
> 1 second watchdog if StandardMetrics.ms_v_env_awake->IsStale())
>
> Still looking at the leaf (which doesn't have an engine) StdMetrics.ms_v_env_on seems to indicate the car can be driven.  Does that map to the engine running
> for a gas engine car?  I also see logic in the mitsubishi but it's not obvious if the transition is accessories on or engine on.
>
> Are there other metrics I need to manage for miminal support?
>
> One of the things I was hoping to do with the Cadillac was capture the frames that onstar sends to the navigation head unit when you use the "send to in-dash
> navigation" feature of the onstar app. But the list of things you can do with the free onstar account has constantly gotten shorter over the last few years
> and it appears they've killed off this feature in the last month or so. Too bad because this would have been a neat feature to add to ovms.
>
> While I'm here...
>
> The J1850 tools I've built up are not at all helpful with canbus; but I have a raspberrypi 2 that isn't doing anything and I believe I can use it to get
> wireshark going with a skpang.co.uk "PiCAN2 CAN-Bus Board" so I ordered one. Speaking of wireshark and canbus, this video shows an interesting product:
>
>     https://youtu.be/xZNszFTaP0A
>
> it has a mode that has a billboard which shows which can ids have been changing with lots of neat options like hiding and highlighting recently changed
> octets. I suspect it won't be difficult to write something with similar functionality. But I think my id mapping will go a lot faster if I can do things while
> watching a display.
>
>         Craig
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

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





More information about the OvmsDev mailing list