Page 2 of 4

Re: Show DENON AV reciever input in Text switch

Posted: Tuesday 05 January 2016 20:34
by Egregius
Why is everybody so afraid of running a webserver with PHP scripts?

Re: Show DENON AV reciever input in Text switch

Posted: Tuesday 05 January 2016 20:38
by mKotek
Egregius wrote:Why is everybody so afraid of running a webserver with PHP scripts?
I do not think, anyone is afraid. In fact I am currently testing your solution, but I think, having a small remote icon next to Denon in Domoticz, invoking a controller like for Kodi would be nice. I have implemented the volume control using slider and a short LUA script, but for source change I have put just switches that switch into my OSMC source and back to my cable/sattelite, same for Chromecast and back to cable/sattelite, that is being used when Denon is switched off.

Re: Show DENON AV reciever input in Text switch

Posted: Tuesday 05 January 2016 20:47
by dijkdj
I'm hesitating because it would further increase the load on my Pi. There are enough protocols available in Domoticz to do it without PHP and PHP has no functionality in this regard that could not be solved in any other way. Only thing is that you need to take the time to program it.

Re: Show DENON AV reciever input in Text switch

Posted: Tuesday 05 January 2016 21:44
by pepeEL
Egregius wrote:Why is everybody so afraid of running a webserver with PHP scripts?
But can you explaine me step by step how i must configure it?

But it is not the same as manufacturer web interface from Denon ?

Wysłane z mojego SM-G920F przy użyciu Tapatalka

Re: Show DENON AV reciever input in Text switch

Posted: Wednesday 06 January 2016 9:21
by Egregius
dijkdj wrote:I'm hesitating because it would further increase the load on my Pi.
The CPU usage will not be very different if you run scripts as PHP or LUA or Bash or ...
My average CPU usage is 0,2%...
pepeEL wrote: But can you explaine me step by step how i must configure it?
There are hundreds of tutorials online on how to install Apache or nginx with php support.

Re: Show DENON AV reciever input in Text switch

Posted: Wednesday 06 January 2016 9:33
by alfred_j_kwak
Egregius wrote:
dijkdj wrote:I'm hesitating because it would further increase the load on my Pi.
The CPU usage will not be very different if you run scripts as PHP or LUA or Bash or ...
My average CPU usage is 0,2%...
pepeEL wrote: But can you explaine me step by step how i must configure it?
There are hundreds of tutorials online on how to install Apache or nginx with php support.
I used first post from this thread to enable run php scripts: viewtopic.php?f=38&t=6088

Re: Show DENON AV reciever input in Text switch

Posted: Wednesday 06 January 2016 9:41
by pepeEL
But then how control Denon ? How create button/device in domoticz?

Wysłane z mojego SM-G920F przy użyciu Tapatalka

Re: Show DENON AV reciever input in Text switch

Posted: Wednesday 06 January 2016 14:05
by dijkdj
You can create a custom tab, by placing a file in your domoticz folder (don't know the name of the folder)

Re: Show DENON AV reciever input in Text switch

Posted: Wednesday 06 January 2016 14:52
by pepeEL
But in this folder placing file with script from first post ?

Wysłane z mojego SM-G920F przy użyciu Tapatalka

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 0:43
by Panda
I had the problem that whenever the Input contained a spacing in the nam for example "Online Music" it would give me a bad web request, because it tried to send domoticz a curl command with an space in it which domoticz doesn't understand.

To fix this replace the #input part with the following code

Code: Select all

# Input
        AVinput=`grep -oP '(?<=<InputFuncSelect><value>).*(?=</value)' test.txt`
	# Process the AVinput to replace spaces with %20  (so domoticz  knows what to do)
	# Instead of giving  a bad request
	AVinput1=`echo "$AVinput" | sed -e 's/ /%20/g'`

	# Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$DENON_INPUT_IDX&nvalue=0&svalue=$AVinput1"

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 12:01
by pepeEL
I read this thread and i dont understand how i can do it. Please users write me step by step how add this to domoticz to cvontrol DENON.

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 13:18
by Egregius
Depends on what you want.
Do you want several pushbuttons inside domoticz to do some functions?
Then add in the ON actions for example "http://192.168.0.2/MainZone/index.put.a ... tion/TUNER

If you want the grey controlpanel I wrote you'll need a PHP enabled webserver and host the page there. Google knows everything about running webservers with PHP.

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 13:50
by pepeEL
But how use php panel grey in domoticz ?

Ok i done push button but when i have info about volume and it is not correct. My Denon has set 33 vol but in domoticz show me 47 vol.

Is any chance to add button to set Volume in Domoticz(up, down) in one button ?


And we can use manual button with selector ? How works and configure button with selector ? Maybe this type we can use to configure button with turn on/off Denon and select INPUT. But i dont know how configure it.

Wysłane z mojego SM-G920F przy użyciu Tapatalka

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 14:57
by Egregius
You cannot use my grey control panel inside domoticz.
With an on/off switch you could simulate volume up/down but that happens at maximum 1 step at a time. Painly slow.

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 15:13
by pepeEL
But can you describe me step by step how use your grey panel ?

Anyone know how use and configure manual switch with selector ?

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 15:18
by Egregius
Installing webserver: http://bfy.tw/3bgz

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 16:30
by pepeEL
Ok but how then use it in Domoticz?

Wysłane z mojego SM-G920F przy użyciu Tapatalka

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 16:43
by Egregius
You can not used it inside domoticz!
It a seperate webpage.

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 16:54
by pepeEL
In custom tab ? But it not read php.

Wysłane z mojego SM-G920F przy użyciu Tapatalka

Re: Show DENON AV reciever input in Text switch

Posted: Thursday 07 January 2016 17:05
by pepeEL
But separate page i have when i go to IP DENON...