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 notificationINDOOR_TEMPERATURE
orINDOOR_HUMIDITY
(like the standard weathermodule) since this module doesn't display anything, it only forwards the data.
- Clone repository into
../modules/
inside your MagicMirror folder. - Add the module to the Magic Mirror config without position and header.
{
module: "MMM-IndoorClimate-Endpoint",
config: {}
}
- Done!
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:
- VALUE: the degrees of the indoor temperature or humidity
- IP: the ip address to the magic mirror
- PORT: the port that magic mirror is listening to