[Ovmsdev] Simple TCP client
leres at xse.com
Tue Aug 25 01:41:34 HKT 2020
On 2020-08-24 09:01, Soko wrote:
> Before I decide how to do this I would like to explore the other way: My
> home automation is polling the data from OVMS.
> I have had a look to the HTTP API. But it seems this is an API for the
> server on the internet and not for OVMS itself, correct?
> Next option: My home automation does a simple HTTP-GET to OVMS and reads
> data like this.
> Is there a way to read metrics like this?
> I have found the config->webserver site. I could point it to an own dir
> like /store/data. Now I could write/update one file there from my
> vehicle-module called "current" with all the data I need. Then simply to
> a http-get to 192.168.4.1/current and I get the data of the file. Is it
> easy - and most important: allowed - to write/update into a file in OVMS.
I think I see another way for you to do this. Your original ask was:
On 2020-08-23 09:00, Soko wrote:
> I have my own home automation running at home. I want to push the
> current values (SoC, odometer, ...) once my car is in the driveway and
> OVMS is booked into my WiFi. My home automation has a TCP server running
> were I process the data further.
This might help, here's what I'm doing.
I setup a mqtt server on a public server (I found mosquitto easy to
setup and use). I configured my modules to talk to it using the V3
server settings. At this point my vehicle metrics are available via the
Next I wrote a persistent daemon using the python paho-mqtt module. It
subscribes to some vehicle metrics and posts nagios passive results.
I've attached a screen grab of the current state of one of my cars.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 48586 bytes
Desc: not available
More information about the OvmsDev