REST call to get sensor status

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

REST call to get sensor status

#1 Post by garnold » 03 Feb 2021, 22:21

I've played around with the Commands calls to access the GPIO Pins. Very cool stuff! I can control an LED and a servo with simple REST calls which is great! Is there also an endpoint to get access to the current status of a sensor? Can I make a call and get the Temp and Hum of the connected DHT22?

I read some place here that you can upload custom pages that can be called. I can't find the thread but that might also be an option. The request was to be able to make a call and get back information from a sensor which is basically what I want to do but again, can't find the post :-(

TD-er
Core team member
Posts: 8846
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: REST call to get sensor status

#2 Post by TD-er » 03 Feb 2021, 22:53

The documentation for using a dashboard is mainly documented on the wiki: https://www.letscontrolit.com/wiki/inde ... _Dashboard

You can also make something yourself based on JSON.
See: https://espeasy.readthedocs.io/en/lates ... html?#json

garnold
Normal user
Posts: 93
Joined: 17 Jun 2019, 03:59

Re: REST call to get sensor status

#3 Post by garnold » 04 Feb 2021, 15:07

Excellent, I think the JSON option will be perfect but I can also use the dashboard info to craft something of my own if needed. The dashboard info is exactly what I was looking for with regards to a custom page. So glad you linked it because it was driving me crazy I could not find this info again! Have a great day!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests