pixelbrackets / lametric-notification-broadcast
Receive a message and forward it to multiple LaMetric devices in your network
Requires
This package is auto-updated.
Last update: 2024-12-04 14:22:24 UTC
README
Receive a message and forward it to multiple LaMetric devices in your network.
Vision
This project provides a way to send a message to multiple LaMetric devices in a local network.
This allows setting up one notification endpoint only in other services, and not register all devices individually.
The endpoint also reduces the payload structure to a minimum by default.
This project does not display data permanently. Use an indicator app like »My Data (DIY)« instead.
Requirements
- PHP
Installation
Packagist Entry https://packagist.org/packages/pixelbrackets/lametric-notification-broadcast/
- Point your webserver to the
web
directory - Copy
data/subscriptions.template.json
and rename it todata/subscriptions.json
.
Source
https://gitlab.com/pixelbrackets/lametric-notification-broadcast/
Mirror https://github.com/pixelbrackets/lametric-notification-broadcast/
Usage
- Register each LaMetric in
data/subscriptions.json
- For field
ip
see Device IP Discovery - For field
token
see API Key Listing
- For field
Send a request with JSON payload to the local project instance
HTTPie example request for domain
localhost.local
http POST localhost.local/hook message="Hi" icon="26175"
Options
- JSON body
message
– string – Text that will be displayed - Keep it short, if it is too long it will scrollicon
(optional) – string – ID of an icon in the LaMetric Icon Gallery
License
GNU General Public License version 2 or later
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html.
Author
Dan Untenzu (mail@pixelbrackets.de / @pixelbrackets)
Changelog
See ./CHANGELOG.md
Contribution
This script is Open Source, so please use, patch, extend or fork it.
Contributions are welcome!