I have a temperature sensor that sends info over Lora to TTN. Everything works fine here.
I have been able to get this data to my own server, by using MQTT and node red. everything works fine here as well.
But now I also want to display this data (just one temperature), on a webpage that we host (from one.com). This is a webpage uses something called “web builder” (not wordpress).
This is where I run into problems, and desperately need helps!
I am a HW-guy, so I have made all the HW, so now when it comes to these hig level language am I quite lost.
But how to I fetch the data from TTN?
I have tried to enable “Storage Integration” and get data by the GET-command, But I can’t get that to work.
I have function there with this code:
msg.method = “post”;
msg.payload = `-X ‘GET’ \
-H ‘Accept: text/event-stream’ \
-d ‘limit=10’ \
-d ‘after=2022-05-01T00:00:00Z’ \
-H ‘content-type: application/json’ \
-H ‘Authorization: Bearer NNSXS.xxx’ `;
msg.headers = null;
msg.cookies = null;
Then this is sent to a HTTP-request.
But as I mention above, doesn’t it work (get back code 12).
Any suggestions on how I should solve this problem?
I thought it wouldn’t be that difficult to display one small message on a web-page.
Can also mention that I have search in the forum, documentation and google for a couple of days, without solve it. Usually my stubbornness helps my solve it in a while, but now google starts to run out on pages…