Sunday, July 17, 2022
HomeWordPress Developmentajax - Add information from climate station to Wordpress Web site

ajax – Add information from climate station to WordPress Web site


I’ve constructed a climate station based mostly on a Rasperry Pi. The climate information must be despatched to a WordPress web site in common intervals (about each 5 to 10 seconds). There the info must be displayed in a graphical interface. My plan was to create an additional web page the place solely the climate information is proven in JSON format:

{"timestamp": 1657989715, "windspeed": 10, "winddirection": 130, "temperature": 30, "strain": 1012.4}

The graphical person interface ought to then get its information from this separate web page utilizing AJAX and the getJSON command.

My questions:
How do I create a web page in WordPress that shows solely the JSON information (e.g. like right here: https://api.myip.com/)?
And the way can I replace this JSON information usually?
Or is there perhaps a greater resolution to this drawback?

Thanks a lot!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments