Hello there,
ATM my TTN Application uses a HTTP integration to push position updates from the devices to a PHP script which translates them to OSMand and pushes it to port 5055. That works... kind of:
http://localhost:5055/?id=00168EDEF67C117D&altitude=398.75638971542&lat=47.666692594689&lon=9.0905540639492&hdop=1&speed=76.229019607843&bearing=302.11764705882×tamp=1595579977
http://localhost:5055/?id=00168EDEF67C117D&batteryStatus=1&ignition=1&battery=4.12&batteryLevel=100&batt=100×tamp=1595580089
I can see the position data in the Traccar frontend, but not the status data (like battery), but I can find them in the MySQL DB.
Now some friends and family want as well to use my TTN trackers, and I don't want to give them access to the MySQL DB. And I thought if I already have to code, I could do it the correct way. Now, what would be best?
- (ab)Using the OSMand protocol (or any other, better suited protocol?
- Using the API? This would be my preferred way, as I already create new devices over the API, which works just great. Unfortunately, I fear that position is read/get only in the API? I did not find a way to write/put positions.
- Implementing a new protocol, which seems to be an overkill.
BTW: Where can I find which default fields/attributes are accepted and viewed by Traccar and/or OSMand protocol? And which units they are in?
Thanks a lot for your thoughts and advices, Edi
You can find expected attributes in the decoder class. For example, battery should be "batt" or something like that.
Also, you should send all data as a single message.
Hi Anton,
Thank you for your fast answer. Well, the problem is, I can't send them in a single message, as they are not necessarily sent together. The status is sent every hour or on change of external power, the position is sent using smart beaconing or every 12 hours without external power...
Regards, Edi
I guess it should work either way. What is the problem though? All information you see in the database should be available in the web app as well.
For example, if you look at this screenshot: you see that I can plot battery, but in the Status, I don't see it...
Regards, Edi
That means that specific message you are looking at doesn't have that info.
OK, this I dont understand... or does that mean that in status only the infos from the last message are shown?
In the status you see the last message.
After experiments, I found out that in the status page, you see the last message with coordinates. Tanks!
Hello there,
ATM my TTN Application uses a HTTP integration to push position updates from the devices to a PHP script which translates them to OSMand and pushes it to port 5055. That works... kind of:
I can see the position data in the Traccar frontend, but not the status data (like battery), but I can find them in the MySQL DB.
Now some friends and family want as well to use my TTN trackers, and I don't want to give them access to the MySQL DB. And I thought if I already have to code, I could do it the correct way. Now, what would be best?
BTW: Where can I find which default fields/attributes are accepted and viewed by Traccar and/or OSMand protocol? And which units they are in?
Thanks a lot for your thoughts and advices, Edi