Dashticz - General Discussions

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Locked
Dropshot
Posts: 44
Joined: Tuesday 20 December 2016 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by Dropshot »

wizjos wrote:
Dropshot wrote:Great tutorial, thanks. I have one question though, how did you create the blocks beneath the moon picture? I get only 'on' instead of the tekst value.
Thanks for the compliment!
About the block beneath the moon, these are filled from the lua script. The first block is the value from idxmoonphase and the second one contains the value of idxmoonpercentage.:

Code: Select all

local idxmoonpercentage ='125'              -- Your virtual moon percentage illuminated Device ID
local idxmoonage ='131'                     -- Your virtual moon age Device ID
local idxmoonphase ='132'                   -- Your virtual moon phase Device ID
local idxmoonrise='124'                     -- Your virtual moon rise variable ID
local idxmoonset='127'                      -- Your virtual moon set variable ID
The values are stored in this part of the script:

Code: Select all

        commandArray[1] = {['UpdateDevice'] = idxmoonphase.."|0|"..moonPhase}
        commandArray[2] = {['UpdateDevice'] = idxmoonrise.."|0|"..moonriseHour..":"..moonriseMinute}
        commandArray[3] = {['UpdateDevice'] = idxmoonset.."|0|"..moonsetHour..":"..moonsetMinute}
        commandArray[4] = {['UpdateDevice'] = idxmoonage.."|0|"..age}
        commandArray[5] = {['UpdateDevice'] = idxmoonpercentage.."|0|"..percentIlluminated}
In Domoticz I've created these dummy sensors:virtual devices.PNG
That's about all I had to do as far as I remember :)

There is however one thing to the moonphase block. By default it only shows as displayed when you name the virtual device as shown here:

Code: Select all

blocktypes.Name['Maanfase'] = { icon: 'fa fa-moon-o', title: '<Data>', value: '<Name>' }
blocktypes.Name['Moon phase'] = { icon: 'fa fa-moon-o', title: '<Data>', value: '<Name>' }
blocktypes.Name['Mondphase'] = { icon: 'fa fa-moon-o', title: '<Data>', value: '<Name>' }
Defined in blocks.js.
There is a way around this by adding this code in custom.js

Code: Select all

function getExtendedBlockTypes(blocktypes){
   blocktypes.Name['My moon phase name'] = { icon: 'fa fa-moon-o', title: '<Data>', value: '<Name>' }
   return blocktypes;
}
I hope that helps!

Regards,
Wizjos
Thank you, I've the same devices in Domoticz. I think I still don't understand how these 'blocktypes.Name' work. I only see the 'On' status of these devices:
Image

How can I show the data instead of the status of these devices?

EDIT: Ah, I get it. I have added the lines to the blocks.js file (~/dashboard/js/blocks.js). It now shows the correct values,
Last edited by Dropshot on Sunday 23 April 2017 16:02, edited 1 time in total.
User avatar
rbisschops
Posts: 63
Joined: Monday 12 May 2014 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Location: Schiedam, Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by rbisschops »

@robgeerts
I downloaded the lastest version. The 'Thuis' button is now behaving normally. I will try to add some custom.js for the combined behavious with aanwezig (like in the previous version) and using a standard font awesome image :) .

Another one I checked is the latest blinds version. There is still a part cut off from the 'clickable' part of the + image. I think this is causing it:
blinds.jpg
blinds.jpg (15.79 KiB) Viewed 2224 times


Thanks for the quick fixes so far. Much appreciated !

Ralph
RPi 3B (master): RFXtrx433, Harmony Hub, Z-Wave devices, CoCo units, Hue, Xiaomi Aquara
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

For now I give up on that Moonphase script. It still doesn't understand that my temp file is on '/var/packages/domoticz/scripts/lua/tmp/Moon.tmp'.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
wizjos
Posts: 79
Joined: Monday 07 March 2016 19:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by wizjos »

Dropshot wrote:EDIT: Ah, I get it. I have added the lines to the blocks.js file (~/dashboard/js/blocks.js). It now shows the correct values,
Nice to see it's working now! But you need to be aware that this file might be overwritten each time... Rob has implemented this via custom.js:

Code: Select all

function getExtendedBlockTypes(blocktypes){
   blocktypes.Name['Download'] = { icon: 'fa fa-download', title: '<Name>', value: '<Data>' }
   return blocktypes;
}
User avatar
wizjos
Posts: 79
Joined: Monday 07 March 2016 19:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by wizjos »

EdKo66 wrote:For now I give up on that Moonphase script. It still doesn't understand that my temp file is on '/var/packages/domoticz/scripts/lua/tmp/Moon.tmp'.
Sorry to read this... No luck with the orginal location (/var/tmp/phase.tmp) as well?

Wizjos
SuperMouse
Posts: 30
Joined: Sunday 09 April 2017 11:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SuperMouse »

EDKO66


Is used this:

local tempfilename = '/home/pi/Moon.tmp' -- can be anywhere writeable

Start a SSH to you device and start the next commands direct after login:
BEWARE OF CAPITALS.

sudo nano Moon.tmp
sudo chmod 777 Moon.tmp

This helped me !

Also not this is important:

local city = "Maassluis" -- Your city for Wunderground API
local countryCode = "Maassluis" -- Your country code for Wunderground API

You need to have your city entered two times.
User avatar
wizjos
Posts: 79
Joined: Monday 07 March 2016 19:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by wizjos »

SuperMouse wrote:Also not this is important:

local city = "Maassluis" -- Your city for Wunderground API
local countryCode = "Maassluis" -- Your country code for Wunderground API

You need to have your city entered two times.
:shock: Huh, my countrycode is 'NL'
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

wizjos wrote:
EdKo66 wrote:For now I give up on that Moonphase script. It still doesn't understand that my temp file is on '/var/packages/domoticz/scripts/lua/tmp/Moon.tmp'.
Sorry to read this... No luck with the orginal location (/var/tmp/phase.tmp) as well?

Wizjos
Nope, no succes either. :(
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

SuperMouse wrote:EDKO66
Is used this:

local tempfilename = '/home/pi/Moon.tmp' -- can be anywhere writeable

Start a SSH to you device and start the next commands direct after login:
BEWARE OF CAPITALS.

sudo nano Moon.tmp
sudo chmod 777 Moon.tmp

This helped me !

Also not this is important:

local city = "Maassluis" -- Your city for Wunderground API
local countryCode = "Maassluis" -- Your country code for Wunderground API

You need to have your city entered two times.
Tried both 644 and 777 as permission. Both failed. I've got another tmp file on exact the same location, and that one works without problems. Even copied the exact path, and still no go.

Since you can't use nano on Synology, I used VI but that shouldn't really matter. Can give the double cityname a go, although I doubt that will fix the tmp. file problems.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
SuperMouse
Posts: 30
Joined: Sunday 09 April 2017 11:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SuperMouse »

Sorry, My mistake :oops:

Code: Select all

local city =                "Maassluis"             -- Your city for Wunderground API
local countryCode =         "NL"                    -- Your country code for Wunderground API
kdschlosser
Posts: 15
Joined: Sunday 23 April 2017 3:14
Target OS: Windows
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by kdschlosser »

I would like to make a suggestion. If the WU API key is present to use the radar from them.

It is nice because you have many options you can specify

radius of the radar
radius unit of measure
width of the image
height of the image
show base map (satellite view)
different colors for rain snow and mix
smooth the colors
remove any false radar reading
number of frames in animation
delay between frames of animation
timestamp image
animation or still image

you can also grab the condition/forecast icons from WU as well
User avatar
wizjos
Posts: 79
Joined: Monday 07 March 2016 19:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by wizjos »

EdKo66 wrote:
wizjos wrote:
EdKo66 wrote:For now I give up on that Moonphase script. It still doesn't understand that my temp file is on '/var/packages/domoticz/scripts/lua/tmp/Moon.tmp'.
Sorry to read this... No luck with the orginal location (/var/tmp/phase.tmp) as well?

Wizjos
Nope, no succes either. :(
If you PM me your working rainscript and the failing moon script maybe I can help you find the solution...

Wizjos
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by pvm »

For Android tablet users turn screen on when motion

Still thinking about whether I will be using the Dashticz screensaver mode or totally turn the screen off based on the mentioned topic
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

wizjos wrote:
EdKo66 wrote:
wizjos wrote:Sorry to read this... No luck with the orginal location (/var/tmp/phase.tmp) as well?

Wizjos
Nope, no succes either. :(
If you PM me your working rainscript and the failing moon script maybe I can help you find the solution...

Wizjos
Done so
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
vmb
Posts: 26
Joined: Thursday 02 October 2014 14:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by vmb »

Does anybody know how I can add this (www.klokradio.nl) local radiostaton to the Streamplayer? There is no mp3 stream available, only pls etc.
sonar
Posts: 18
Joined: Saturday 31 January 2015 11:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by sonar »

vmb wrote:Does anybody know how I can add this (http://www.klokradio.nl) local radiostaton to the Streamplayer? There is no mp3 stream available, only pls etc.
Stream url is: http://klokradio.shoutcaststream.com:8062/
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

After much work and some PM's with Wisjo, I'm happy to say that the Moonscript is finally working for me.

Pfftt...
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by madrian »

vmb wrote:Does anybody know how I can add this (http://www.klokradio.nl) local radiostaton to the Streamplayer? There is no mp3 stream available, only pls etc.
Check sonar's answer, alternatively download pls and inside pls you can find the stream.
vmb
Posts: 26
Joined: Thursday 02 October 2014 14:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by vmb »

sonar wrote:
vmb wrote:Does anybody know how I can add this (http://www.klokradio.nl) local radiostaton to the Streamplayer? There is no mp3 stream available, only pls etc.
Stream url is: http://klokradio.shoutcaststream.com:8062/
Thx for very quick respons :D . Stream does not respond :( Any suggestions? This is the content from my config.js:

var _STREAMPLAYER_TRACKS = [
{"track":1,"name":"Klokradio","file":"http://klokradio.shoutcaststream.com:8062"},
{"track":2,"name":"538 Hitzone","file":"http://vip-icecast.538.lw.triple-it.nl/WEB11_MP3"},
SuperMouse
Posts: 30
Joined: Sunday 09 April 2017 11:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SuperMouse »

EdKo66 wrote:After much work and some PM's with Wisjo, I'm happy to say that the Moonscript is finally working for me.

Pfftt...
What was the solution?
Locked

Who is online

Users browsing this forum: No registered users and 1 guest