SenseCAP T1000 support

Joshua Dunham5 months ago

@axelT, yeah that totally works for me, and that would be awesome! I have an MQTT server, and I'll look into setting up a Geolocate or Elevate API account. Fingers crossed, they have a free option! ;)

axelT5 months ago

Here goes! There are 2 NodeRed flows:

SenseCAP to MQTT: will get MQTT messages from SenseCAP, process them and formats a "standard" payload which is sent to an MQTT server
https://codefile.io/f/moV93KgdTj

MQTT to Traccar: receives a "standard" payload and ads the postion to Traccar using the OsmAnd protocol. This flow is generic, there is nothing specific to SenseCAP in this flow so it can be reused. Lon, lat, id and timestamp must be defined in the payload, speed, batt, altitude and hdop are optional.
https://codefile.io/f/OdPDeRl343

A few notes:

  1. IMPORTANT: you have to create a device in Traccar with the device ID as the Node EUI in SenseCAP (in all caps)
  2. You will have to add some environment variables in Node Red:
    host: hostname of your Traccar server (eg. http://198.162.1.1)
    portOsmand: OsmAnd port for Traccar (eg. 5055)
    googleToken: your Google API key
  3. You will have to edit the MQTT related nodes to set:
    SenseCAP credentials
    SenseCAP organization ID (in the topic)
    Your MQTT server details (you can also change the topics if you want of course)
  4. When location is determined using WiFi access points, the "hdop" parameter is set to 1000 and sent to Traccar. This is not necessary, I use this information in another application that reads location data from Traccar so feel free to edit the flow accordingly if you have no need for this.
  5. There are a few inject nodes for testing. The WiFi MAC addresses are dummy ones, replace them with ones that are known by Google of you want to test (fun fact, the MAC addresses in the Google API example do not work.....). Also, as SenseCAP sends longitude and latitude in separate MQTT messages, there is an inject node for each. When testing, you have to inject both one after the other (in any order). You can add debug nodes where you need to, there are none in the flows.

Hope the above is clear, good luck and let me know if it works!

Joshua Dunham4 months ago

Thank you so much for your help @axelT. After a whole lot of messing around I ended up with a simpler Node-RED flow. I just did this
TTN MQTT - mqtt in
Parse for OsmAnd - formula (I borrowed a lot from your "Set URL" formula)
Create position in Traccar - http request
Debug - debug (so I can watch to make sure it works)

Now it works great to give Latitude/Longitude/Altitude/Battery. And I was able to get it into Home Assistant because it now works in Traccar!

axelT4 months ago

Hi! Glad it works! Indeed, my flow was a bit complex, mainly due to the SenseCAP's MQTT messages which are not ideal.
I take it you were able to get the T1000 working with TTN. Did you have to do anything special? I have not been able to get it to work properly.... Any tips welcome, thanks!

GPS-9114 months ago

There is PHP API sending data from things network to traccar https://www.reddit.com/r/Traccar/comments/e4lu6g/lora_gps_tracker_to_traccar/

Not sure if it still works.

axelT4 months ago

@GPS-911, were you able to get the T1000 to work with things network? I was unable to get it working on The Things Stack (neither Community nor Cloud). Did you have any issues? Thanks!

GPS-9114 months ago

I have no device, I ordered one and hopefully it should be delivered in week or two. I ordered dev kit from seed studio website.

I am very interested in Lora GPS tracker but idk how it's going to work in USA.

Joshua Dunham3 months ago

@axelT I did get it to work with TTN directly but I think that's because I have a TTN gateway in my house. I noticed that accessible TTN gateways are few and far between in my city. So I might migrate to Helium, since Helium gateways seem more plentiful where I am.

Joshua Dunham3 months ago

@axelT and now I'm having trouble with my node-red workflow because node-red says msg.url has been depricated. So now gotta learn what is supposed to replace that.

GPS-9113 months ago

I purchased the Wio Tracker 1110 Dev Board for testing with SenseCAP on the Helium network. Although it shows online in the SenseCAP app, it fails to display location data. How can I troubleshoot this issue without a gateway?

axelT3 months ago

@Joshua, which node is generating this error? The http request node? That would be very strange as the msg.url is the standard input. If you share some logs, might be able to help. Let me know!