Dreammachines have a speaker and LED's that can be easily controlled with simple commands.
Thus, it is possible to play a WAV file with the following command aplay -l ding.wav
and to play with the lights with this other command.
Link: https://www.reddit.com/r/Ubiquiti/comments/i928s7/that_speaker_in_the_dream_machine_you_can_do/
Put the Wav files in the /mnt/persistent
directory of the DreamMachine.
On the Home Assistant side, put this in the configuration:
shell_command:
dreammachine_doorchime: ssh dreammachine 'aplay /mnt/persistent/doorchime.wav'
dreammachine_doorchime_led: ssh dreammachine 'echo 240 > /proc/gpio/led_tempo && echo 124 > /proc/gpio/led_pattern && aplay /mnt/persistent/doorchime.wav && echo 0 > /proc/gpio/led_pattern'
dreammachine_led_on: ssh dreammachine 'echo 240 > /proc/gpio/led_tempo && echo 124 > /proc/gpio/led_pattern'
dreammachine_led_off: ssh dreammachine 'echo 0 > /proc/gpio/led_pattern'
Then, you can call the service you want like that:
- service: shell_command.dreammachine_led_on
data: {}
- service: shell_command.dreammachine_doorchime
data: {}