Audio detecting email notifier.

Schematic for Raspberry Pi in links.

Detection of unbalanced line level audio (a.k.a. headphone jack output at loud volume) which will send a single email when audio is dead and a single email when its active.

Uses: DEAD AIR monitor for a radio station.

See: http://github.com/ClockLoop/NodeRedDeadAir for schematic.

http://github.com/ClockLoop/NodeRedDeadAir/blob/master/NodeRedDeadAir.png

Why does no one include schematics anymore?

[{"id":"e4fd968f.837368","type":"rpi-gpio out","z":"feca7292.e77ad8","name":"","pin":"26","set":false,"out":"out","x":677.8333740234375,"y":389.66668701171875,"wires":[]},{"id":"411b38a2.ac20e","type":"rpi-gpio in","z":"feca7292.e77ad8","name":"","pin":"24","intype":"tri","read":false,"x":117,"y":288.8333740234375,"wires":[["90f12bec.993b3"]]},{"id":"ef5bab6e.ffaeb8","type":"rpi-gpio out","z":"feca7292.e77ad8","name":"","pin":"22","set":false,"out":"out","x":895.8333740234375,"y":109.83334350585938,"wires":[]},{"id":"d2ca51a0.822438","type":"function","z":"feca7292.e77ad8","name":"Toggle 0/1 on input","func":"\ncontext.state = context.state || 0;\n\n(context.state === 0) ? context.state = 1 : context.state = 0;\nmsg.payload = context.state;\n\nreturn msg;","outputs":1,"noerr":0,"x":677,"y":109,"wires":[["ef5bab6e.ffaeb8"]]},{"id":"d2fd43b0.c8ba08","type":"inject","z":"feca7292.e77ad8","name":"tick every .5 sec","topic":"","payload":"","payloadType":"date","repeat":".5","crontab":"","once":true,"x":445,"y":109,"wires":[["d2ca51a0.822438"]]},{"id":"90f12bec.993b3","type":"trigger","z":"feca7292.e77ad8","op1":"1","op2":"0","op1type":"val","op2type":"val","duration":"10","extend":true,"units":"s","name":"","x":195,"y":389.8333740234375,"wires":[["7b0d5070.816508"]]},{"id":"8751c61e.ab3fb","type":"switch","z":"feca7292.e77ad8","name":"","property":"payload","rules":[{"t":"eq","v":"1"},{"t":"eq","v":"0"}],"checkall":"true","outputs":2,"x":491,"y":391.8333740234375,"wires":[["e4fd968f.837368","5f1d2df.fb6cbd4"],["e4fd968f.837368","6b0d44d.0aa203c"]]},{"id":"7b0d5070.816508","type":"delay","z":"feca7292.e77ad8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":347,"y":388.8333740234375,"wires":[["8751c61e.ab3fb"]]},{"id":"81765c53.bf1a8","type":"e-mail","z":"feca7292.e77ad8","server":"smtp.gmail.com","port":"465","name":"","dname":"OffAir","x":979,"y":516.8333740234375,"wires":[]},{"id":"b5df5250.d4cb08","type":"debug","z":"feca7292.e77ad8","name":"","active":true,"console":"false","complete":"false","x":771,"y":481.8333740234375,"wires":[]},{"id":"988bc2e1.be4738","type":"change","z":"feca7292.e77ad8","name":"Change message","rules":[{"t":"set","p":"payload","to":"Off AIR"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":555.8333740234375,"wires":[["2a29c51e.92955a","81765c53.bf1a8"]]},{"id":"2a29c51e.92955a","type":"debug","z":"feca7292.e77ad8","name":"","active":true,"console":"false","complete":"false","x":988,"y":585.8333740234375,"wires":[]},{"id":"311853bd.ddca24","type":"change","z":"feca7292.e77ad8","name":"Change message","rules":[{"t":"set","p":"payload","to":"On AIR"}],"action":"","property":"","from":"","to":"","reg":false,"x":786,"y":220.8333740234375,"wires":[["1e53f5d6.27604a","19e43816.f78cc"]]},{"id":"19e43816.f78cc","type":"e-mail","z":"feca7292.e77ad8","server":"smtp.gmail.com","port":"465","name":"","dname":"OnAir","x":991,"y":183.8333740234375,"wires":[]},{"id":"1e53f5d6.27604a","type":"debug","z":"feca7292.e77ad8","name":"","active":true,"console":"false","complete":"false","x":1003,"y":254.8333740234375,"wires":[]},{"id":"4d32811c.4475d","type":"debug","z":"feca7292.e77ad8","name":"","active":true,"console":"false","complete":"false","x":768,"y":290.8333740234375,"wires":[]},{"id":"5f1d2df.fb6cbd4","type":"trigger","z":"feca7292.e77ad8","op1":"1","op2":"1","op1type":"nul","op2type":"val","duration":"10","extend":true,"units":"s","name":"","x":593,"y":292.8333740234375,"wires":[["311853bd.ddca24","4d32811c.4475d"]]},{"id":"6b0d44d.0aa203c","type":"trigger","z":"feca7292.e77ad8","op1":"1","op2":"1","op1type":"nul","op2type":"val","duration":"10","extend":true,"units":"s","name":"","x":588,"y":482.8333740234375,"wires":[["b5df5250.d4cb08","988bc2e1.be4738"]]}]
ClockLoop

Flow Info

created 1 year, 3 months ago

Node Types

Core
  • change (x2)
  • debug (x4)
  • delay (x1)
  • e-mail (x2)
  • function (x1)
  • inject (x1)
  • rpi-gpio in (x1)
  • rpi-gpio out (x2)
  • switch (x1)
  • trigger (x3)

Tags

  • audio
  • deadair
  • offline
  • 2n3904
  • email
  • RaspberryPi
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option