Skip to content

nickrout/Alsa_MQTT_homeassistant_Volume_control

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQTT Alsa Volume remote control

Remote Control for Alsa on Raspberry Pi for control by Home Assistant



Installation

1) On the Raspberry Pi or other devices using Alsa, copy the MqttVol.py and RpiMqtt.conf files to a convenient folder. The folder used in testing was /var/www/html. Changes to this must be reflected in the mqttvolD file.

2) The python app must be run by the instance of user pi's current desktop or it may not see the Alsa outputs.
It is most convenient to start the app at the Pi desktop start as this will insure the proper Alsa output is available.
To enable startup at boot and manual restart of the app, copy mqttvolD to the /etc/init.d folder.

3) Copy MqttVolStart to the /home/pi/.config/autostart folder and insure it has execute rights.
Do not add it to rc.d as that will break the link to Alsa outputs.

4) For the start and restart to work properly python3 needs to be linked to pyvol.
Enter the command "sudo ln /usr/bin/python3 /usr/bin/pyvol"
This allows the program to be stopped and started without affecting other python3 programs. "

Homeassistant

The volume control will look like a light to Homeassistant
It can be added to the lights.yaml file with the entry in lights.yaml.
It can also be added to configuration.yaml as a light

Notes:

Suggestions branches or anything to improve this is welcome.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.6%
  • Shell 19.4%