Page 40 of 51

Re: Dashticz - Show your dashboard and how-to's!

Posted: Wednesday 29 July 2020 9:20
by clinkadink
madpatrick wrote: Wednesday 29 July 2020 8:59 I want the color over activated button of the selector changed.
Now it is grey and not very good visible
Here you go ;)
Spoiler: show

Code: Select all

.btn-default.active {
    color: #fff!important;
    background-color: #f54141!important;
    border-color: #500101!important;
}
If you want to target a specific selector, the add key: 'my_selector' to the block, then you can do this:
Spoiler: show

Code: Select all

[data-id='my_selector'] .btn-default.active {
    color: #fff!important;
    background-color: #f54141!important;
    border-color: #500101!important;
}

Re: Dashticz - Show your dashboard and how-to's!

Posted: Wednesday 29 July 2020 9:29
by madpatrick
Thanks !!

The "general" change doesn't work.
The border will change, but the button color not.
With the "specific" it is working

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 11 August 2020 3:24
by fargle
I have never been happy using Domoticz "Dummy Switches" for utilities like Ping diagnostics. Node-Red was already installed on the Pi running Dashticz so it was used to produce the following from a node-red dashboard webpage. No original work involved, all adapted from this node-red flow.
.
Screenshot-2020-8-10 Dashticz.jpg
Screenshot-2020-8-10 Dashticz.jpg (242.61 KiB) Viewed 2014 times

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 18 August 2020 11:54
by K0enH
Hi,

I recently started to work on a custom dashboard with dashticz which is being shown on a Lenovo TAB M10+ combined with a dock..
now I've got al my wishes almost implemented in this dashboard.
however I couldnt find any information on showing a remote control on dashticz.

I have an LG tv with Web OS. which from normal domoticz can be controlled with the so called kodi remote functionality.
is this somehow also possible to be embedded in domoticz so that I can use the same controls out of dashticz?

Regards,

K0enH

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 18 August 2020 20:55
by madpatrick
Does anybody know why the icon is small on a tablet and bigger on a PC screen.
I've tries to adjust the scale in custom.css and this works on the PC screen but not on my tablet

Tablet
Image

PC
Image

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 18 August 2020 21:06
by Lokonli
On screens with width less than 975 pixels Dashticz switches to smaller icons, narrow margin, smaller font, etc.

If you add !important to your css styling in custom.css it should use the setting on your tablet as well.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 18 August 2020 21:16
by Brutus
I use for several years Domoticz now and had also used an tablet on the wall to show the standard Dashboard of Domoticz.

Some weeks ago I started to play with Dashticz and made a nice new Dashboard. The options and the customization's are enormous.

Installed Fully Kiosk Browser and enabled the Motion detection. This only drains the battery in like a day. Hooked up a power cable but I don't like the cable in sight so I made a "Dashboard" out of wood to hold the thermostat and my tablet. Here the results.

IMG-20200808-WA0006.jpeg
IMG-20200808-WA0006.jpeg (244.61 KiB) Viewed 1867 times
20200818_204350.jpg
20200818_204350.jpg (262.22 KiB) Viewed 1867 times
20200818_205527.jpg
20200818_205527.jpg (246.83 KiB) Viewed 1867 times
Greetings Brutus.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 18 August 2020 21:19
by Lokonli
Nice frame!

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 18 August 2020 21:22
by madpatrick
Lokonli wrote: Tuesday 18 August 2020 21:06 On screens with width less than 975 pixels Dashticz switches to smaller icons, narrow margin, smaller font, etc.

If you add !important to your css styling in custom.css it should use the setting on your tablet as well.
This worked !!
Thanks

Re: Dashticz - Show your dashboard and how-to's!

Posted: Wednesday 19 August 2020 14:46
by Sjonnie2017
Brutus wrote: Tuesday 18 August 2020 21:16 I use for several years Domoticz now and had also used an tablet on the wall to show the standard Dashboard of Domoticz.

Some weeks ago I started to play with Dashticz and made a nice new Dashboard. The options and the customization's are enormous.

Installed Fully Kiosk Browser and enabled the Motion detection. This only drains the battery in like a day. Hooked up a power cable but I don't like the cable in sight so I made a "Dashboard" out of wood to hold the thermostat and my tablet. Here the results.
*snip*
Greetings Brutus.
Fab! The idea of combining the thermostat and the tablet in one casing makes me reconsider my plans to place a tablet-only solution on the wall. Kudos! :mrgreen:

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 21 August 2020 23:11
by pro2call
madpatrick wrote: Tuesday 18 August 2020 21:22
Lokonli wrote: Tuesday 18 August 2020 21:06 On screens with width less than 975 pixels Dashticz switches to smaller icons, narrow margin, smaller font, etc.

If you add !important to your css styling in custom.css it should use the setting on your tablet as well.
This worked !!
Thanks
Could you please tell me how you did? i'm struggling a bit.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 21 August 2020 23:23
by Lokonli
pro2call wrote: Friday 21 August 2020 23:11
madpatrick wrote: Tuesday 18 August 2020 21:22
Lokonli wrote: Tuesday 18 August 2020 21:06 On screens with width less than 975 pixels Dashticz switches to smaller icons, narrow margin, smaller font, etc.

If you add !important to your css styling in custom.css it should use the setting on your tablet as well.
This worked !!
Thanks
Could you please tell me how you did? i'm struggling a bit.
What's your question? What would you like to achieve?

Re: Dashticz - Show your dashboard and how-to's!

Posted: Saturday 22 August 2020 0:28
by pro2call
Lokonli wrote: Friday 21 August 2020 23:23
pro2call wrote: Friday 21 August 2020 23:11
madpatrick wrote: Tuesday 18 August 2020 21:22
This worked !!
Thanks
Could you please tell me how you did? i'm struggling a bit.
What's your question? What would you like to achieve?
I would like to make my garbage bin bigger.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Saturday 22 August 2020 8:06
by madpatrick
pro2call wrote: Friday 21 August 2020 23:11
Could you please tell me how you did? i'm struggling a bit.
Place this in your custom.css

Code: Select all

/* GARBAGE */
.trash .state div.trashrow,.trashtomorrow, div.trashtoday {
    font-size: 16px;
}
.trashcan {
width : 150% !important;
max-width: 300px !important;
}

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 28 August 2020 15:29
by Chris12
Hi, on some dashboards I can see the Buienrader forecast like "het blijft droog" with an umbrella icon. How to create this? I searched some shared config files, but could not locate this part.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 28 August 2020 19:19
by madpatrick
Chris12 wrote: Friday 28 August 2020 15:29 Hi, on some dashboards I can see the Buienrader forecast like "het blijft droog" with an umbrella icon. How to create this? I searched some shared config files, but could not locate this part.
Check this page : https://www.domoticz.com/forum/viewtopi ... la#p192012

and

https://www.domoticz.com/forum/viewtopi ... 61&t=22010

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 28 August 2020 20:36
by HansieNL
@Chris12 I thinks you saw my Dashticz dashboard. These are the steps you have to take to get it working:
1. Install Buienradar lua script in your Domoticz lua script folder, change lat and lon in the scripts, and see script for what Domoticz devices to create
2. Add block to your Dashticz CONFIG.js, change icon, and add block to a column
1. script_time_buienradar.lua
Spoiler: show

Code: Select all

-- script_time_buienradar.lua
-- 
-- BuienRadar Module
--
-- curl in os required!!
-- create dummy text device from dummy hardware 'Buien Radar'
-- create dummy rain sensor from dummy hardware 'BuienRadarMeter'
-- create dummy switch from dummy hardware for triggering screens etc based on rain
-- add as time based lua script
-- set your longitude & latitude below!
-- 
-- 2017-12-27 working version
-- 2017-12-28 trying to get the rain device working .. missing documentation ..
-- 2017-12-30 isolated the bug, i was overwriting the updatedevice .. should be ok now
-- 2018-03-28 updated buienradar url
-- 2018-04-02 added follow redirect for curl & fixed typo as tipped by gizmocuz 
-- 
-- https://gpsgadget.buienradar.nl/data/raintext?lat=51.43&lon=4.31

commandArray = {}

local myBuienRadarDevice = 'Buienradar'
local myBuienRadarMeter = 'RegenData'
local myBuienRadarFlg = 'Paraplu'

-- longitude latitude
local lat='55.55'
local lon='4.44'

time = os.date("*t")
if time.min % 5 == 0 then 
    
    print('(Buienradar) Get data from Buienradar')

    function os.capture(cmd, rep)   -- execute command to get site
        -- rep is nr of repeats if result is empty
        r = rep or 1
        local s = ""
        while ( s == "" and r > 0) do
            r = r-1
            local f = assert(io.popen(cmd, 'r'))
            s = assert(f:read('*a'))
            f:close()
        end
        if ( rep - r > 1 ) then
            print("(Buienradar) os.capture needed more than 1 call: " .. rep-r)
        end
      return s
    end
 
    --  get data from buienradar
    local command = "curl --max-time 3 -L -s 'https://gpsgadget.buienradar.nl/data/raintext?lat=" .. lat .. "&lon=" .. lon .. "'"  -- timeout 3 secs
    -- print("command: " .. command)
    local tmp = os.capture(command, 3)  -- nr of repetitions 3
 
    -- print('buienRadar data:\n' .. tmp)
    
    if ( tmp == "" ) then
        print("(BuienRadar) Empty result from curl command")
    else
        -- analyse data 

        -- to mm/h 10^((waarde-109)/32)        
        function tomm(r)
            return 10^((r-109)/32)
        end
        
        -- to string formatted
        function tos(r, c)
            c = c or 1
            return string.format("%." .. c .. "f", r)
        end

        local c=0
        local rainNow=0
        local rainNowAvg = 0
        local rainSoon = 0
        local rainTime = ""
        local rainMax = 0
        for k,v in tmp:gmatch('(.-)|(.-)\r?\n') do
            -- k is rain value, v is time
            kn = tonumber(k)
            if c<=1 then
                if rainNow < kn then
                    rainNow = kn
                end
                if kn > 0 then
                    rainNowAvg = rainNowAvg + tomm(kn)/2
                end
            end
            if c<=3 and rainSoon < kn then 
                rainSoon = kn
            end
            if rainTime == "" and kn > 0 then
                rainTime = v
            end
            if kn > rainMax then
                rainMax = kn
            end
            c = c+1
        end
        
        -- if c = 0 no data found!
        if ( c == 0 ) then
            print("(BuienRadar) Unparsable result from curl command")
        else
        
            if rainNow>0 then
                tmp = "Nu " .. tos(tomm(rainNow)) .. " mm/uur"
                if rainMax > rainNow then
                    tmp = tmp .. " tot " .. tos(tomm(rainMax)) .. " mm/uur"
                end
            elseif rainSoon>0 then
                tmp = "Verwacht " .. tos(tomm(rainSoon)) .. " mm/uur"
                if rainMax > rainSoon then
                    tmp = tmp .. " tot " .. tos(tomm(rainMax)) .. " mm/uur"
               end
            elseif rainTime ~= "" then
                tmp = "Verwacht om " .. rainTime .. " tot " .. tos(tomm(rainMax)) .. " mm/uur"
            else tmp = "Voorlopig droog"
            end
    
            -- calculate totalrainfall using rainNowAvg as average of 2 next reports
            -- print("buienRadarMeterOld: " .. otherdevices_svalues[myBuienRadarMeter])
            local rainTot = tonumber(otherdevices_svalues[myBuienRadarMeter]:match("[^;]+;([^;]+)")) + rainNowAvg/12 -- /12 to acount for 5min measurements ?? ..
            -- print("buienRadarDebug: rainNow=" .. tos(tomm(rainNow)) .. " rainNowAvg=" .. tos(rainNowAvg) .. " rainSoon=" .. 
            --      tos(tomm(rainSoon)) .. " rainTot=" .. tos(rainTot,2) .. " rainTime=" .. rainTime .. " rainMax=" .. tos(tomm(rainMax)))
            local cmd = otherdevices_idx[myBuienRadarMeter] .. "|0|" .. tos(tomm(rainNow)*100,0) .. ";" .. tos(rainTot,2)
            -- print("buienRadar: " .. cmd)
            table.insert(commandArray, { ['UpdateDevice'] = cmd } ) -- table.insert needed to avoid overwriting with next updatedevice
            
            -- write to text device
            if otherdevices[myBuienRadarDevice] ~= tmp then
                table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[myBuienRadarDevice] .. '|0|' .. tmp })
                
                -- trigger based when rainNow or rainSoon
                if ( rainNow>0 or rainSoon>0 ) then
                    if otherdevices[myBuienRadarFlg] == "Off" then
                        commandArray[myBuienRadarFlg] = "On"
                    end
                elseif otherdevices[myBuienRadarFlg] == "On" then
                    commandArray[myBuienRadarFlg] = "Off"
                end
            end
        end -- unparsable
    end -- empty result
end

return commandArray

2. CONFIG.js
Spoiler: show

Code: Select all

blocks['buienradar_txt'] = {
	idx: 123,
    title: 'Buienradar',
    width: 12,
    icon: 'fas fa-umbrella',
}

Re: Dashticz - Show your dashboard and how-to's!

Posted: Saturday 29 August 2020 9:30
by madpatrick
Maybe somebody can help me with the layout.
I want to center the text, but the icon stays on the left.
I want the icon just in front of the text, center with the text.
Image

Re: Dashticz - Show your dashboard and how-to's!

Posted: Saturday 29 August 2020 15:51
by Chris12
@HansieNL, that's correct I saw your dashboard with the umbrella icon.

Where can I find the lua folder for domoticz when Domoticz is installed on a Synology NAS?
As I cannot find a lua folder here: /volume1/@appstore/domoticz

So I check the post mentioned here, but I'm kind of stuck at the early beginning of the instructions of the script.
In my domiticz I allready have added the native buienradar hardware, which creates a lot of buienradar devices. Can I not use those devices in the script?
As I can see devices like: 'Possible Rain' , 'Is it Raining' etcetc.

Or should I realy add those new Dummy Hardware?

Re: Dashticz - Show your dashboard and how-to's!

Posted: Saturday 29 August 2020 16:12
by HansieNL
@Chris12 I’m not using buienradar hardware, but if the message of a device is the same you can use that one. Then just add the block to Dashticz and you’re done (don’t forget to set correct idx).