mendhak/gpslogger

[Feature request] Send to multiple custom urls

Opened this issue ยท 4 comments

I'd like it if I could use more than one custom url.

I second this request, would be very nice. Thank you

@PedroKTFC @Kolia56
I've solved this problem setting the custom URL to my Node Red instance where I receive the data and send it to 2 different URLs (Traccar and DaWarich)

I assume you're running NodeRed in HA. How did you target, read and process the message in NR?

I assume you're running NodeRed in HA. How did you target, read and process the message in NR?

No, I have NodeRed running on a rented public VPS (actually it runs on almost every PC/raspberry/server I have! ๐Ÿ˜‚)
I've created an HTTP in node with a random gibberish URL used only by GPSlogger and with 2 functions I prepare the data for Traccar and Dawrich.

26-09-2024_19-25-43_5_Node-RED__GPS_โ€”_Mozilla_Firefox

The functions node are like this:

let newMsg = {};
newMsg.url = "http://172.20.0.45:5055/?id=" + msg.payload.id +
    "&lat=" + msg.payload.lat +
    "&lon=" + msg.payload.lon +
    "&time=" + msg.payload.time +
    "&speed=" + msg.payload.spd_kph +
    "&batt=" + msg.payload.batt +
    "&accuracy=" + msg.payload.acc +
    "&heading=" + msg.payload.dir +
    "&altitude=" + msg.payload.alt;
return newMsg;