Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olexs/mmm-userpresencetomqtt
MagicMirror module that publishes the internal USER_PRESENCE broadcast notification to an MQTT topic, allowing to use the mirror as an occupancy/motion sensor in a home automation setup.
https://github.com/olexs/mmm-userpresencetomqtt
magicmirror2 mqtt mqtt-publisher presence-detection
Last synced: 6 days ago
JSON representation
MagicMirror module that publishes the internal USER_PRESENCE broadcast notification to an MQTT topic, allowing to use the mirror as an occupancy/motion sensor in a home automation setup.
- Host: GitHub
- URL: https://github.com/olexs/mmm-userpresencetomqtt
- Owner: olexs
- License: mit
- Created: 2020-01-19T15:03:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-21T08:05:53.000Z (over 2 years ago)
- Last Synced: 2023-03-13T21:10:16.185Z (over 1 year ago)
- Topics: magicmirror2, mqtt, mqtt-publisher, presence-detection
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MMM-UserPresenceToMQTT
[MagicMirror](https://github.com/MichMich/MagicMirror) module that publishes the internal `USER_PRESENCE` broadcast notification to an MQTT topic, allowing to use the mirror
as an occupancy/motion sensor in a home automation setup.Data for the `USER_PRESENCE` notification can be supplied by a [PIR sensor module](https://github.com/paviro/MMM-PIR-Sensor), a [camera-based motion detection module](https://github.com/rejas/MMM-MotionDetector), or any other source.
## Installation
1. Make sure you already have a module that publishes the `USER_PRESENCE` notification to other modules.
2. Clone the repository into `modules` folder of your install.
3. Run `cd MMM-UserPresenceToMQTT` and `npm install`.
4. Add the module to your config as described below.
5. Restart your MagicMirror.## Configuration
Place the configuration block anywhere in your modules list in `config.js`. The module does not render anything to the mirror.
```
{
module: 'MMM-UserPresenceToMQTT',
config: {
mqttServer: "mqtt://mqtt.server.com:1883",
mqttTopic: "home/magicmirror/userpresent",
// check below for other options
}
}
```### Options
Option
Description
mqttServer
The MQTT server to publish to, including protocol (mqtt://
ormqtts://
), host/path and port.
Default value:mqtt://localhost:1883
mqttUser
Username to authenticate against the MQTT server.
Default value: undefined (no auth)
mqttPassword
Password to authenticate against the MQTT server.
Default value: undefined (no auth)
mqttTopic
MQTT topic to publish the notifications to.
Default value:home/magicmirror/userpresent
notificationType
What type of broadcast notification is listened to and published to MQTT.
Default value:USER_PRESENCE
## Dependencies
- [mqtt](https://www.npmjs.com/package/mqtt) (via `npm install`)