Forked Daapd Conrol from frontpage
Posted: Sunday 27 December 2015 11:23
Hello All,
After a while playing with Domoticz for a while, i am verry pleased with it.
So i wanted to control my forked-daapd server (https://github.com/ejurgensen/forked-daapd) from the frontapge with Domoticz.
I am using Forked-daapd with a airport express to stream music / radio statios to my receiver.
It is managable with e.g. teh app remote on my iPhone, but it would be fun to port a little control to the frontpage with Domoticz.
After a lot of searching and try-ing i got it working, here is a little layout for the steps to be taken, and the scripts and plugins i used.
Any comment and recommendations are welcome.
Used:
Raspberri Pi with Raspbian.
Domoticz (of course)
Apache 2 https://www.raspberrypi.org/documentati ... /apache.md
python support for Raspbian and Apache ( in a terminal window : and )
Tools:
Winscp (great for transfering files from and to linux servers, uses ssh deamon)
Putty (for terminal acces to linux, uses ssh deamon)
Netbeans (IDE for editing e.g. python and java scripts)
copy your www folder (mine was in home/pi/domoticz.www) to /var/www (i put mine in /var/www/domoticz)
Configure the apache config (mine is /etc/apache2/sites-available/domoticz.conf)
My python scripts are in /var/www/domoticx/scripts, and to use them you have to tell apache that they are CGI enabeled, see the second directory declaration (<Directory "/var/www/domoticz/scripts">) in the config.
Save the file and create a link to this file in /etc/apache2/sites-enabled,.
Restart apache, and connect with a browser to the website.
Install python MPD module.
Terminal : if pip ain't working :
After a while playing with Domoticz for a while, i am verry pleased with it.
So i wanted to control my forked-daapd server (https://github.com/ejurgensen/forked-daapd) from the frontapge with Domoticz.
I am using Forked-daapd with a airport express to stream music / radio statios to my receiver.
It is managable with e.g. teh app remote on my iPhone, but it would be fun to port a little control to the frontpage with Domoticz.
After a lot of searching and try-ing i got it working, here is a little layout for the steps to be taken, and the scripts and plugins i used.
Any comment and recommendations are welcome.
Used:
Raspberri Pi with Raspbian.
Domoticz (of course)
Apache 2 https://www.raspberrypi.org/documentati ... /apache.md
python support for Raspbian and Apache ( in a terminal window :
Code: Select all
sudo apt-get install python
Code: Select all
sudo apt-get install libapache2-mod-python
Tools:
Winscp (great for transfering files from and to linux servers, uses ssh deamon)
Putty (for terminal acces to linux, uses ssh deamon)
Netbeans (IDE for editing e.g. python and java scripts)
copy your www folder (mine was in home/pi/domoticz.www) to /var/www (i put mine in /var/www/domoticz)
Configure the apache config (mine is /etc/apache2/sites-available/domoticz.conf)
Code: Select all
<VirtualHost 192.168.0.30:80>
DocumentRoot /var/www/domoticz
ServerName domoticz.sonnehoek.local
<Directory "/var/www/domoticz">
allow from all
Options None
Require all granted
</Directory>
<Directory "/var/www/domoticz/scripts">
Options ExecCGI
SetHandler cgi-script
</Directory>
</VirtualHost>
Save the file and create a link to this file in /etc/apache2/sites-enabled,
Code: Select all
ln -s /etc/apache2/sites-available/domoticz.conf /etc/apache2/sites-enabled/domoticz.conf
Restart apache, and connect with a browser to the website.
Install python MPD module.
Terminal :
Code: Select all
pip install python-mpd2
Code: Select all
sudo apt-get install python-pip