Hi,
I have sometimes issues with the module (been in use 2+ years) that it hangs sometimes and I have to power cycle it manually. I though then that, instead of having to crawl and dig through the insides of my 2016 Leaf I could maybe call a reset once a day at midnight or so, using home assistant Restful api for example.
I can use the API for getting info (like status or so) but I don't seem to be able to figure out a way to request a module reset like I can on the shell at https://dexters-web.de/.
Has anyone an idea on how to achieve this? I'd really love to be able to stabilise this a bit. I use MQTT and V2, and I am open to suggestions.
To do this remotely, just issue "module reset" via the V2/V3 connection or locally via the web API.
→ https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/624
→ https://docs.openvehicles.com/en/latest/components/ovms_webserver/docs/index.html#authorization
To do this locally, put that command in an event script on e.g. "clock.0000" or whatever suits you.
→ https://docs.openvehicles.com/en/latest/userguide/scripting.html#command-scripts
→ https://docs.openvehicles.com/en/latest/userguide/events.html#standard-events
Well, I did try with https://ovms.dexters-web.de:6869/api/reset/ (after setting the cookie etc) but all I got back was a "404 not yet implemented".
Statuses requests work fine though.
I can give it a try with the local scripts and see if it solves the problem.
There is no "/api/reset", and you cannot yet send commands through the V2 server's HTTP API. You need to use the TCP API or the module's local HTTP API, or (on my server) the dexters-web stateless HTTP API.
Template using my stateless HTTP API:
This is great! Was looking to ask exactly the same :) Thanks!