Volume button

Post Reply
Number8
Posts: 261
Joined: Friday 23 May 2014 7:55
Target OS: Raspberry Pi
Domoticz version: 3.5103
Location: Saint Pierre de Jards
Contact:

Volume button

Post by Number8 » Monday 16 January 2017 11:52

Hello,

Domoticz is not very well suited to control audio video gear. For instance in order to control the volume one needs 3 controls (see picture). In a home theater environment, one needs to add 4 more buttons (center, sub, back, surround) that makes 8 controls in domoticz, 11 as a total. The interface would become clutered with many buttons and not very user friendly.
I think (and hope) that devs would consider to design some specific controls for A/V management. The first one would be for volume and could include 2 sub controls (Vol + and Vol -) and an optional control for mute (state of the mute button, i.e. icon, would change accordingly)
Does it make sense?
Attachments
One-control-for-volume-new.png
One-control-for-volume-new.png (4.2 KiB) Viewed 2655 times
One control for volume.png
One control for volume.png (25.1 KiB) Viewed 2655 times

User avatar
michaldobrotka
Posts: 64
Joined: Sunday 01 November 2015 18:21
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Volume button

Post by michaldobrotka » Monday 16 January 2017 12:24

And what about selector?
Attachments
Bez názvu-1.jpg
Bez názvu-1.jpg (26.11 KiB) Viewed 2644 times
Domoticz on Raspi 3
Serial Mysensors GW on Arduino nano
Broadlink RM2
Rehau CO2 USB Stick
RF link 433 MHz
Amazon Echo Dot + HAbridge

nizaga
Posts: 96
Joined: Monday 30 November 2015 12:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Volume button

Post by nizaga » Monday 16 January 2017 12:41

i use the blindes / venetian blinds button to control volumen, you have up / down or up/down/stop.

regards,

Number8
Posts: 261
Joined: Friday 23 May 2014 7:55
Target OS: Raspberry Pi
Domoticz version: 3.5103
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 » Monday 16 January 2017 15:38

@michaldobrotka and @nizaga: thanks for your inputs. Selector switch is certainly a workable solution, I do use the selector in a number of situations. However I think this could be improved in order to have a more compact and user friendly control.
As such, one of the states of the selector remains selected with does not mean anything in that case (no big deal I must admit).
For the mute control, I sat-up a new On/Off button with a speaker icon. However the logic should be inverted (that is when Mute is on, the button icon should be off)
A control with all volume controls in it would be more user friendly (dont pay attention to the graphic design, the sole purpose is to illustrate the idea). Values in red represent the actual value of each channel.
Attachments
One-control-for-all-volume-controls.png
One-control-for-all-volume-controls.png (13.55 KiB) Viewed 2602 times
Volume with selector.png
Volume with selector.png (44.28 KiB) Viewed 2602 times

User avatar
gizmocuz
Posts: 8526
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Volume button

Post by gizmocuz » Monday 16 January 2017 18:53

you go a bit over the top here, domoticz is not designed for this
Quality outlives Quantity!

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Volume button

Post by Egregius » Monday 16 January 2017 19:06

Create your own page for stuff like this.
Almost impossible for Domoticz to implement all brands of receivers, mediaplayers, TVs,...

For example, my Denon control page:
Image

In the same setup I have pages for Kodi control and Kodi movie databases. I only need to browse the movie posters and click a button to turn on the TV, set the Denon receiver to the correct HDMI input and volume etc...

If you build it yourself it works EXACTLY like you want it ;)

User avatar
gizmocuz
Posts: 8526
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Volume button

Post by gizmocuz » Monday 16 January 2017 19:06

Hehe... also you go way over the top :mrgreen:
Quality outlives Quantity!

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Volume button

Post by Egregius » Monday 16 January 2017 19:35

Maybe, but then again, it does what I want it to do :D

User avatar
Dnpwwo
Posts: 627
Joined: Sunday 23 March 2014 10:00
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Volume button

Post by Dnpwwo » Tuesday 17 January 2017 10:08

It may not be designed for this but the existing controls can be used quite well:
Untitled.png
Untitled.png (60.36 KiB) Viewed 2494 times
This speaker icon is mute/unmute and the slider shows/sets the volume far quicker than pushing + or - again and again.... :lol:
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw

Number8
Posts: 261
Joined: Friday 23 May 2014 7:55
Target OS: Raspberry Pi
Domoticz version: 3.5103
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 » Tuesday 17 January 2017 23:01

Hehe as gizmocuz said I'm not the only one to be other the top :D
For volume I have a selector with preset values and another selector with - and + so I can adjust
I'd love to design a specific page but I'm not fluent in JavaScript (by far).
Are there any example of such HTML page with custom design controls and the necessary JavaScript glue?
Thanks

Number8
Posts: 261
Joined: Friday 23 May 2014 7:55
Target OS: Raspberry Pi
Domoticz version: 3.5103
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 » Tuesday 17 January 2017 23:05

Slider for volume is a nice idea however if I recall well the slider has 100 steps, whereas for main volume the scale goes from -96 to 10 and for some others from -12 to 12. So the slider value would not represent the actual value

User avatar
Dnpwwo
Posts: 627
Joined: Sunday 23 March 2014 10:00
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Volume button

Post by Dnpwwo » Wednesday 18 January 2017 10:44

Correct, you need to do a conversion somewhere between dB and the slider range, normally in a Lua event or an external script
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw

Number8
Posts: 261
Joined: Friday 23 May 2014 7:55
Target OS: Raspberry Pi
Domoticz version: 3.5103
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 » Friday 20 January 2017 14:52

Dnpwwo wrote:Correct, you need to do a conversion somewhere between dB and the slider range, normally in a Lua event or an external script
For sure. But then the real 116 steps for main volume (-96 to +10) will be compressed and the -12 to + 12 for other volumes will have far too many steps. This is why so far I haven't used to slider. It would be great to be able to set the min and max value of the slider for each control instance in order to cope with what each equipment is capable of

dwmw2
Posts: 45
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: Volume button

Post by dwmw2 » Sunday 19 February 2017 22:35

The slider for volume would be fine... but how do I update it when amp volume is changed through other means?

I created a virtual dimmer switch, and I can happily turn it on/off and slide it left and right. Connecting that up to actually control the amp via a lua script should be simple enough.

It's also simple to set up something which automatically monitors the amp itself (it's an Onkyo, so I just connect to a TCP socket and listen for updates). I get a line of data from the amp whenever the volume is changed.

If I use the 'Set Volume' switch command, won't that trigger my scripts to *tell* the amp to set the volume that it had just told me? Triggering another notification from the amp... and another command ... and another notification.

The 'udevice' command doesn't seem to work on the virtual dimmer switch... what am I missing?

Do I have to write actual hardware support for this, to be able to update the observed "dimmer" level without actually triggering a command to the amp? I know this works properly for ZWave light switches...

User avatar
Dnpwwo
Posts: 627
Joined: Sunday 23 March 2014 10:00
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Volume button

Post by Dnpwwo » Sunday 19 February 2017 22:56

@dwmw2,

I would have a look at this viewtopic.php?f=65&t=15681#p120392 and think about making one for your Onkyo (seems like you have some technical knowledge). The Python framework was added to solve exactly these problems.

(Need to be running the beta version though and have Python 3 libraries on your server)
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw

dwmw2
Posts: 45
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: Volume button

Post by dwmw2 » Monday 20 February 2017 18:20

Thanks. I'm slightly reluctant to resort to python as the machine I'm running this on is fairly underpowered — the VDSL router which sits in the cupboard under the stairs (where it needs to be to see all the Evohome devices) on a UPS anyway. But that example did help me resolve some problems with the sensor types for the C++ plugin I've started to put together: https://github.com/dwmw2/domoticz/commits/onkyo

I might be more inclined to do it with scripting if we could use MicroPython. Or even lua... can't we do device plugins with lua instead?

dwmw2
Posts: 45
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: Volume button

Post by dwmw2 » Tuesday 21 February 2017 15:51

FWIW I've also resolved my original problem — I need to do the outbound updates with a script configured as the switch action, not triggered by the update. That way it *does* only get invoked for explicit actions from the Domoticz side, not for incoming "informational" updates from the amp itself.

Of course, that only works right now for on/off and selector switches; there seems to be no way to pass the *level* into the script when it's a dimmer. I've submitted a patch which expands {level} when triggering the switch script: https://github.com/domoticz/domoticz/pull/1250

Amsterdam020
Posts: 49
Joined: Saturday 05 March 2016 22:42
Target OS: Raspberry Pi
Domoticz version: 3.5629
Contact:

Re: Volume button

Post by Amsterdam020 » Tuesday 11 July 2017 21:37

I use as Nizaga suggets the Switch Type "Blinds" to control Kodi. Works great !
Volume button.png
Volume button.png (57.35 KiB) Viewed 1240 times
URLs are the following...
http://192.168.1.66:8080/jsonrpc?reques ... t"},"id":1}
http://192.168.1.66:8080/jsonrpc?reques ... t"},"id":1}
(change IP adres and id to your own values)

The volume is in or decreased with 5 units.
Rp3, youlesss, rfxcom, philips hue, dsb1820

nizaga
Posts: 96
Joined: Monday 30 November 2015 12:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Volume button

Post by nizaga » Tuesday 11 July 2017 22:23

If you run the latest beta, you can use LUA to capture the stop event and program your action. In the current stable is not implemented but in the latest beta is working fine. I use the on action/off action via URL and the stop via LUA


Enviado desde mi iPhone utilizando Tapatalk Pro

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests