Volume button

Moderator: leecollings

Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Volume button

Post by Number8 »

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 8642 times
One control for volume.png
One control for volume.png (25.1 KiB) Viewed 8642 times
Debian buster on NUC and three RPi with buster.
User avatar
michaldobrotka
Posts: 50
Joined: Sunday 01 November 2015 17:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Volume button

Post by michaldobrotka »

And what about selector?
Attachments
Bez názvu-1.jpg
Bez názvu-1.jpg (26.11 KiB) Viewed 8631 times
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
nizaga
Posts: 69
Joined: Monday 30 November 2015 11:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Volume button

Post by nizaga »

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

regards,
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 »

@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 8590 times
Volume with selector.png
Volume with selector.png (44.28 KiB) Viewed 8590 times
Debian buster on NUC and three RPi with buster.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Volume button

Post by gizmocuz »

you go a bit over the top here, domoticz is not designed for this
Quality outlives Quantity!
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Volume button

Post by Egregius »

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: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Volume button

Post by gizmocuz »

Hehe... also you go way over the top :mrgreen:
Quality outlives Quantity!
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Volume button

Post by Egregius »

Maybe, but then again, it does what I want it to do :D
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Volume button

Post by Dnpwwo »

It may not be designed for this but the existing controls can be used quite well:
Untitled.png
Untitled.png (60.36 KiB) Viewed 8482 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: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 »

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
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 »

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
Debian buster on NUC and three RPi with buster.
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Volume button

Post by Dnpwwo »

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: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Volume button

Post by Number8 »

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
Debian buster on NUC and three RPi with buster.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Volume button

Post by dwmw2 »

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: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Volume button

Post by Dnpwwo »

@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: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Volume button

Post by dwmw2 »

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: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Volume button

Post by dwmw2 »

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: 55
Joined: Saturday 05 March 2016 21:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5629
Contact:

Re: Volume button

Post by Amsterdam020 »

I use as Nizaga suggets the Switch Type "Blinds" to control Kodi. Works great !
Volume button.png
Volume button.png (57.35 KiB) Viewed 7228 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: 69
Joined: Monday 30 November 2015 11:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Volume button

Post by nizaga »

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
Amsterdam020
Posts: 55
Joined: Saturday 05 March 2016 21:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5629
Contact:

Re: Volume button

Post by Amsterdam020 »

Hi pascalbianca,

I have two Raspberry Pi's
- one with domoticz
- the other with kodi

This button is on the raspberry pi with domoticz and changes the volume on the pi with kodi.
Could be in your case that you need another number then '1'.

Not sure if this is the answer of the question.
Rp3, youlesss, rfxcom, philips hue, dsb1820
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest