Also, it allows volume and pitch changes as well as inclusion of a sound bit in a WAV file to be spoken. I use PicoTTS as my TTS engine, because it can run locally and is absolutely “cloud-free” and doesn’t need a working internet connection. # full name will be used as language input to the TTS engine # first 2 chars will be used as subfolder name for pre-recorded audio alerts This serves as a language selector on my main HA page: input_select: This is a boolean input to switch on/off any TTS alerts (like at night, or when I’m not at home). I make the same distinction by language for TTS commands. You see the files have the same name, but are recorded in different languages. My alerts folder is in the config/www folder, as follows: www/ Initial_value: "/home/homeassistant/.homeassistant/www/alerts" I use the var custom component to store some “global” variables like the default media player, the default language, the path to the audio files, etc like this: # Custom variables component (in "custom_components/var/")įriendly_name: "Default Media Player for Audio Alerts"įriendly_name: "Base URL for audio alert messages"įriendly_name: "Base (internal) path for audio alerts" German TTS, British TTS Prerequisites var custom component I use a lot of building blocks that rely on each other, so you might have to adapt the script to your needs and requirements. It’s not as nerdy as it seems, because scripts like these can actually help visibly impaired persons. I can trigger this via a RF remote when at home. You could use a notify instead, for example. The script will simply play an audio alert to a set of defined media players, in the language selected in my HA. Here is an example I use (under automation:, or in automations.yaml): # Syncthing on You can devise much more elaborated automations yourself: Now since we have the data, we could stop Syncthing if it goes beyond a monthly data allowance, have us notified if Syncthing stops unexpectedly, and so on … The sky’s the limit. Now let’s add simple automations for alerts when Syncthing goes down/is started again. Ha-syncthing_info 365×569 36 KB Automation example ![]() Add the sensors we defined to your new glance card: Let’s add a Syncthing Glance Card to our system. Hint: If you want to make more sensors yourself, here is the documentation on Syncthing’s REST API. Remember you’ll need to restart HA every time when sensors are added, deleted, or modified! You might want to test them out before we move on. ![]() Type the following command, substituting server name and API key with your own: curl -X GET -H "X-API-Key: Ziegheizee7do7Je8uiMiepu8Abeevee" You should get a JSON response like the following: "Īs you see, this sensor does some calculations: It calculates the number of connections total (minus one, because your own machine is also always in this list, and I want to see the connections going to the other Syncthing devices), the number of devices currently connected, and makes a nice datetime result to show when your Syncthing was last started. ![]() Let’s assume Syncthing runs on a machine called studio1 in the local network. Using curl in a terminal window, you can easily check if the REST API works. If you have no API key yet, click Generate to generate a new one.Ĭopy the API key and place it into your secrets.yaml file (fake key shown here): syncthing_api_key: Ziegheizee7do7Je8uiMiepu8Abeevee If you already see an API key here, don’t change it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |