-
-
Notifications
You must be signed in to change notification settings - Fork 3
Use case 01 simple full hours bell
This use case is making full hours bell. It plays desirable sound at full houre. :)
You will need: working node-red, sshd or other way to upload sounds files, termux-api
create file with content:
termux-media-player play /data/data/com.termux/files/home/sounds/$*
upload file to oiyshTerminal. Name it playSound.sh set properties to executable.
make directory sounds in '/data/data/com.termux/files/home/'. Upload your sound for full hour there with the name bell0.mp3
import json to node red as a new flow. node red json:
[ { "id": "d03abd149e148e19", "type": "inject", "z": "efa51897ea7cb7f4", "name": "", "props": [ { "p": "payload" }, { "p": "mp3", "v": "bell0.mp3", "vt": "str" } ], "repeat": "", "crontab": "0 0-23 * * *", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 390, "y": 600, "wires": [ [ "551c8f426102f0a7" ] ] }, { "id": "551c8f426102f0a7", "type": "exec", "z": "efa51897ea7cb7f4", "command": "/data/data/com.termux/files/home/playSound.sh", "addpay": "mp3", "append": "", "useSpawn": "false", "timer": "", "winHide": false, "oldrc": false, "name": "play sound", "x": 690, "y": 600, "wires": [ [], [], [] ] } ]
deploy flow in node-red.