Check Status of sensor via api?

9 years 6 months ago #1368 by NightOne
Hi all,

Just stumbled across this project and am trying it out for my house temp monitoring needs.... so far so good, great work.
Having played with the virtual drivers for a week I have decided to build a garage door opener app using the ESP8266 relay as detailed in one post...and would appreciate some input?

The garage door in question has a "pulse" switch meaning there is no open/closed button there is just a switch that triggers a pulse... this tells the motor to move the door into the "other" state, as I have about 4 different ways of opening the door, when I add an ESP8266 relay to the door the relay has no idea if the door is open or closed at the time it can only "pulse" the door and change the state. I want to build a smart phone app for my phone that can simply send a post to the EasyIoT server .ie through the api ControlOn or ControlOff feature, but I want to app to show the "STATUS" of the door first. As far as I can see there is no way of getting the status of the module from the website without first creating a Control state change?

From the ESP8266 side I have decided that as well as a relay I am going to add a close loop switch to door in the open state, meaning that when the door is opened it will press against a Reed switch or Magnetic Contact switch (like in open widow contact) and I will be able to at least see when the garage is open.

I would like the smartphone to be able to read the Status to the door, (using the EasyIot server) then display an Open or Closed picture on the app with the status in text and then a button the says Open or Close (depending on prior status).

So my long winded questions is, can I get the status from the EasyIoT server with a get call to the api? or do I have to speak to the ESP8266 directly.

Also and optional question, when I open the garage door with other means e.g. remote or wall switch will the control status on the Easy Iot server also change (remeber the reed switch or Magnetic switch will change from open to closed)?

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1369 by cdj
Replied by cdj on topic Check Status of sensor via api?
Ok in the next days i've in program to end my gate opener and if you want i can share with you everything. My project needs two relay, photosensor to check if someone are in the middle, etc.etc.
And yes, i know how to send status to EasyIoT server to tell if gate (or garage door) is opened or not.

App for smartphone is very easy. Me too want to make a simple widget to call with api a button that made the rest.

On monday i suppose that i start again to work on it!
The following user(s) said Thank You: NightOne

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1374 by NightOne
Thank you, I will wait to see your project.... I am waiting for the ESP8266's to arrive from china as I have time :)

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1392 by EasyIoT
You can get sensor status on EasyIoT server. It uses web REST API. Check network calls in WEB browser.

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1396 by NightOne
Thanks, is there any way you could give an example?

like https://localhost/api/(something)? as I cant find where the rest page is, when I try anything other then ControlOn, ControlOff or ControlLevel I get a blank page.

Thanks again

Please Log in or Create an account to join the conversation.

9 years 6 months ago - 9 years 6 months ago #1412 by EasyIoT

NightOne wrote: Thanks, is there any way you could give an example?

like https://localhost/api/(something)? as I cant find where the rest page is, when I try anything other then ControlOn, ControlOff or ControlLevel I get a blank page.

Thanks again


REST api

Try:
http://localhost/Api/EasyIoT/Config/Module/List

Please Log in or Create an account to join the conversation.

Time to create page: 0.346 seconds

Forum latest

  • No posts to display.