So here is a real good one:
First off, who on here also is a first responder(FF, EMT, PD, etc)
Secondly, do any of yall have a custom integration with your HASS where if you get a fire or ems call(we use VHF paging in my county, im a VF in NY) HA recognizes it, and you can do automations or scripts off that? Im kinda looking for something along the lines if I keep the pager at a respectable level at night, I wake when it goes off, but having to scream for assistant to turn lights on wakes the wifey and baby, where I an have HA turn certain lights on for x time at a reduced level then once my presence indicator detects me out of the house it turns everything back off, while then throwing a script to ābreatheā my Inovelli LED indicators red, in case wifey wakes up wondering where i wentā¦
Iām a FR. On my work a FF and EMT, but only in-company, we use radio and a closed pager system. So there I will no have any use for HA.
At free time, Iām a EMT volunteer. I get alarmed thru a mobile phone app with a push notification, when a reanimation is needed around my house.
Maybe i would like to set some automationās after an alarm is received tooā¦
I will follow this topicā¦
TYFYS. Thats what Iām trying to integrate. I have a BCT8 that I plan to park on county dispatch, then have HA monitor the audio, then once the proper sequence is received, then that triggersā¦
My dept runs IaR, but the only way I can see integrating that, is to set up IaR on a dummy phone, and HA as well then use the sensors on that, but thats got its own limits IMHOā¦
If you have ever seen a Motorola pager Ampfilied charger, they have dry contacts, but thats a expensive item for something so stinking basic i thinkā¦
If you could dock your pager next to an old Android phone running Sensor Node Free, that could be set up to send MQTT data on audio & vibration to HA.
So, I have gotten some free time to contiune looking into the aspect of how to implement this. I found, finally, because they were bought out, TwoToneDetect, which can run on a pi, or windows pc, and execute .bat or script files. So, TTD is simple to setup, but to open HA to see a script, im guessing a webhook? IDK and I could honestly use some insight on this. So TTD will run a batch or other command which will trigger HA to activate said automation(Iād love to use this and make it a blueprint for others.)
Link to the windows based software: https://www.twotonedetect.net/downloads/TwoToneDetect73l.zip
And Raspian Buster variation: https://www.twotonedetect.net/downloads/TwoToneDetect73l.tgz
I had known this existed the software, but I didnt realize IaR bought the rights to it(I figured it out when my home FD started sending mp3s with IaR alerts.)
Digging into WebHook handling, it looks like that will be the easiest to get working, but a local variable of Webhook would be ideal, if the PC running TTD is on the same network(keep all traffic in the LAN)
Welp, I have the scanner, I have Two Tone Detect setup and working, I have Home Assistant working, and I sleep through most nighttime pages, so I might as well lend a hand to my fellow first reponders.
Below is some python code I wrote and tested to work with Two Tone Detect. After saving and editing the code to fit your needs (and of course installing python and requests), all you will need to do is go to āEdit Tone Infoā in TTD and "C:\Program Files\Python310\python" "<path-to-script>"
under āAlert Commandā for each tone you want the webhook to trigger on. I am getting only up to a 5 sec delay between when the script is run and when my lights start strobing.
If anybody has any issues, lmk!
import requests # Run "pip install requests" manually once before for this script to work.
import json
webhook_url = '<HASS WEBHOOK URL>' # If you don't know this, use the copy button in the "Webhook ID" field and paste it here.
data = {} # I don't know python very well, but I know this is needed for the script to work. ĀÆ\_(ć)_/ĀÆ
requests.post(webhook_url, data=json.dumps(data), headers={'Content-Type': 'application/json'})