Skip to content

A module for MagicMirror that can receive a POST-request for indoor temperature and/or humidity and forwards it as an event internally

License

Notifications You must be signed in to change notification settings

buxxi/MMM-IndoorClimate-Endpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-IndoorClimate-Endpoint

Magic Mirror Module - Creates an endpoint that can receive a POST-request for indoor climate values and forwards it as an event internally. So the indoor temperature and humidity can be provided without creating a special module for just that kind of thermometer.

⚠️ This module has no purpose if being used without a module that can receive the notification INDOOR_TEMPERATURE or INDOOR_HUMIDITY (like the standard weathermodule) since this module doesn't display anything, it only forwards the data.

Install

  1. Clone repository into ../modules/ inside your MagicMirror folder.
  2. Add the module to the Magic Mirror config without position and header.
{
  module: "MMM-IndoorClimate-Endpoint",
  config: {}
}
  1. Done!

Send data to the module

Some examples how to provide the magic mirror with an indoor temperature or humidity.

curl -X POST -d '{"temp":<VALUE>, "humidity":<VALUE>}' http://<IP>:<PORT>/indoor-climate

curl -X POST -d '{"humidity":<VALUE>}' http://<IP>:<PORT>/indoor-climate

curl -X POST -d '{"temp":<VALUE>}' http://<IP>:<PORT>/indoor-climate

Sending no valid payloadValue results in a 400.

Where the arguments are:

  1. VALUE: the degrees of the indoor temperature or humidity
  2. IP: the ip address to the magic mirror
  3. PORT: the port that magic mirror is listening to

About

A module for MagicMirror that can receive a POST-request for indoor temperature and/or humidity and forwards it as an event internally

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published