Annoy Me is a simple web app that mediates messages sent from the general web and sends them to Home Assistant via the REST API
This application was built in about an hour and is not the most efficent it could possibly be, this code has not been extensively tested and is considered alpha software. Use at your own risk.
With that said if you have ideas about how to make it better feel free to submit a PR.
- Clone the repo or download it as a zip
cd
into the folder containing this repo and runnpm install
from a command line- copy
.env.example
to.env
and add the base url of your Home Assistant install including http:// or https:// make sure to include the port if nessisary - Go into your Home Assistant installation and generate a Long Lived Token and paste this after
HA_TOKEN=
- In Home Assistant create a new automation that is triggered by
sensor.annoying_message
state changing - (Optional) Set a condition to set a do not disturb to avoid hearing random messages in the night
- Set the action to call a service that calls your TTS generator and sends it to the speakers of your choice my action looked like this:
data_template: entity_id: media_player.living_room_speaker message: '{{states(''sensor.annoying_message'')}}' service: tts.google_translate_say
but yours may very. - Run
npm start
and you should be able to visit localhost:3000 to visit your message form