owntracks / talk

Questions, talk about OwnTracks
32 stars 4 forks source link

Question about 'conn' element in message json #67

Closed vigevenoj closed 5 years ago

vigevenoj commented 5 years ago

Hi, I'm writing up a bit of code to translate location update messages from a SPOT beacon (documentation at https://faq.findmespot.com/index.php?action=showEntry&data=69 ) to OwnTracks messages, and I wondered if the conn parameter in the json message can be any character or if there is a limitation to only 'w', 'o', and 'm' as documented in https://owntracks.org/booklet/tech/json/#topics . I'd like to use 's' (for either "spot" or "satellite") for my case unless it will cause problems with existing applications, in which case I would use 'm', or leave it out of the message and infer based on the topic name that it came from a satellite tracking device.

If it helps clarify, in my program I'm mapping a Spot device to a topic of the form owntracks/user/${spot-device-name}, getting the latest messages from the device from Spot's API, comparing their timestamps to that of the latest published message on the topic, and if newer, publishing the messages onto the topic. I'm consuming the resulting Owntracks messages in a variety of ways (HomeAssistant, phone apps, and some other services I've written)

jpmens commented 5 years ago

conn can basically be any character; I’m not aware of any app that actually checks it. It was originally intended for human consumption in debugging.

jpmens commented 5 years ago

If you publish your application publicly with its documentation, I’d entertain a small PR to the booklet adding your ‘s’ to the conn “registry”. :-)

vigevenoj commented 5 years ago

Thanks for the context and the PR suggestion. I'll keep that in mind.