Skip to content

Simple analog sensor that uploads it's values to a server, based on the WeMos D1 R1 (ESP8266)

Notifications You must be signed in to change notification settings

samverstraete/wifi-analog-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ESP8266 WiFi Analog Sensor

Simple analog sensor that uploads its values to a server, based on the WeMos D1 R1 (ESP8266)

Description

When first started, the device will host an access point with captive portal. Once connected, you can setup the connecting access point and password. When it connects to an access point, the self-access point should disappear, unless you are connected to it or there is a problem with connecting to the access point. The self-access point will not come up again until it reboots.

Main page

A series of samples are taken from the analog input. The time between samples (called the shot-time in source-code) can be defined in the settings page. The minimum, mean and maximum values are then saved in a frame. The number of times a frame is uploaded is also set in the config page, you can define the time between uploads in seconds.

Configuration page

The device will hold a number of frames in its buffer if the upload fails. This is also displayed on the main page. The number of frames is set to 500 with the ´BUFFER_SIZE´. Since the frames aren't necessarily uploaded in real-time, the frames also hold their time as millis since startup and when uploaded, the current millis since startup is transmitted too. This way the server can calculate the original time of a frame.

It has a possibility to set up an admin password; the username is fixed to "admin". This will limit access to the configuration page and the update page; however consider it minimal security only. It will not protect against malicious attacks.

There is a reset option through the reset button. When you press the reset button, when the led starts blinking, a reset window of about 10 seconds starts. If the button is pressed again during that time, the next time it boots, it will start in AP mode without any passwords for the WiFi and the admin-pages. It won't connect to the AP that has been set. After 10 minutes, it will try and connect to the known AP.

The HTTPUpdateServer has also been included for remote firmware updates.

Examples

An example PHP-script for the server side is included in the Server-directory.

Credits

Except for the standard ESP8266/Arduino libraries, these are used too:

License

"Creative Commons Attribution 3.0" license: http://creativecommons.org/licenses/by/3.0/

About

Simple analog sensor that uploads it's values to a server, based on the WeMos D1 R1 (ESP8266)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published