9 posts / 0 new
Last post
jakekooser
MQTT location message

Hi all,

I am trying to use the OVMS location as an input to my home automation - i.e., if my car / OVMS is at the airport, I am definitely 'not home'. I was able to get the lat / long individually from the OVMS into node-red via subscribing to ovms/OVMS/JK4or2wo/metric/v/p/latitude and /longitude. The problem I am having is that I can't get it into a single string to give to Home Assistant as a location. I've tried templates and join nodes but haven't been able to get the right combination.

Am I missing the simple solution? Is it possible to poll the OVMS for the defined locations?

Thank you,

Jake

markwj
markwj's picture
Sounds like more of a Node

Sounds like more of a Node Red issue than OVMS (which simply send the individual metrics to MQTT). If you want to merge them in some custom way, I think it should be done in the MQTT client side.

This approach sounds correct for what you need:
https://cookbook.nodered.org/basic/join-streams

The locations system in OVMS is not published to metrics, so won't show in MQTT.

klauvi
klauvi's picture
From Home Assistant

Try this, should lead you in the right direction

https://community.home-assistant.io/t/how-to-create-a-custom-device-tracker-from-gps-coordinates/142971

jakekooser
I was able to make some

I was able to make some progress with that, thank you.  

 

Jake

dexter
dexter's picture
MQTT location message

I added the OVMS location name to the metrics some weeks ago: https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/9ab6b6b852b05f09f3b9e94b66778ded0d9276b6

Regards,
Michael

jakekooser
It doesn't recognize that. I
It doesn't recognize that.  I am running Firmware: 3.2.015/ota_0/eap (build idf v3.3.2-881-g22d636b Sep 2 2020 08:21:02) and this is what I get.

OVMS# metrics list v.p.location
Unrecognised metric name

 

Jake

dexter
dexter's picture
MQTT location message

3.2.015 is the last major release. We'll probably soon release 3.2.016, but if you want to test / use the latest "cutting edge" features, you need to update from the "edge" release. See the "edge" change log / version info for details:

  • https://ovms.dexters-web.de/firmware/ota/v3.1/edge/

 

jakekooser
That did it! Thank you.
That did it!  Thank you.

OVMS# metrics list v.p.location
v.p.location                             Global HQ
smetana.przemys...
Hi!

Hi!
I have a problem connecting to the server. During the night standstill, OVMS loses connection with the server and does not reconnect. Could the reason be that the battery voltage has dropped to 12.1 V? After restarting OVMS everything returns to normal.

Log in or register to post comments
randomness