Show DENON AV reciever input in Text switch

Moderator: leecollings

User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Show DENON AV reciever input in Text switch

Post by Egregius »

Why is everybody so afraid of running a webserver with PHP scripts?
mKotek
Posts: 68
Joined: Wednesday 30 December 2015 23:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Poland
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
dijkdj
Posts: 63
Joined: Saturday 07 March 2015 22:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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.
pepeEL

Re: Show DENON AV reciever input in Text switch

Post 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
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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.
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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
pepeEL

Re: Show DENON AV reciever input in Text switch

Post by pepeEL »

But then how control Denon ? How create button/device in domoticz?

Wysłane z mojego SM-G920F przy użyciu Tapatalka
dijkdj
Posts: 63
Joined: Saturday 07 March 2015 22:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Show DENON AV reciever input in Text switch

Post by dijkdj »

You can create a custom tab, by placing a file in your domoticz folder (don't know the name of the folder)
pepeEL

Re: Show DENON AV reciever input in Text switch

Post by pepeEL »

But in this folder placing file with script from first post ?

Wysłane z mojego SM-G920F przy użyciu Tapatalka
Panda
Posts: 11
Joined: Wednesday 26 August 2015 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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"
pepeEL

Re: Show DENON AV reciever input in Text switch

Post 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.
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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.
pepeEL

Re: Show DENON AV reciever input in Text switch

Post 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
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Show DENON AV reciever input in Text switch

Post 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.
pepeEL

Re: Show DENON AV reciever input in Text switch

Post 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 ?
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Show DENON AV reciever input in Text switch

Post by Egregius »

Installing webserver: http://bfy.tw/3bgz
pepeEL

Re: Show DENON AV reciever input in Text switch

Post by pepeEL »

Ok but how then use it in Domoticz?

Wysłane z mojego SM-G920F przy użyciu Tapatalka
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Show DENON AV reciever input in Text switch

Post by Egregius »

You can not used it inside domoticz!
It a seperate webpage.
pepeEL

Re: Show DENON AV reciever input in Text switch

Post by pepeEL »

In custom tab ? But it not read php.

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

Re: Show DENON AV reciever input in Text switch

Post by pepeEL »

But separate page i have when i go to IP DENON...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest