buttons with dial type

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

buttons with dial type

Post by pvklink »

Can buttons have a dial type ?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: buttons with dial type

Post by Lokonli »

No, but dials can have button functionality :)

Most blocks are clickable. You can add the 'popup' or 'url' parameter. newwindow and auto_close are recognized as well.

Sometimes the result might be unpredictable, for instance for dials that already contain click functionality, like an on/off-dial, or thermostat.

Currently it's not possible to include a custom image in a dial.
Only for on/off dials you can customize the icon via a block parameter.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

Ok, i will try that!
A thing that dont work withdial is textOn / Off

blocks[1749] = {title: 'Motion files aanwezig', type: 'dial', textOn: 'aaa', textOff: 'bbbb', width: 4, icon: '', hide_data: false, switch: true} //icon: 'fas fa-hdd' hide_data: true, switch: true,
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: buttons with dial type

Post by Lokonli »

Most functionality implemented for Domoticz device blocks will not work on dials.

My plan is to change this in a future update. I'll move to a generic architecture:

1) Data collection (select data from 1 or more devices)
2) Data transformation (calculations, decimals, units)
3) Presentation (as a dial, traditional block)
4) Dynamics (click behavior, popupOn/Off, speakOn/Off, url, popup)

So, in principle it should be possible to represent a RGB dimmer as dial, including a button to show the colorpicker popup window.
or combine the information from two devices into one Domoticz block.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

Can't wait :-)
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

I tried to convert a button to a block

old button
// buttons.webcams = {key:'divcams', width:4, icon: 'fas fa-video', title:'Cam', slide:2}

blocks['but_page2'] = {title: 'Cam', type: 'dial', width: 4, gotoslide: 2}
columns[1] = {blocks: ['but_page2'], width: 3}

I dont get a DIAL button...

when i add a url
blocks['but_page2'] = {title: 'Cam', type: 'dial', width: 4, url: 'https://racingnews365.nl',height: 400}
i do have a working button, bu no dial

So two questions
1. how to make a DIAL type button for page 2
2. how to make a DIAL type button for page https://racingnews365.nl'
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: buttons with dial type

Post by Lokonli »

pvklink wrote: Wednesday 03 February 2021 9:54 I tried to convert a button to a block

old button
// buttons.webcams = {key:'divcams', width:4, icon: 'fas fa-video', title:'Cam', slide:2}

blocks['but_page2'] = {title: 'Cam', type: 'dial', width: 4, gotoslide: 2}
columns[1] = {blocks: ['but_page2'], width: 3}

I dont get a DIAL button...

when i add a url
blocks['but_page2'] = {title: 'Cam', type: 'dial', width: 4, url: 'https://racingnews365.nl',height: 400}
i do have a working button, bu no dial

So two questions
1. how to make a DIAL type button for page 2
2. how to make a DIAL type button for page https://racingnews365.nl'
Currently dials only work in combination with a Domoticz device.

You could create a dummy scene in Domoticz, and show that as an on/off dial in Dashticz.
Then you can add the 'slide' or 'url' block parameter.

If needed you can change the icon in the on/off dial as well. (no image support)
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

ok! I add a dummy device...
Would be a great feature if you can add dial blocks that dont have an idx.
By adding a dummy device subtype (switch on/off) to the block you should get the same DIAL functionality as with an idx...

To handle functionality via blocks is easy to understand.
A logical name which can have an idx as a property is for me fully logic.
Not the domoticz device as a central point, but a dashticz object that can link to a domoticz device..
The dashticz object name is then also the key to define (css) styles to it...
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: buttons with dial type

Post by Lokonli »

I agree :)
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

Ok, i made dummy domoticz devices with a dashtics dial type
buttons.jpg
buttons.jpg (77.19 KiB) Viewed 819 times
See my radio and racing news button.
I had two options
1. A domoticz push on type
2. A domoticz switch (on/off)

Ad1. When i choose this type is goes off after pushing, but i also get data in the button and a needle in the ring that i dont need,
Question: can i set these off?

Ad2. (I choose for this option) i get the dial as included in the attachment. I dont want te dial to turn on or off.
Question: Is it possibe to set the on colors the same as the off ?
i now use:
.dt_content .dial {background-color: rgb(119,110,97) }

Can i use the DIAL option also for the log block? because this has no IDX see my attachment ?
If this isnt an option, i will the call the log with the dummy device option (via a http call to domoticz/#/log)
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: buttons with dial type

Post by Lokonli »

Try a domoticz scene. add:

idx: 's123'

with 123 the domoticz scene number. The scene will stay on.

I see there is a bug: the dial should stay in the 'on' state, but it switches to off. I'll fix that.

For the log, try:

Code: Select all

   blocks['logdial'] = {
       idx: 's123',   //your dummy scene
      type: 'dial',
      popup: 'log'
}
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

log is working !
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

Last item, then i can close the 'dossier' dial for my buttons (and indeed the on-state with s123 does not work as you said...

In my current dashboard it is not visble enough to see if a dial device is on, so there a multiple solutions:

a) by color (preferred)
i can define the outer ring by
.dt_content .dial {background-color: rgb(119,110,97) } /* rgb(119,110,97) dit is buitenring niet de aan/uit ring */

QUESTION:
How do i define the second ring color from a dial type for 1 device that is changed by on/off ? I searched the documentation, but cant find it

b by text
QUESTION:
Another thing is how to change the title or data when a DIAL is on or off
i tried two options and both dont work

a) TextOn blocks[1749] = {title: 'Motion files aanwezig', type: 'dial', TextOn: 'aaa', TextOff: 'bbbb', width: 3}
b) script
function getStatus_1749(idx,value,device)
{if (device.Data == "On") {blocks[1749]['title'] = "XXX"}
else {blocks[1474]['title'] = "YYYY"}}

Current dashboard with dials (en more dials to go)
Naamloos2.jpg
Naamloos2.jpg (185.76 KiB) Viewed 763 times
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: buttons with dial type

Post by pvklink »

santest.jpg
santest.jpg (23.75 KiB) Viewed 750 times
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest