Skip to content

huntlyc/espruino-wifi-plant-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Espruino WIFI Plant Monitoring System

Using the Espruino WIFI chip to log soil moisture and ambient temperature.

Required components/Shopping list:

Basic Setup

There are only 2 sensors in this project, both share the ground rail. The temperature sensor takes its power from the 3.3v rail, but the soil moisture sensor takes its power from the B9 pin which is turned on for one second before taking the reading and then turned off. This is to conserve the sensor as keeping it on corrodes the sensor.

Soil Sensor

  • VCC - straight to pin B9
  • GND - Ground rail
  • DO - not used
  • AO - straight to pin B0

Temperature Sensor

With the rounded side facing away from left to right:

  • 0 - Ground rail
  • 1 - pin B1
  • 2 - 3.3v rail

Note: You need to put the 4.7K resistor between pins 1 & 2 (data and power)

Espruino network configuration

The server endpoint details and token details are in a "module". This is to allow any configuration updates (WiFi, or endpoint) to not be tracked by git. The configuration file is modules/projectConfig.js. Be sure to plug in your own details into there before running.

Server software setup

I've included a PHP example server application that takes this post data and saves it into a file - overwriting the file each time new data arrives.

The Espruino code sends a standard POST with form data so any server side software that can read this response can be used. The post data key value pairs are:

  • auth: "YOUR_SUPER_SECRET_TOKEN" (as defined in the Espruino application)
  • moisture: integer value
  • temperature: double value

To read the information back send a get request with the following parameters:

  • auth: "YOUR_SUPER_SECRET_TOKEN" (as defined in the Espruino application)
  • output: (optional) set to "json" for JSON output or leave blank for a human readable output.

Bonus: Alexa application

The sample Alexa app in the "alexa_app" folder of this repository is pretty simple, it just queries the example PHP application and speaks the output whilst then running a second query to the PHP application for the raw JSON information which is then displayed on a card in the Alexa mobile app.

About

Simple soil moisture and ambient temperature monitoring system that sends its data to a remote web server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published