Hello everybody,
Is there a way to define a selector, i have a dummy device(heater) with 5 levels, i saw the possibility to switch:
$('.block_'+idx).attr('onclick','switchDevice(this)');
but how to keep my selector using the function getBlock()
or how to have to icons (on,off) without getblock();
Thank you very much for your participation and your help
Dashticz - Custom scripts
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 1
- Joined: Sunday 30 July 2017 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Script to change the RPI Touch Screen brightness
Recently I've purchased a secondary (actually my third) Raspberry with the official Raspberry Touch Screen. On this RPI I've installed a simple LAMP server and installed Dashticz.
Let me start with saying 'Kudo's for this interface mate!'
One thing that bothers me with the Touch Screen is the brightness, by default it is far to bright and without an keyboard is pretty hard to change the brightness.
I couldn't find a way to change the brightness from within Dashticz, so I decided to write my own script.
Basically what I've done is to add a Dummy Dimmer to Domoticz and use the value of this Dimmer to change the brightness of the Touch Screen with this value. Therefore I needed a script to 'listen' to Domoticz. After that I could add this Dimmer to Dashticz.
An detailed instruction on how to install and use the script can be found here:
https://github.com/kolkos/rpi_backlight
Please let me know if I missed something or if you experiencing any problems.
Cheers!
- Anton
Let me start with saying 'Kudo's for this interface mate!'
One thing that bothers me with the Touch Screen is the brightness, by default it is far to bright and without an keyboard is pretty hard to change the brightness.
I couldn't find a way to change the brightness from within Dashticz, so I decided to write my own script.
Basically what I've done is to add a Dummy Dimmer to Domoticz and use the value of this Dimmer to change the brightness of the Touch Screen with this value. Therefore I needed a script to 'listen' to Domoticz. After that I could add this Dimmer to Dashticz.
An detailed instruction on how to install and use the script can be found here:
https://github.com/kolkos/rpi_backlight
Please let me know if I missed something or if you experiencing any problems.
Cheers!
- Anton
-
- Posts: 1273
- Joined: Saturday 24 January 2015 22:12
- Target OS: NAS (Synology & others)
- Domoticz version: 3.7067
- Location: NL
- Contact:
Re: Script to change the RPI Touch Screen brightness
Thanks for the compliments and thanks for sharing!
Although this has nothing to do with Dashticz, it may help others using the Raspberry Touch Screen.
Although this has nothing to do with Dashticz, it may help others using the Raspberry Touch Screen.
-
- Posts: 130
- Joined: Friday 29 November 2013 11:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Script to change the RPI Touch Screen brightness
It canalso be done with dashticz, I wrote an how-to in the wiki a couple of months ago.
- dre68
- Posts: 27
- Joined: Friday 30 January 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Noordwijk, Netherlands
- Contact:
Re: Dashticz - Custom scripts
Annyone out there who can help me out creating a custom block from a selector switch?
I have a selector which displays the current scene. I'd like to have a block based on that selector which shows a title like 'active scene' and the name of the current active scene (which is the decoded name of the selected value).
I don't want to see the current value as a selector, just plain text.
btw just started with Dasticz and already hooked, excellent configurable dashboard Rob Geeets kudos!
I have a selector which displays the current scene. I'd like to have a block based on that selector which shows a title like 'active scene' and the name of the current active scene (which is the decoded name of the selected value).
I don't want to see the current value as a selector, just plain text.
btw just started with Dasticz and already hooked, excellent configurable dashboard Rob Geeets kudos!
- dre68
- Posts: 27
- Joined: Friday 30 January 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Noordwijk, Netherlands
- Contact:
Re: Dashticz - Custom scripts
Is it possible by custom.js to create a block to display the stream of an IP cam only in case another switch is 'on' (the switch which toggles the cam on or off)
this to prevent dashticz to continuously trying to connect to a stream which is currently off?
this to prevent dashticz to continuously trying to connect to a stream which is currently off?
- dre68
- Posts: 27
- Joined: Friday 30 January 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Noordwijk, Netherlands
- Contact:
Re: Dashticz - Custom scripts
OK meanwhile I figured this one it out, for the interested:dre68 wrote: ↑Wednesday 12 December 2018 22:46 Annyone out there who can help me out creating a custom block from a selector switch?
I have a selector which displays the current scene. I'd like to have a block based on that selector which shows a title like 'active scene' and the name of the current active scene (which is the decoded name of the selected value).
I don't want to see the current value as a selector, just plain text.
btw just started with Dasticz and already hooked, excellent configurable dashboard Rob Geeets kudos!
Code: Select all
function getBlock_475(device,idx){ //change _xxx to the idx of your device!
var html='';
var names;
if (levelNamesEncoded === true) names = window.atob(device['LevelNames']).split('|');
else names = device['LevelNames'].split('|');
html += '<div class="col-xs-6 col-data">';
html += '<strong class="title">Active Scene</strong><br />';
for (a in names) {
if (parseFloat(a) > 0 || (a == 0 && (typeof(device['LevelOffHidden']) == 'undefined' || device['LevelOffHidden'] === false))) {
var s = '';
if ((a * 10) == parseFloat(device['Level']))
html += '<strong class="title">' + s + names[a] +'</strong><br />';
}
}
html += '</div>';
return html;
}
Who is online
Users browsing this forum: No registered users and 0 guests