[MMM-CommandToNotification] Run scripts and send the outputs as configurable notifications peridocally
-
Description:
Ever wanted to run scripts periodically and provide their output as notifications?
Want to run the scripts within different time periods?Then MMM-CommandToNotification is your module!
You can define a base rhythm the module iterates all scripts.
You can specify skips per script to run scripts only each (skips+1) iterations.
You can send the output as payload of one or multiple notifications.You may want to use my MMM-ValuesByNotification to display the payload.
Download:
Version 0.0.6
- add a debug flag to configuration which enables/disables some console messages
- added a new dummy example script which simply outputs the content of a text file
- fixed all issues reported by the new automatic module scanning script developed by @KristjanESPERANTO
Version 0.0.5
- Fixed a bug which caused the module to not return output for any command if one of the scripts closes with no output
Version 0.0.4
- added
sync
option to make it possible to configure if the commands should be run one after another or if they should be started as fast as possible - added
delayNext
option which makes it possible to wait a configurable amount of milliseconds before the next command is processed (i.e. if you want to make 10 API calls but the API only supports one connection each second)
Version 0.0.3
- fixed the additional parameters like “timeout” being ignored
- the scripts now will be called with working directory set to “scripts” directory
- added a new option to send the notifications with custom payloads instead of the output of the script
Version 0.0.2
- Added new “conditions” option which causes notifications only be send if the scripts exits with a specified return code and/or the output contains a specified string
- The flowercare-mm.bash script now returns a JSON instead of JSON5 object
- Added a script to watch files for changes
- Added more documentation of the scripts
Version 0.0.1
- Specify a period in which the module calls all scripts
- Configure scripts (with their arguments) to be called and the notifications which the outputs of the scripts should be send to
- Configure a skip count per script if you do not want the script to be called each iteration
- Configure a timeout to stop the call of a script if it does not respond within a given time
- Scripts to query the temperature and humidity information of BME280, DHT11, DHT22, DS18B20 and HTU21 are included
- A script to query the temperature, moisture, light, conductivity and battery level of Miflora flowercare sensors is included
- Two scripts to generate either a single random integer or a JSON object which contains a integer and float value are included (for debugging purpose)
-