3 posts / 0 new
Last post
juanheredia
Server V3 (MQTT) Update intervals

I was wondering if it's possible to change the MQTT update intervals programatically. If I am on the road I'd like to send data frecuently (every minute) and when I'm home every 10 minutes as is is by defautl. 

BTW: In the update interval configuration what is the meaning of Connected and Iddle? Is connected used when I'm using the app or conected via the web browser?

 

Thanks in advance.  

markwj
markwj's picture
At the moment, the v3

At the moment, the v3 protocol is very experimental and basic. It is configured with two update interval metrics - one for normal, and one for when clients are connected. These are in the config and cannot be changed dynamically.

The client connections are tracked via postings to  <topic_prefix>/client/+/active (where + is replaced with some unique identifier for the client. The clients should post a simple message to that topic when connected, and set a last-will-testament to clear it.

klauvi
klauvi's picture
More details

http://lists.openvehicles.com/pipermail/ovmsdev/2018-July/005297.html

According to this, you send the message 1 to connect and 0 to disconnect. That way you could set your connected interval to 60 and keep idle at 600. When you're on the road, you can send the activate message and you will have your 60 second update interval.

I don't know if that connection persists or if you need to send a ping to keep it alive, I haven't tested it.

Log in or register to post comments
randomness