Dashticz V2 - Configuration:修订间差异
(创建页面,内容为“Dashticz v2.0 can be configured by editing the CONFIG.js file.<br> This file you can find in the subfolder [dashticz]\custom.<br> <br> TIP! If CUSTOM POSITIONING is...”) |
|||
(未显示同一用户的8个中间版本) | |||
第1行: | 第1行: | ||
Dashticz v2.0 | Dashticz v2.0 可以通过修改 CONFIG.js 文件进行配置<br> | ||
你可以在子目录 [dashticz]\custom 中找到此文件.<br> | |||
<br> | <br> | ||
小贴士! 如果自定义布局无效,请检查你是否已经取消了 blocks/colums/screens 中所有你想要取消的注释代码。<br> | |||
<br> | <br> | ||
在以下部分,CONFIG.js 将被分为不同的章节进行介绍. 每个章节都将说明如何使用.<br> | |||
<br> | <br> | ||
=== | ===连接=== | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
var config = {} | var config = {} | ||
第20行: | 第20行: | ||
|- | |- | ||
| config['language'] | | config['language'] | ||
| | | 可以选择的语言有, 汉语(cn_CN), 捷克语(cz_CZ), 丹麦语(dk_DK), 德语(de_DE), 英语(en_US), 西班牙语(es_ES), 芬兰语(fi_FI), 法语(fr_FR), 匈牙利语(hu_HU), 意大利语(it_IT), 芬兰语(nl_NL), 挪威语(no_NO), 波兰语(pl_PL) 葡萄牙语(pt_PT), 俄语(ru_RU), 斯洛伐克语(sk_SK), 斯洛维尼亚语(si_SI), 瑞典语(sv_SV) 或者乌克兰语(ua_UA) | ||
|- | |- | ||
| config['domoticz_ip'] | | config['domoticz_ip'] | ||
| | | 安装的 Domoticz 的 URL 地址(包含正确端口号的地址) | ||
|- | |- | ||
| config['domoticz_refresh'] | | config['domoticz_refresh'] | ||
| | | Dashticz v2.0仪表盘从 Domoticz 读取信息的刷新率 | ||
|- | |- | ||
| config['dashticz_refresh'] | | config['dashticz_refresh'] | ||
| | | Dashticz v2.0仪表盘的刷新率 | ||
|} | |} | ||
<br> | <br> | ||
第99行: | 第99行: | ||
| config['domoticz_ip'] = | | config['domoticz_ip'] = | ||
| 'http://192.168.1.3:8084'; | | 'http://192.168.1.3:8084'; | ||
| | | 安装 Domoticz 的地址和端口号 | ||
|- | |- | ||
| config['user_name'] = | | config['user_name'] = | ||
| 'username' | | 'username' | ||
| Domoticz | | Domoticz 的用户名 | ||
|- | |- | ||
| config['pass_word'] = | | config['pass_word'] = | ||
| 'password' | | 'password' | ||
| Domoticz | | Domoticz 的密码 | ||
|- | |- | ||
| config['loginEnabled'] = | | config['loginEnabled'] = | ||
| 0 / 1 | | 0 / 1 | ||
| | | 使能是否想从 dashticz 中登陆 | ||
|- | |- | ||
| config['app_title'] | | config['app_title'] | ||
| 'Dashticz' | | 'Dashticz' | ||
| | | 仪表盘的名称 - 显示在顶栏(see also: http://www.domoticz.com/wiki/Dashticz_V2_-_Custom_Applications#Module_-_Topbar) | ||
|- | |- | ||
| config['domoticz_refresh'] | | config['domoticz_refresh'] | ||
| [SECONDS] | | [SECONDS] | ||
| | | 从 Domoticz 获取信息的秒数 | ||
|- | |- | ||
| config['dashticz_refresh'] | | config['dashticz_refresh'] | ||
| [SECONDS] | | [SECONDS] | ||
| | | 刷新 Dashticz 仪表盘的秒数 | ||
|- | |- | ||
| | config['default_news_url'] | | | config['default_news_url'] | ||
| [RSSFEED URL] | | [RSSFEED URL] | ||
| | | 例如. 'http://www.nu.nl/rss/algemeen' | ||
如果无效, 尝试在 URL 前面增加 <nowiki>'https://cors-anywhere.herokuapp.com/'</nowiki> (i.e. <nowiki>'https://cors-anywhere.herokuapp.com/http://www.nu.nl/rss/algemeen'</nowiki>) | |||
|- | |- | ||
| config['news_scroll_after'] | | config['news_scroll_after'] | ||
| [SECONDS] | | [SECONDS] | ||
| | | 输入滚动时间 (delay) | ||
|- | |- | ||
| config['standby_after'] | | config['standby_after'] | ||
| 0 / [MINUTES] | | 0 / [MINUTES] | ||
| | | 输入保留时间: 5 (5 分钟) | ||
|- | |- | ||
| config['auto_swipe_back_to'] | | config['auto_swipe_back_to'] | ||
| [SCREEN NR] | | [SCREEN NR] | ||
| | | 当没有活动的时候, 回滚到选择的页面 | ||
|- | |- | ||
| config['auto_swipe_back_after'] | | config['auto_swipe_back_after'] | ||
| [SECONDS] | | [SECONDS] | ||
| | | 定义回滚到指定页面的时间 | ||
|- | |- | ||
| config['auto_slide_pages'] | | config['auto_slide_pages'] | ||
| false / [SECONDS] | | false / [SECONDS] | ||
| | | 每 x 秒循环并改变页面, 设置config['auto_swipe_back_after'] = 0 | ||
|- | |- | ||
| config['slide_effect'] | | config['slide_effect'] | ||
| 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' | | 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' | ||
| | | 控制你喜欢的屏幕滑块效果 | ||
|- | |- | ||
| config['standard_graph'] | | config['standard_graph'] | ||
| [HOUR/MONTH/DAY] | | [HOUR/MONTH/DAY] | ||
| | | Dashticz 仪表板上显示的默认图形 | ||
|- | |- | ||
| config['language'] | | config['language'] | ||
| [LANGUAGE] | | [LANGUAGE] | ||
| | | Dashticz 的语言 | ||
|- | |- | ||
| config['timeformat'] | | config['timeformat'] | ||
| [TIMEFORMAT] | | [TIMEFORMAT] | ||
| | | 配置时间显示格式 - Default: 'DD-MM-YY HH:mm' | ||
|- | |- | ||
| config['calendarformat'] | | config['calendarformat'] | ||
| [CALENDARFORMAT] | | [CALENDARFORMAT] | ||
| | | 配置日历 Date/Time 格式 - Default: 'dd DD.MM HH:mm' | ||
|- | |- | ||
| config['calendarlanguage'] | | config['calendarlanguage'] | ||
第176行: | 第176行: | ||
| config['calendarurl'] | | config['calendarurl'] | ||
| [URL] | | [URL] | ||
| | | 配置日历的 URL, 如果你只有一个日历(ICS) | ||
|- | |- | ||
| config['boss_stationclock'] | | config['boss_stationclock'] | ||
| NoBoss / BlackBoss / RedBoss / ViennaBoss | | NoBoss / BlackBoss / RedBoss / ViennaBoss | ||
| | | 配置时钟类型 - Default: RedBoss | ||
|- | |- | ||
| config['gm_api'] | | config['gm_api'] | ||
| [API KEY] | | [API KEY] | ||
| | | 使用 Google Maps 功能的 API key | ||
|- | |- | ||
| config['gm_latitude'] | | config['gm_latitude'] | ||
| [LATITUDE] | | [LATITUDE] | ||
| | | 输入 Google Maps 中要使用的纬度 | ||
|- | |- | ||
| config['gm_longitude'] | | config['gm_longitude'] | ||
| [LONGITUDE] | | [LONGITUDE] | ||
| | | 输入 Google Maps 中要使用的经度 | ||
|- | |- | ||
| config['gm_zoomlevel'] | | config['gm_zoomlevel'] | ||
第329行: | 第329行: | ||
=== Buttons=== | === Buttons=== | ||
默认情况下,Dashticz v2.0带有几个预定义的按钮。 <br> | |||
框架中的按钮和图片可以打开网页,如新闻网站或者天气预报。<br> | |||
要使用的按钮可以通过 CUSTOM POSITIONING 放在你想要的位置。<br> | |||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
var buttons = {} | var buttons = {} | ||
第346行: | 第346行: | ||
|- | |- | ||
| var buttons = {} | | var buttons = {} | ||
| Mandatory - | | Mandatory - 定义按钮代码块 | ||
|- | |- | ||
| buttons.buienradar | | buttons.buienradar | ||
| width - | | width - 定义按钮的宽度 (default = 12) | ||
isimage (true/false) - | isimage (true/false) - 定义是否要为 buienradar 显示图像 | ||
refreshimage:60000 - | refreshimage:60000 - 定义图像的刷新时间(in ms) | ||
image - | image - 定义想要显示的图像(isimage:true) | ||
url - | url - 定义 buienradar 的 URL 连接(改变你的场景) | ||
|- | |- | ||
| buttons.radio | | buttons.radio | ||
| width - | | width - 定义按钮的宽度 (default = 12) | ||
image - | image - 定义图片 (default = 'img/radio_on.png') | ||
title- | title- 定义标题 (default = 'Radio') | ||
url - | url - 定义网络电台的 URL (default = 'http://nederland.fm) | ||
|- | |- | ||
| buttons.nunl | | buttons.nunl | ||
| width | | width - 定义按钮的宽度 (default = 12) | ||
icon - | icon - 定义按钮图标 (default = 'fa-newspaper-o') | ||
title - | title - 定义标题 (default = 'Nu.nl') | ||
url - | url - 定义 nu.nl 的URL (default = 'http://www.nu.nl') | ||
|- | |- | ||
| buttons.webcam | | buttons.webcam | ||
| width - | | width - 定义按钮的宽度 (default = 12) | ||
isimage (true/false) - | isimage (true/false) - 定义是否要为 webcam 显示图像 | ||
refreshimage:2000 - | refreshimage:2000 - 定义图像的刷新时间 (in ms) | ||
image - | image - 定义你想要显示的图像 (isimage:true) | ||
url - | url - 为 webcam 定义 URL (改变你的场景) | ||
|- | |- | ||
| buttons.log | | buttons.log | ||
第386行: | 第386行: | ||
{| width="40%" | {| width="40%" | ||
|- valign="top" | |- valign="top" | ||
| width="16.6%" align="center" | '''Dashticz V2.0 | | width="16.6%" align="center" | '''Dashticz V2.0 主页''' | ||
| width="16.6%" align="center" | ''' | | width="16.6%" align="center" | '''布局''' | ||
|} | |} | ||
[[Category:Domoticz]] | [[Category:Domoticz]] | ||
[[Category:Customization]] | [[Category:Customization]] |
2018年8月2日 (四) 18:56的最新版本
Dashticz v2.0 可以通过修改 CONFIG.js 文件进行配置
你可以在子目录 [dashticz]\custom 中找到此文件.
小贴士! 如果自定义布局无效,请检查你是否已经取消了 blocks/colums/screens 中所有你想要取消的注释代码。
在以下部分,CONFIG.js 将被分为不同的章节进行介绍. 每个章节都将说明如何使用.
连接
var config = {}
config['language'] = 'nl_NL'; //or: en_US, de_DE, fr_FR, hu_HU, it_IT, pt_PT, sv_SE
config['domoticz_ip'] = 'http://192.168.1.3:8084';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
Parameter | Description |
---|---|
config['language'] | 可以选择的语言有, 汉语(cn_CN), 捷克语(cz_CZ), 丹麦语(dk_DK), 德语(de_DE), 英语(en_US), 西班牙语(es_ES), 芬兰语(fi_FI), 法语(fr_FR), 匈牙利语(hu_HU), 意大利语(it_IT), 芬兰语(nl_NL), 挪威语(no_NO), 波兰语(pl_PL) 葡萄牙语(pt_PT), 俄语(ru_RU), 斯洛伐克语(sk_SK), 斯洛维尼亚语(si_SI), 瑞典语(sv_SV) 或者乌克兰语(ua_UA) |
config['domoticz_ip'] | 安装的 Domoticz 的 URL 地址(包含正确端口号的地址) |
config['domoticz_refresh'] | Dashticz v2.0仪表盘从 Domoticz 读取信息的刷新率 |
config['dashticz_refresh'] | Dashticz v2.0仪表盘的刷新率 |
Custom Parameters
config['domoticz_ip'] = 'http://192.168.1.3:8084';
config['user_name'] = 'domoticz username';
config['pass_word'] = 'domoticz password';
config['loginEnabled'] = 0;
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = '7';
config['standby_after'] = 0;
config['auto_swipe_back_to'] = 1;
config['auto_swipe_back_after'] = '10';
config['auto_slide_pages'] = 0;
config['slide_effect'] = 'slide';
config['standard_graph'] = 'month';
config['language'] = 'nl_NL';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = 0;
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = 'AIzaSyD9fNWJVBKWzJwwPiovjDYabTFc0n22AAw';
config['gm_zoomlevel'] = 0;
config['gm_latitude'] = 0;
config['gm_longitude'] = 0;
config['wu_api'] = 'a14940b730424939';
config['wu_city'] = 'Eindhoven';
config['wu_name'] = '';
config['wu_country'] = 'NL';
config['idx_moonpicture'] = 0;
config['switch_horizon'] = 0;
config['host_nzbget'] = 'http://192.168.1.3:6789';
config['spot_clientid'] = '1112f16564cf4f4d93ccbe8b52c58a44';
config['selector_instead_of_buttons'] = 0;
config['auto_positioning'] = 1;
config['use_favorites'] = 1;
config['last_update'] = 1;
config['hide_topbar'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['static_weathericons'] = 1;
config['hide_mediaplayer'] = 0;
config['settings_icons'] = ["settings", "fullscreen"];
config['shortdate'] = 'D MMM';
config['longdate'] = 'D MMMM YYYY';
config['shorttime'] = 'HH:mm';
config['longtime'] = 'HH:mm:ss';
config['weekday'] = 'dddd';
config['no_rgb'] = 1;
config['standby_call_url'] = '' ;
config['standby_call_url_on_end'] = '' ;
config['hide_off_button'] = 1;
Paramater | Value | Description |
---|---|---|
config['domoticz_ip'] = | 'http://192.168.1.3:8084'; | 安装 Domoticz 的地址和端口号 |
config['user_name'] = | 'username' | Domoticz 的用户名 |
config['pass_word'] = | 'password' | Domoticz 的密码 |
config['loginEnabled'] = | 0 / 1 | 使能是否想从 dashticz 中登陆 |
config['app_title'] | 'Dashticz' | 仪表盘的名称 - 显示在顶栏(see also: http://www.domoticz.com/wiki/Dashticz_V2_-_Custom_Applications#Module_-_Topbar) |
config['domoticz_refresh'] | [SECONDS] | 从 Domoticz 获取信息的秒数 |
config['dashticz_refresh'] | [SECONDS] | 刷新 Dashticz 仪表盘的秒数 |
config['default_news_url'] | [RSSFEED URL] | 例如. 'http://www.nu.nl/rss/algemeen'
如果无效, 尝试在 URL 前面增加 'https://cors-anywhere.herokuapp.com/' (i.e. 'https://cors-anywhere.herokuapp.com/http://www.nu.nl/rss/algemeen') |
config['news_scroll_after'] | [SECONDS] | 输入滚动时间 (delay) |
config['standby_after'] | 0 / [MINUTES] | 输入保留时间: 5 (5 分钟) |
config['auto_swipe_back_to'] | [SCREEN NR] | 当没有活动的时候, 回滚到选择的页面 |
config['auto_swipe_back_after'] | [SECONDS] | 定义回滚到指定页面的时间 |
config['auto_slide_pages'] | false / [SECONDS] | 每 x 秒循环并改变页面, 设置config['auto_swipe_back_after'] = 0 |
config['slide_effect'] | 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' | 控制你喜欢的屏幕滑块效果 |
config['standard_graph'] | [HOUR/MONTH/DAY] | Dashticz 仪表板上显示的默认图形 |
config['language'] | [LANGUAGE] | Dashticz 的语言 |
config['timeformat'] | [TIMEFORMAT] | 配置时间显示格式 - Default: 'DD-MM-YY HH:mm' |
config['calendarformat'] | [CALENDARFORMAT] | 配置日历 Date/Time 格式 - Default: 'dd DD.MM HH:mm' |
config['calendarlanguage'] | [LANGUAGE] | Controls the weather dates and garbage pickup dates language |
config['calendarurl'] | [URL] | 配置日历的 URL, 如果你只有一个日历(ICS) |
config['boss_stationclock'] | NoBoss / BlackBoss / RedBoss / ViennaBoss | 配置时钟类型 - Default: RedBoss |
config['gm_api'] | [API KEY] | 使用 Google Maps 功能的 API key |
config['gm_latitude'] | [LATITUDE] | 输入 Google Maps 中要使用的纬度 |
config['gm_longitude'] | [LONGITUDE] | 输入 Google Maps 中要使用的经度 |
config['gm_zoomlevel'] | [ZOOMLEVEL] | Enter a number between 1..15 to determine the area shown in the map. 1 = Whole world, higher number smaller are, more detail. |
config['wu_api'] | [API KEY] | Put here your API key for Wundergrond Weather. You can get a API key at https://www.wunderground.com/weather/api/d/pricing.html '. Edit: You can no longer get a free API key from Wunderground' |
config['wu_city'] | [CITY] | Put here your weather city |
config['wu_country'] | [COUNTRY] | Put here your weather country |
config['wu_name'] | [CITY] | Alternative display name of your city |
config['idx_moonpicture'] = 0; | [IDX] | The IDX number from the user variable MoonPicture (see also https://www.domoticz.com/wiki/Dashticz_V2_-_Custom_Applications#Module_-_Moonphases) |
config['switch_horizon'] | [ZIGGO URL] | (Only Dutch users) If you have a Ziggo Horizon box, you can add this here |
config['host_nzbget'] | [IP ADDRESS:PORT NUMBER] | Configure the IP Address and Portnumber of your NZB Host |
config['spot_clientid'] | [CLIENTID] | Configure your Spotify Client ID (see also https://www.domoticz.com/wiki/Dashticz_V2_-_Custom_Applications#Module_-_Spotify) |
config['selector_instead_of_buttons'] | 0 / 1 | Show selector as buttons (0) or dropdown menu (1) |
config['auto_positioning'] | 0 / 1 | Configure the ability to define your own positioning for the buttons (in combination with config['use_favorites']) |
config['use_favorites'] | 0 / 1 | If use auto positioning, then this item should be 1 |
config['last_update'] | 0 / 1 | Show when the device is updated for the last time |
config['hide_topbar'] | 0 / 1 | Hide or Show topbar (see also: http://www.domoticz.com/wiki/Dashticz_V2_-_Custom_Applications#Module_-_Topbar) |
config['hide_seconds'] | 0 / 1 | Show the seconds of the clock |
config['hide_seconds'] | 0 / 1 | Configure if you like to show seconds in the Time (Titlebar / block) |
config['hide_seconds_stationclock'] | 0 / 1 | Configure if you like to show seconds in the StationClock |
config['use_fahrenheit'] | 0 / 1 | Select temperature in Celcius (Default) of Fahrenheit |
config['use_beaufort'] | 0 / 1 | Use Bft instead of m/s for windspeed |
config['translate_windspeed'] | 0 / 1 | For windspeed use north northwest instead of NNW |
config['static_weathericons'] | 0 / 1 | Use Static or 'moving' weather icons |
config['hide_mediaplayer'] | 0 / 1 | When you have a mediaplayer connected, hide it when nothing is playing |
config['selector_instead_of_buttons'] | 0 / 1 | Use buttons for the selector switch in stead of the dropdown menu |
config['settings_icons'] | ["settings", "fullscreen"] | Show the given icons if the settings block is selected. Available: "settings", "fullscreen" |
config['shortdate'] | 'D MMM' | Short format for dates, see https://momentjs.com/ for all options. |
config['longdate'] | 'D MMMM YYYY' | Long format for dates, see https://momentjs.com/ for all options. |
config['shorttime'] | HH:mm | Short format for time, see https://momentjs.com/ for all options. |
config['longtime'] | HH:mm:ss | Long format for time, see https://momentjs.com/ for all options. |
config['weekday'] | 'dddd' | Format to show the weekday, see https://momentjs.com/ for all options. |
config['no_rgb'] | 0 / 1 | Hide or show RGB button on switch |
config['standby_call_url'] | [URL] | Enter the url for adjusting the brightness when entering stand-by mode |
config['standby_call_url_on_end'] | [URL] | Enter the url for adjusting the brightness when exiting stand-by mode |
config['hide_off_button'] | 0 / 1 | Hide off button of selector switch |
Buttons
默认情况下,Dashticz v2.0带有几个预定义的按钮。
框架中的按钮和图片可以打开网页,如新闻网站或者天气预报。
要使用的按钮可以通过 CUSTOM POSITIONING 放在你想要的位置。
var buttons = {}
buttons.buienradar = {width:12, isimage:true, refreshimage:60000, image: 'http://api.buienradar.nl/image/1.0/RadarMapNL?w=285&h=256', url: 'http://www.weer.nl/verwachting/nederland/son/189656/'}
buttons.radio = {width:12, image: 'img/radio_on.png', title: 'Radio', url: 'http://nederland.fm'}
buttons.nunl = {width:12, icon: 'fa-newspaper-o', title: 'Nu.nl', url: 'http://www.nu.nl'}
buttons.webcam = {width:12, isimage:true, refresh:2000, image: 'http://ip_url_to_webcam', url: 'http://ip_url_to_webcam'}
buttons.log = {key:'log', width:12, icon:'fa-microchip', title: 'Domoticz Log', log:true, level: 2}
Parameter | Description |
---|---|
var buttons = {} | Mandatory - 定义按钮代码块 |
buttons.buienradar | width - 定义按钮的宽度 (default = 12)
isimage (true/false) - 定义是否要为 buienradar 显示图像 refreshimage:60000 - 定义图像的刷新时间(in ms) image - 定义想要显示的图像(isimage:true) url - 定义 buienradar 的 URL 连接(改变你的场景) |
buttons.radio | width - 定义按钮的宽度 (default = 12)
image - 定义图片 (default = 'img/radio_on.png') title- 定义标题 (default = 'Radio') url - 定义网络电台的 URL (default = 'http://nederland.fm) |
buttons.nunl | width - 定义按钮的宽度 (default = 12)
icon - 定义按钮图标 (default = 'fa-newspaper-o') title - 定义标题 (default = 'Nu.nl') url - 定义 nu.nl 的URL (default = 'http://www.nu.nl') |
buttons.webcam | width - 定义按钮的宽度 (default = 12)
isimage (true/false) - 定义是否要为 webcam 显示图像 refreshimage:2000 - 定义图像的刷新时间 (in ms) image - 定义你想要显示的图像 (isimage:true) url - 为 webcam 定义 URL (改变你的场景) |
buttons.log | key:'log', width:12, icon:'fa-microchip', title: 'Domoticz Log', log:true, level: 2 |
Dashticz V2.0 主页 | 布局 |