Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Send to multiple custom urls #1114

Open
PedroKTFC opened this issue Jan 7, 2024 · 4 comments
Open

[Feature request] Send to multiple custom urls #1114

PedroKTFC opened this issue Jan 7, 2024 · 4 comments

Comments

@PedroKTFC
Copy link

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

@PedroKTFC PedroKTFC changed the title Send to multiple custom urls [Feature request] Send to multiple custom urls Jan 7, 2024
@Kolia56
Copy link

Kolia56 commented Jan 9, 2024

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

@andreapx
Copy link

@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)

@PedroKTFC
Copy link
Author

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

@andreapx
Copy link

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants