Page 17 of 50
Re: Dashticz - Show your dashboard and how-to's!
Posted: Saturday 20 January 2018 17:31
by digdilem
Very pleased with the results of an evening playing with Dashticz - a very nice framework. I did have some problems using the GUI interface, but not once modifying the config files with a text editor. Thanks for making it - very nice!
- hennock.jpg (261.11 KiB) Viewed 5165 times
Re: Dashticz - Show your dashboard and how-to's!
Posted: Saturday 20 January 2018 18:29
by EdwinK
Looks nice
Re: Dashticz - Show your dashboard and how-to's!
Posted: Monday 22 January 2018 6:41
by welby
Here's my pretty simple setup, it's running on a lenovo 10inch tablet on my wall. This is a pic from chrome.
Re: Dashticz - Show your dashboard and how-to's!
Posted: Monday 22 January 2018 21:21
by robgeerts
Very nice Guys!!
Re: Dashticz - Show your dashboard and how-to's!
Posted: Tuesday 23 January 2018 10:01
by EdwinK
digdilem wrote: ↑Saturday 20 January 2018 17:31
Very pleased with the results of an evening playing with Dashticz - a very nice framework. I did have some problems using the GUI interface, but not once modifying the config files with a text editor. Thanks for making it - very nice!
hennock.jpg
CONFIG.js
CUSTOM.css.txt
Instead of uploading your config files, you could paste them within the [ code ] an [/ code ] tags.
Re: Dashticz - Show your dashboard and how-to's!
Posted: Wednesday 24 January 2018 20:45
by Mads
Hi.
How do i know, the block number, that matches the diffent switches? is it the IDX nr there also is the block nr?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Thursday 25 January 2018 10:15
by EdwinK
You use the idx number in Domoticz as blocknumber.
Re: Dashticz - Show your dashboard and how-to's!
Posted: Thursday 25 January 2018 10:51
by htilburgs
In Short:
Domoticz: IDX --> Dashticz: block[idx]
Dashticz block[idx] --> custom.css: .block_idx
Re: Dashticz - Show your dashboard and how-to's!
Posted: Thursday 25 January 2018 21:36
by petzno
How can I make a switch show two buttons, for example both on and off? I would like this for scenes, since sometimes you want to turn on a scene but in Dashticz it is marked as on even if it's just partially on. In domoticz you can have both ON and OFF buttons also for scenes. Is this possible in dashticz?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Tuesday 30 January 2018 22:23
by TheRedOne09
jurjan wrote: ↑Monday 13 November 2017 20:31
I got a css question, how can I set the background color of the entire block?
I placed an inline red color on the 'Fontijn' block as an example, but I cannot find how to do this by using custom.css
All -selected- blocks should become green (rgba(0,255,0,0.3)
Any help would be appreciated.
dash.jpg
Hi jurjan, I like your style. Can you please share CONFIG.js and custom.css?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Wednesday 07 February 2018 21:14
by clubeddie
dutchdevil83 wrote: ↑Monday 28 August 2017 20:16
I have made a spinning font awesome icon when my solar panels are generating power. Ofcourse you can also use this for spinning other icons.
Add this to CUSTOM.JS for defining the action:
Code: Select all
function getStatus_29(idx,value,device){
if(parseFloat(device['Usage'])>0){
blocks['29_1']['icon'] = 'fa fa-sun-o slow-spin'; //if you use "fa-spin" instead of "slow-spin" then it is not necessary to add code to custom.css
}
else {
blocks['29_1']['icon'] = 'fa fa-sun-o';
}
}
Add this to CUSTOM.CSS to define a slower spinning speed for the font awesome spinning function (i liked this better):
Code: Select all
.slow-spin {
-webkit-animation: fa-spin 4s infinite linear;
animation: fa-spin 4s infinite linear;
}
Have fun with spinning your icons !
Kewl tweak. I want to use it, but i did not get it to work for me
First of all i use Youless for the read of my solar panels, for some reason the default icon for this is fa-fire (the same as gas), it is configured in main.js, rule 1657.
If i add your script, nothing is happened with the flame icon.
I can confirm that your script is working, when i use it on a undefined block it is spinning.
How do you read your solar panel ?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Thursday 08 February 2018 19:31
by gjaa
My dasboard is under contruction and I have a problem
How can I change the height of Buienradar
- Schermafbeelding 2018-02-08 om 19.25.03.png (137.32 KiB) Viewed 4460 times
As you can see Buienradar has an other height, so the the blocks do not align properly
Gerard
Re: Dashticz - Show your dashboard and how-to's!
Posted: Friday 09 February 2018 18:49
by jeroenkl
clubeddie wrote: ↑Wednesday 07 February 2018 21:14
dutchdevil83 wrote: ↑Monday 28 August 2017 20:16
I have made a spinning font awesome icon when my solar panels are generating power. Ofcourse you can also use this for spinning other icons.
Add this to CUSTOM.JS for defining the action:
Code: Select all
function getStatus_29(idx,value,device){
if(parseFloat(device['Usage'])>0){
blocks['29_1']['icon'] = 'fa fa-sun-o slow-spin'; //if you use "fa-spin" instead of "slow-spin" then it is not necessary to add code to custom.css
}
else {
blocks['29_1']['icon'] = 'fa fa-sun-o';
}
}
Add this to CUSTOM.CSS to define a slower spinning speed for the font awesome spinning function (i liked this better):
Code: Select all
.slow-spin {
-webkit-animation: fa-spin 4s infinite linear;
animation: fa-spin 4s infinite linear;
}
Have fun with spinning your icons !
Kewl tweak. I want to use it, but i did not get it to work for me
First of all i use Youless for the read of my solar panels, for some reason the default icon for this is fa-fire (the same as gas), it is configured in main.js, rule 1657.
If i add your script, nothing is happened with the flame icon.
I can confirm that your script is working, when i use it on a undefined block it is spinning.
How do you read your solar panel ?
same issue here, who can assist/help?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Friday 09 February 2018 19:49
by felix63
A Raspberry Pi 7-Inch Touch Screen with a HC-SR501 PIR motion sensor on top in a 3d printed case. Tricky part was the script to wake the system from sleep.
Code: Select all
# HC-SR501 motion sensor
# https://raspberrytips.nl/hc-sr501-bewegingssensor-pir-raspberry-pi/
import RPi.GPIO as GPIO
import time
import requests
import os, subprocess, time
subprocess.call("DISPLAY=:0 xscreensaver-command -activate", shell=True)
displayison = False
maxidle = 1*60 # seconds
lastsignaled = 0
#
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
PIN = 8
GPIO.setup(PIN, GPIO.IN)
time.sleep(20)
print "Start sensor..."
time.sleep(2)
print "Sensor activated..."
while True:
now = time.time()
if GPIO.input(PIN):
print "Movement detected! " + (time.strftime("%H:%M:%S"))
if not displayison:
subprocess.call("DISPLAY=:0 xscreensaver-command -deactivate", shell=True)
displayison = True
r = requests.get("http://viola.local/json.htm?type=command¶m=switchlight&idx=599&switchcmd=On")
lastsignaled = now
time.sleep(7) # wait 4 seconds for PIR to reset.
else:
if now-lastsignaled > maxidle:
if displayison:
subprocess.call("DISPLAY=:0 xscreensaver-command -activate", shell=True)
displayison = False
time.sleep(1)
Re: Dashticz - Show your dashboard and how-to's!
Posted: Sunday 11 February 2018 17:16
by gjaa
gjaa wrote: ↑Thursday 08 February 2018 19:31
My dasboard is under contruction and I have a problem
How can I change the height of Buienradar
Schermafbeelding 2018-02-08 om 19.25.03.png
As you can see Buienradar has an other height, so the the blocks do not align properly
Gerard
Fixed it my self, changed the buienradar settings (the height by RadarMapNL?w=256&h=180')
buttons.buienradar = {width:6, isimage:true, refreshimage:60000, image: '
http://api.buienradar.nl/image/1.0/Rada ... =256&h=180', url:'
http://www.buienalarm.nl/widget/graphic ... lor=4395c7'}
- Schermafbeelding 2018-02-11 om 17.12.22.png (110.81 KiB) Viewed 4304 times
The blocks do align now properly
Gerard
Re: Show your Dashticz v2.0 and how-to's!
Posted: Thursday 15 February 2018 20:34
by dens1975
lukev wrote: ↑Friday 05 May 2017 19:59
mvveelen wrote:
I see you have the charging / % charged in your dashboard. How exactly did you get this (I know the topic, but there are a lot of pages to read....), AND doesn't it drain your iPhone when you repeatedly poll the status or whereabouts of the iPhone?
This is my working LUA-script. You have to make 3 dummy devices, 2 text and 1 percentage: "iPhone Battery PERSON1", "Postion PERSON1" and "PowerState PERSON1".
I poll every 10 minutes, it seems to drain the battery a little faster, but nothing spectacular.
Code: Select all
-- Script to check the location of multiple iPhones every X minutes,
-- test if they are "home" and represent this using virtual switches
commandArray = {}
-- polling interval in minutes (1-59), setting this too low may drain the phones' batteries
interval = 10
local m = os.date('%M')
if (m % interval == 0) then
json = (loadfile "/volume1/@appstore/domoticz/var/scripts/lua/JSON.lua")()
-- Array of users to be checked
users = {
PERSON1 = {username = "itunes username" ; password = "itunes password" ; devicename = "itunes devicename"};
PERSON2 = {username = "itunes username" ; password = "itunes password" ; devicename = "itunes devicename"}
}
-- The latitude and longitude of your house (use Google Maps or similar to find this)
homelongitude = xxxxx
homelatitude = xxxxxxx
-- Radius (in km) which will be used to determine if a device is at home
radius = 0.3
function address(longitude, latitude)
command = "curl -s https://maps.googleapis.com/maps/api/geocode/json?latlng=" .. latitude .. "," .. longitude .. "&sensor=false"
local handle = io.popen(command)
local result = handle:read("*a")
handle:close()
output = json:decode(result)
return output.results[1].formatted_address
end
for user,credentials in pairs(users) do
getlocation = "curl -s -X POST -L -u '" .. credentials.username .. ":" .. credentials.password .. "' -H 'Content-Type: application/json; charset=utf-8' -H 'X-Apple-Find-Api-Ver: 2.0' -H 'X-Apple-Authscheme: UserIdGuest' -H 'X-Apple-Realm-Support: 1.0' -H 'User-agent: Find iPhone/1.3 MeKit (iPad: iPhone OS/4.2.1)' -H 'X-Client-Name: iPad' -H 'X-Client-UUID: d98c8ae0db3311e687b92890643032df' -H 'Accept-Language: en-us' -H 'Connection: keep-alive' https://fmipmobile.icloud.com/fmipservice/device/" .. credentials.username .."/initClient"
local handle = io.popen(getlocation)
local result = handle:read("*a")
handle:close()
output = json:decode(result)
for key,value in pairs(output.content) do
if value.name == credentials.devicename then
lon = value.location.longitude
lat = value.location.latitude
bat = value.batteryLevel * 100 / 1
powerstateval = value.batteryStatus
table.insert(commandArray,{['UpdateDevice'] = otherdevices_idx['iPhone Battery ' .. user] .. '|0|' .. bat})
table.insert(commandArray,{['UpdateDevice'] = otherdevices_idx['PowerState ' .. user] .. '|0|' .. powerstateval})
distance = math.sqrt(((lon - homelongitude) * 111.320 * math.cos(math.rad(lat)))^2 + ((lat - homelatitude) * 110.547)^2) -- approximation
position = address(lon,lat)
position_text = string.gsub(position, ', Netherlands', '') .. ' (' .. (math.floor(distance*10+0.5)/10) .. ' km)'
print(position)
prev_distance_str = string.match(otherdevices['Position ' .. user], '%(.*%)') or '(1000 km)'
prev_distance = tonumber(string.sub(prev_distance_str, 2,-5))
-- update text device, but only if postion has changed more than defined in "radius" to reduce log size
if math.abs(prev_distance - distance) > radius then
table.insert(commandArray,{['UpdateDevice'] = otherdevices_idx['Position ' .. user] .. '|0|' .. position_text})
end
print('iPhone ' .. user .. ': ' .. math.floor(distance*100+0.5)/100 .. ' km from home, ' .. bat .. '% battery remaining. PowerState: '.. powerstateval ..' ')
if distance < radius then
if otherdevices['iPhone ' .. user] == 'Off' then
commandArray['iPhone ' .. user] = 'On'
-- table.insert(commandArray, {['SendNotification'] = 'Presence update#' .. user .. ' came home'})
end
else
if otherdevices['iPhone ' .. user] == 'On' then
commandArray['iPhone ' .. user] = 'Off'
-- table.insert(commandArray, {['SendNotification'] = 'Presence update#' .. user .. ' left home'})
end
end
end
end
end
end
return commandArray
I have disabled the notification, don't need it:
Code: Select all
-- table.insert(commandArray, {['SendNotification'] = 'Presence update#' .. user .. ' came home'})
-- table.insert(commandArray, {['SendNotification'] = 'Presence update#' .. user .. ' left home'})
Don't forget to point out the correct location of json.lua! I use a synology, so this url isn't working on a rpi!
Code: Select all
json = (loadfile "/volume1/@appstore/domoticz/var/scripts/lua/JSON.lua")()
Hi, I also use this script but how do I get a block with the name and status? How does this look in your config.js?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Thursday 15 February 2018 23:39
by Justin2501
I just watched all these great Dashticz interfaces that i decided to install it for myself.
Sadly enough i can't get it to work.
Domoticz V3.8922 (BETA) is running and fully functional
Ran "
git clone https://github.com/robgeerts/dashticz_v2 --branch beta" in the domoticz/www/ folder
Config:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.0.5:8080';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
When i go to
http://192.168.0.5:8080/dashticz_v2 is says "Domoticz Offline" even though it's online
When i go to
http://192.168.0.5:8080/dashticz_v2/index.html is says "Timeout. Check your CONFIG.js"
Any idea what i might be missing?
Re: Dashticz - Show your dashboard and how-to's!
Posted: Friday 16 February 2018 8:36
by DewGew
Justin2501 wrote: ↑Thursday 15 February 2018 23:39
I just watched all these great Dashticz interfaces that i decided to install it for myself.
Sadly enough i can't get it to work.
Domoticz V3.8922 (BETA) is running and fully functional
Ran "
git clone https://github.com/robgeerts/dashticz_v2 --branch beta" in the domoticz/www/ folder
Config:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.0.5:8080';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
When i go to
http://192.168.0.5:8080/dashticz_v2 is says "Domoticz Offline" even though it's online
When i go to
http://192.168.0.5:8080/dashticz_v2/index.html is says "Timeout. Check your CONFIG.js"
Any idea what i might be missing?
It should be working with those settings. Do you use user and password to domoticz even in your local network? Then you have to set that in config also. Make sure you have renamed CONFIG_DEFAULT.js to CONFIG.js and that the file contains only:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.0.5:8080';
config['user_name'] = 'domoticz username';
config['pass_word'] = 'domoticz password';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
Delete all other text for testing you connection.
Re: Dashticz - Show your dashboard and how-to's!
Posted: Friday 16 February 2018 8:47
by Justin2501
DewGew wrote: ↑Friday 16 February 2018 8:36
It should be working with those settings. Do you use user and password to domoticz even in your local network? Then you have to set that in config also. Make sure you have renamed CONFIG_DEFAULT.js to CONFIG.js and that the file contains only:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.0.5:8080';
config['user_name'] = 'domoticz username';
config['pass_word'] = 'domoticz password';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
Delete all other text for testing you connection.
CONFIG_DEFAULT.js is indeed renamed to CONFIG.js
I do have a username and password, but my local network is credentials-free in this care. (127.0.0.*;192.168.0.*)
I tried the format "config['domoticz_ip'] = '
http://user:[email protected]:8080';" which was shown in the internet but will try your config setup this evening to see if it's working.
Re: Dashticz - Show your dashboard and how-to's!
Posted: Friday 16 February 2018 20:12
by Justin2501
DewGew wrote: ↑Friday 16 February 2018 8:36
It should be working with those settings. Do you use user and password to domoticz even in your local network? Then you have to set that in config also. Make sure you have renamed CONFIG_DEFAULT.js to CONFIG.js and that the file contains only:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.0.5:8080';
config['user_name'] = 'domoticz username';
config['pass_word'] = 'domoticz password';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
Delete all other text for testing you connection.
Clearing the CONFIG.js and adding the info above seems to do the trick!
Thank you