Git Product home page Git Product logo

white-noise's Introduction

White Noise

hacs_badge Buy Me A Coffee

A white noise machine for a media_player entity.

Installation

This app is best installed using HACS, so that you can easily track and download updates.

Alternatively, you can download the whitenoise directory from inside the apps directory here to your local apps directory, then add the configuration to enable the whitenoise module.

How it works

You can define an instance of the app in your apps.yaml file for every white noise machine you'd like to configure. As a pre-requisite, you will need an audio file that is an hour or more long. My recommendation is to download one of the 60 minute files from here to your www directory.

The app is configured to play the audio file on the configured speaker. Every 55 minutes, it will automatically fade the volume out on the speaker, so that it can restart the audio file without it sounding abrupt. Then the volume will fade in to what it was previously. This way, you're able to use a file of a reasonable length, rather than creating a file that is 8+ hours long and takes up an unnecessary amount of space on your server.

App configuration

Define the app once for each white noise machine you want to create, giving it a unique name each time.

white_noise:
  module: whitenoise
  class: WhiteNoise
  media_player: master_bedroom_speaker
  input_boolean: white_noise
  filename: https://xyz.duckdns.org/local/audio/42-Rain-60min.mp3
key optional type default description
module False string whitenoise
class False string WhiteNoise
media_player True string The media_player entity you want to use as a white noise machine. You only need to list the portion to the right of the period, so in the example above media_player.master_bedroom_speaker is the full entity_id being used.
input_boolean True string An input_boolean you have defined to control the white noise machine. As with media_player, you only need the portion after the period, so for the example above, input_boolean.white_noise is the full entity_id controlling this white noise machine.
filename True string The location of the white noise file. You may have to play with this depending on what type of media_player you are using. I am using a Google Home, and that device requires a URL it can hit over the internet, so I had to use my external URL rather than the IP address on my local network.

Issues/Feature Requests

Please log any issues or feature requests in this GitHub repository for me to review.

white-noise's People

Contributors

apop880 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

white-noise's Issues

where to write config?

Hi apop880,

a few questions:

(1) Is this configuration added to configuration.yaml in HA or an apps.yaml file?

(2) Also - how do I call this white noise from an automation? (I assume I need to change ' input_boolean: white_noise' from false to true).

(3) How do I configure multiple media players?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.