跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
Wiki首页
Domoticz 中文站
Domoticz 论坛
Domoticz Github
随机页面
特殊页面
特殊页面
所有页面
分类
最近更改
Domoticz
搜索
搜索
登录
个人工具
登录
查看“Dashticz V2 - Custom Applications”的源代码
页面
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
←
Dashticz V2 - Custom Applications
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
___TOC___ === Module - Moonphases === [[File:moonphase.png]] <br><br> First create a lua script '''(example: script_time_moon.lua)''' with the following code <nowiki> -- Variables to customize ------------------------------------------------ local moonpicture = "MoonPicture" -- name of the uservar to write the name of the moonphase picture to local checkvar = "MoonphaseCheck" -- name of the uservar to check if update is allowed local checktime = 3600 -- check allowed every x seconds 3600 = 60 min. Check the wundergroud API limitation before changing this local city = "<your town>" -- Your city for Wunderground API local countryCode = "<YOUR COUNTRY CODE>" -- Your country code for Wunderground API 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 local wuAPIkey = "<your key>" -- Your Weather Underground API Key local DOMO_IP = "<your domo ip>" -- Domoticz ip address local DOMO_PORT = "<your domo port>" -- Domoticz port local tempfilename = '/var/tmp/phase.tmp' -- can be anywhere writeable (chmod 744) local debug=false -- false, true for domoticz log ------------------------------------------------------------------------- function file_exists(path) -- function to check if a file exists local file = io.open(path, "rb") if file then file:close() end return file ~= nil end function timedifference(s) -- function to determine the difference in seconds between the current time and a given one year = string.sub(s, 1, 4) month = string.sub(s, 6, 7) day = string.sub(s, 9, 10) hour = string.sub(s, 12, 13) minutes = string.sub(s, 15, 16) seconds = string.sub(s, 18, 19) t1 = os.time() t2 = os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds} difference = os.difftime (t1, t2) return difference end function may_update(device, timeelapsed) -- function to check whether an update is allowed return uservariables_lastupdate[device] == nil or timedifference(uservariables_lastupdate[device]) >= timeelapsed end commandArray = {} time = os.date("*t") url='http://api.wunderground.com/api/'..wuAPIkey..'/astronomy/q/'..countryCode..'/'..city..'.json' if (may_update(checkvar,checktime)==true) or (file_exists(tempfilename)==false) then -- read API Wunderground if debug then print("Moonphase - Collecting data from: "..url) end os.execute('curl -s '..url..' > '..tempfilename) -- NOTE: if the command above doens't work in your situation try -- read = os.execute('curl -s -o '..tempfilename..' "'..url..'"') -- instead! Thanks to EdKo66 file = io.open(tempfilename, "r") s= file:read("*a") s = (string.gsub(s, "%c+", "")) file:close() -- moonrise moonriseHour, moonriseMinute = string.match(s, [["moonrise": {"hour":"(%d+)","minute":"(%d+)"]]) if moonriseHour == nil then moonriseHour = '--' end if moonriseMinute == nil then moonriseMinute = '--' end if debug then print("Moonrise:\t"..moonriseHour..":"..moonriseMinute) end -- moonset moonsetHour, moonsetMinute = string.match(s, [["moonset": {"hour":"(%d+)","minute":"(%d+)"]]) if moonsetHour == nil then moonsetHour = "--" end if moonsetMinute == nil then moonsetMinute = "--" end if debug then print("Moonset:\t"..moonsetHour..":"..moonsetMinute) end -- percentage of moon illuminated percentIlluminated = string.match(s, [["percentIlluminated":"(%d+)"]]) if debug then print("Percent:\t"..percentIlluminated.."%") end -- age of moon since last new moon age = string.match(s, [["ageOfMoon":"(%d+)"]]) if debug then print("Age:\t\t"..age) end -- Phase of the moon -- set the moonPhaseIcon to your appropriate icon number (8 x) moonPhase = string.match(s, [["phaseofMoon":"(.-)"]]) if moonPhase=="New Moon" then moonPhase = "Nieuwe maan" is_waxing = true end if moonPhase=="Waxing Crescent" then moonPhase = "Wassende halve maan" is_waxing = true end if moonPhase=="First Quarter" then moonPhase = "Eerste kwartier" is_waxing = true end if moonPhase=="Waxing Gibbous" then moonPhase = "Wassende maan" is_waxing = true end if moonPhase=="Full" then moonPhase = "Volle maan" is_waxing = false end if moonPhase=="Waning Gibbous" then moonPhase = "Afnemende maan" is_waxing = false end if moonPhase=="Last Quarter" then moonPhase = "Laatste kwartier" is_waxing = false end if moonPhase=="Waning Crescent" then moonPhase = "Afnemende halve maan" is_waxing = false end -- calculate moonphase picture if percentIlluminated == '0' then n='50' else if is_waxing==false then picnumber=math.floor(math.abs(percentIlluminated-100)/2) n=tostring(picnumber) if n.length==1 then n='0'+n end else picnumber=math.floor(50+(percentIlluminated/2)) if picnumber == 100 then picnumber=99 end end n=tostring(picnumber) end picture='moon.'..n..'.png' if debug then print('Picture number: '..n..' '..'Picture name: '..picture) end commandArray['Variable:'..checkvar]=moonPhase commandArray['Variable:'..moonpicture]=picture 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} else if debug then print("MoonPhase - Update not allowed: Difference is "..timedifference(uservariables_lastupdate[checkvar]).." seconds") end end return commandArray </nowiki> <small>Remark: this script is based on a script by alexsh1 [https://www.domoticz.com/forum/viewtopic.php?t=107#p87486]<br></small> <br> As you can see there are some (dummy) devices that need to be created in Domoticz. 2 uservariables:<br> {| class="wikitable" ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | User variable ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Type |- | MoonPicture | STRING |- | MoonphaseCheck | STRING |} and 5 devices:<br> {| class="wikitable" ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Hardware ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Name ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Type ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Axislabel |- | Dummy Switch | Moon up | Text | |- | Dummy Switch | Moon under | Text | |- | Dummy Switch | Moonpercentage | Percentage | |- | Dummy Switch | Moon age | Custom Sensor | Days |- | Dummy Switch | Moonphase | Text | |} <br> Now we have to write down the IDX numbers for the 7 devices we've just created.<br> We need these when we're going to edit the moon script.<br> Change the following lines with the according IDX in de moon script: <syntaxhighlight lang="python" line='line'"> local idxmoonpercentage ='xxx' -- Your virtual moon percentage illuminated Device ID local idxmoonage ='xxx' -- Your virtual moon age Device ID local idxmoonphase ='xxx' -- Your virtual moon phase Device ID local idxmoonrise='xxx' -- Your virtual moon rise variable ID local idxmoonset='xxx' -- Your virtual moon set variable ID </syntaxhighlight> <br> After that, change the other remaining parameters: <syntaxhighlight lang="python" line='line'"> local checktime = 3600 -- check allowed every x seconds 3600 = 60 min. Check the wundergroud API limitation before changing this local city = "<your town>" -- Your city for Wunderground API local countryCode = "<YOUR COUNTRY CODE>" -- Your country code for Wunderground API local wuAPIkey = "<your key>" -- Your Weather Underground API Key local DOMO_IP = "<your domo ip>" -- Domoticz ip address local DOMO_PORT = "<your domo port>" -- Domoticz port local tempfilename = '/var/tmp/phase.tmp' -- can be anywhere writeable (chmod 744) local debug=false -- false, true for domoticz log </syntaxhighlight> <br> The last part is editing the '''CONFIG.js''' file from Dashticz v2.0 (/<dashticz folder>/custom/) <br> Add the next variable with the correct IDX number (IDX number from the user variable '''MoonPicture''')<br> <syntaxhighlight lang="python" line='line'"> config['idx_moonpicture'] = IDX_Number; //index of the uservariabele MoonPicture </syntaxhighlight> <br> Add the buttons.moons parameter and place this in a block<br> <syntaxhighlight lang="python" line='line'"> buttons.moon = {width:12, isimage:true, refreshimage:60000, image: 'moon'} columns[5] = {} columns[5]['blocks'] = [buttons.buienradar, buttons.nunl, buttons.radio, buttons.moon] columns[5]['width'] = 6; </syntaxhighlight> Place now the moon script in the /domoticz/scripts/lua directory and let's go!<br> <br> ---- === Module - Garbage Collector === If you want to have a block with next pickup dates for your garbage, add the following to '''CONFIG.js''' (/<dashticz v2 folder>/custom/), and change zipcode & housenumber to the correct data:<br> <syntaxhighlight lang="java"> var config ={} config['garbage_company'] = 'cure'; config['garbage_icalurl'] = 0; config['garbage_zipcode'] = '1234AB'; config['garbage_street'] = 'vuilnisstraat'; config['garbage_housenumber'] = '1'; config['garbage_maxitems'] = '12'; config['garbage_width'] = '12'; config['garbage_hideicon'] = 0; config['garbage_use_names'] = true; config['garbage_use_colors'] = true; config['garbage_icon_use_colors'] = true; config['garbage_use_cors_prefix'] = true; config['garbage'] = { gft: {kliko: 'green', code: '#375b23', name: 'GFT', icon: 'img/garbage/kliko_green.png'}, pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/garbage/kliko_orange.png'}, rest: {kliko: 'grey', code: '#5e5d5c', name: 'Restafval', icon: 'img/garbage/kliko_grey.png'}, papier: {kliko: 'blue', code: '#153477', name: 'Papier', icon: 'img/garbage/kliko_blue.png'}, kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval', icon: 'img/garbage/kliko_red.png'}, brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin', icon: 'img/garbage/kliko_brown.png'}, black: {kliko: 'black', code: '#000000', name: 'Zwart', icon: 'img/garbage/kliko_black.png'}, milieu: {kliko: 'yellow', code: '#f9e231', name: 'Geel', icon: 'img/garbage/kliko_yellow.png'}, kerstboom: {kliko: 'green', code: '#375b23', name: 'Kerstboom', icon: 'img/garbage/tree.png'}, }; </syntaxhighlight> <br> You can change the colors of the trashcan (and/or the complete line) in the section above! <br><br> And define them in a columns like: <syntaxhighlight lang="java"> columns[1]['blocks'] = ['garbage'] </syntaxhighlight> <br> {| class="wikitable" ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Parameter ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Description |- |config['garbage_use_names'] = true; |true / false; shows name from config |- |config['garbage_use_colors'] = true; |true / false; shows coloring for complete line |- |config['garbage_icon_use_colors'] = true; |true / false; shows colored or only white trashcan |- |config['garbage_use_cors_prefix'] |true / false; use the https://cors-anywhere.herokuapp.com/ for getting data from provider |} And define them in a columns like: <syntaxhighlight lang="java"> columns[1]['blocks'] = ['garbage'] </syntaxhighlight> <br> '''Currently supported cities/companies/services:''' ical > iCal<br> ophaalkalender > Ophaalkalender (BE)<br> edg > EDG (DE)<br> deafvalapp > Afval App (NL)<br> afvalwijzerarnhem > Afvalwijzer Arnhem (NL)<br> alphenaandenrijn > Alphen aan de Rijn (NL)<br> avalex > Avalex (NL)<br> gemeenteberkelland > Berkelland (NL)<br> best > Best (NL)<br> circulusberkel > Circulus Berkel (NL)<br> cure > Cure (NL)<br> cyclusnv > Cyclus NV (NL)<br> dar > Dar (NL)<br> gemertbakelmaandag > Gemert-Bakel, maandag (NL)<br> gemertbakeldinsdag > Gemert-Bakel, dinsdag (NL)<br> gemertbakelwoensdag > Gemert-Bakel, woensdag (NL)<br> goes > Goes (NL)<br> hvc > HVC Groep (NL)<br> meerlanden > Meerlanden (NL)<br> mijnafvalwijzer > Mijn Afval Wijzer (NL)<br> recyclemanager > Recycle Manager<br> rmn > RMN (NL)<br> rova > Rova (NL)<br> sudwestfryslan > Sudwest Fryslan (NL)<br> twentemilieu > Twente Milieu (NL)<br> uden > Uden (NL)<br> veldhoven > Veldhoven (NL)<br> vianen > Vianen (NL)<br> waalre > Waalre (NL)<br> <br> ---- ===Module - Calendar=== You can add a block with upcoming events from your ical-calendar (gmail, apple etc.).<br> You have to add the following code into the CONFIG.js file and define them as:<br> <syntaxhighlight lang="css" line='line'"> var calendars = {} calendars.business = { maxitems: 5, url: 'https://calendar.google.com/calendar/', icalurl: 'https://calendar.google.com/calendar/' } calendars.private = { maxitems: 5, icalurl: 'https://calendar.google.com/calendar/' } </syntaxhighlight> <br> Where 'url' is the webaddress of the page to be shown when clicking the block.<br> 'icalurl' is the webaddress to the ical-version of your calendar.<br><br> And define them in a column like:<br> <syntaxhighlight lang="css" line='line'"> columns[1] = {} columns[1]['width'] = 2; columns[1]['blocks'] = [calendars.business,calendars.private] </syntaxhighlight> <br> If you want to combine multiple calendars, add this code: <br> <syntaxhighlight lang="css" line='line'"> calendars.combined = {} calendars.combined.maxitems = 5; calendars.combined.calendars = [ { color:'white',calendar:calendars.business }, { color:'#ccc',calendar:calendars.private } ] calendars.combined.url = 'https://calendar.google.com/calendar'; </syntaxhighlight> <br> And define them in a column like:<br> <syntaxhighlight lang="css" line='line'"> columns[1] = {} columns[1]['width'] = 2; columns[1]['blocks'] = [calendars.combined] </syntaxhighlight> <br> Furthermore you can modify the date-formate and the local if the calendar is not displayed correct:<br> <syntaxhighlight lang="css" line='line'"> var _ICALENDAR_DATEFORMAT = 'DD.MM.YYYY HH:mm'; //'friendly', 'MM.DD.YYYY HH:mm', 'DD.MM.YYYY HH:mm', 'YYYY.MM.DD HH:mm' var _ICALENDAR_LOCALE = 'nl'; //en,hu, etc. </syntaxhighlight> <br><br> ---- ===Module - Public Transport === It is possible to show the timetable of the public transport company VVS (Germany) AND NS (Netherlands) with live data.<br> <br> '''VVS:''' To call the function properly, you will need the correct station id from: https://efa-api.asw.io/api/v1/station/ <br> So for Stuttgart Central Station the station id is 5006118.<br> Then add this to config.js:<br> <syntaxhighlight lang="java" line='line'"> var publictransport = {} publictransport.hbf= { station: '5006118', title:'Trains', show_lastupdate:true, provider: 'VVS', icon: 'train', interval: 15, results: 5 }; </syntaxhighlight> <br> '''9292.nl:''' First get the station id from http://api.9292.nl/0.1/locations?lang=nl-NL&q=eindhoven (Change eindhoven to your own search parameter). <br> Then copy the id! <br> <syntaxhighlight lang="css" line='line'"> //example station id: station-eindhoven var publictransport = {} publictransport.ovinfo= { station: 'station-eindhoven', title:'OV Info', show_lastupdate:true, provider: '9292', icon: 'train', results: 5 }; publictransport.ovinfotrain= { station: 'station-eindhoven', title:'Bus', show_lastupdate:true, provider: '9292-bus', icon: 'bus', results: 5 }; publictransport.ovinfobus= { station: 'station-eindhoven', title:'Trein', show_lastupdate:true, provider: '9292-train', icon: 'train', results: 5 }; </syntaxhighlight> <br> The icon is simply font-awesome without fa, interval = time in seconds for refreshing the data, and results = number of shown results. <br> Also possible is to customize the width, but i would not change the value of 12 because of the size of the output.<br> <br> Font size can be changed by adding this to your custom.css and change to your own preference: <syntaxhighlight lang="css" line='line'"> .publictransport div { font-size: 13px; } </syntaxhighlight> <br><br> ---- ===Radio Plugin=== For those who like to listen to the radio on Dashticz v2.0, there is a Plugin available.<br> Add the following to your CONFIG.js:<br> <syntaxhighlight lang="css" line='line'"> var _STREAMPLAYER_TRACKS = [ {"track":1,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3"}, {"track":2,"name":"538 Hitzone","file":"http://vip-icecast.538.lw.triple-it.nl/WEB11_MP3"}, {"track":3,"name":"Slam! NonStop","file":"http://stream.radiocorp.nl/web10_mp3"}, {"track":4,"name":"100%NL","file":"http://stream.100p.nl/100pctnl.mp3"}, {"track":5,"name":"StuBru","file":"http://mp3.streampower.be/stubru-high.mp3"}, {"track":6,"name":"NPO Radio 1","file":"http://icecast.omroep.nl/radio1-bb-mp3"}, {"track":7,"name":"Omroep Brabant","file":"http://streaming.omroepbrabant.nl/mp3"}, ]; </syntaxhighlight> To enable, use the key: 'streamplayer' in the block definitions! <br> <syntaxhighlight lang="css" line='line'"> columns[2]['blocks'] = [1,4,'streamplayer'] </syntaxhighlight> <br> [[File:streamplayer.jpg]]<br> <br><br> ---- === Run your own "crossorigin.me" proxy service <span style="color:red">(Advanced Users!)</span>=== In some cases the Newsfeed wouldn't load and you get NO results. You have to put https://crossorigin.me/ before the newsfeed-url.<br> You can also run your own "crossorigin.me" proxy service.<br> <br> Install node & npm: <syntaxhighlight lang="python" line='line'"> Install node & npm: curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt-get install -y nodejs sudo curl -L https://www.npmjs.com/install.sh | sh // https://github.com/technoboy10/crossorigin.me.git crossorigin // git clone https://github.com/technoboy10/crossorigin.me.git crossorigin cd crossorigin npm install npm start </syntaxhighlight> You need to make a startup script, so the service will start automatic after a reboot.<br> <br> use: Edit/find port (8080 by default) in the index.js file. <syntaxhighlight lang="python" line='line'"> http://127.0.0.1:8080/https://www.anything.com/ </syntaxhighlight> <br><br> ---- ===Module - Topbar === Added a topbar! Not only to give the dashboard more 'body' but also to add some new functions like a settings-icon. And maybe in the future things like notifications and stuff. <syntaxhighlight lang="java"> config['hide_topbar'] = 0; </syntaxhighlight> <br> Default there will be the name, clock and settings-button presented in the Topbar.<br> You can customize the Topbar with the following settings: <syntaxhighlight lang="java"> var columns = {} columns['bar'] = {} columns['bar']['blocks'] = ['logo','miniclock','settings'] </syntaxhighlight> {| class="wikitable" ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Parameter ! style="font-weight: bold; color: white; background-color: orange; text-align: left;" | Description |- |columns['bar']['blocks'] = ['logo','miniclock','settings'] |logo - Title of Topbar (as defined in config['app_title'] = 'Dashticz';) |- | |miniclock - Clock in Topbar |- | |settings - Settings & Fullscreen button in Topbar |} <br><br> ---- ===Module - Spotify === Add a spotify block to your Dashboard.<br> <br> Before you can use it, create an app on the spotify website: https://developer.spotify.com/my-applic ... ons/create Title: Dashticz Description: whatever ;) On the next page, copy "Client ID" to your CONFIG.js like: <syntaxhighlight lang="java"> config['spot_clientid'] = '1112f16564cf4f4dsd4cbe8b52c58a44'; </syntaxhighlight> At the same page, enter your dashticz-url in the Redirect URIs field, for example:' <syntaxhighlight lang="java"> http://192.168.1.3:8080/ </syntaxhighlight> DONT FORGET TO PUSH THE SAVE BUTTON!! <br> In CONFIG.js, add the block like: <syntaxhighlight lang="java"> columns[2] = {} columns[2]['blocks'] = ['spotify'] columns[2]['width'] = 5; </syntaxhighlight> Currently you can only change playlist, but more functions are coming! <br><br> ---- ===Module - TV Guide (Dutch) === [[File:Dashticz-tv-guide.png]] <br><br> In config.js add: <syntaxhighlight lang="java"> var tvguide = {} tvguide.dutch = { key:'dutch', icon: 'fa-television', width:12, channels: [1,2,3,4,31,46,92], maxitems: 10 } </syntaxhighlight> Note: channels: [1,2,3] => 1,2 and 3 are ChannelID's FIND THE CHANNEL ID IN LIST BELOW: <syntaxhighlight lang="java"> "id":"65", "name":"Animal Planet OUD", "id":"403", "name":"Goed TV", "id":"412", "name":"Film1 Premiere +1", "id":"309", "name":"3voor12 On Stage", "id":"310", "name":"3voor12 Portal", "id":"429", "name":"Oranje TV", "id":"308", "name":"3voor12 Central", "id":"83", "name":"3voor12", "id":"1", "name":"NPO 1", "id":"2", "name":"NPO 2", "id":"3", "name":"NPO 3", "id":"4", "name":"RTL 4", "id":"31", "name":"RTL 5", "id":"36", "name":"SBS 6", "id":"460", "name":"SBS 9", "id":"46", "name":"RTL 7", "id":"37", "name":"NET 5", "id":"34", "name":"Veronica", "id":"92", "name":"RTL 8", "id":"413", "name":"HISTORY", "id":"472", "name":"Crime + Investigation", "id":"438", "name":"TLC", "id":"91", "name":"Comedy Central", "id":"29", "name":"Discovery Channel", "id":"18", "name":"National Geographic", "id":"24", "name":"Film 1 Premiere", "id":"435", "name":"24 Kitchen", "id":"5", "name":"Eén", "id":"6", "name":"Canvas", "id":"440", "name":"Fox", "id":"19", "name":"Eurosport 1", "id":"436", "name":"Eurosport 2", "id":"465", "name":"RTL Z", "id":"466", "name":"Ziggo Sport", "id":"148", "name":"Fox Sports Eredivisie", "id":"99", "name":"Ziggo Sport Select", "id":"419", "name":"Ziggo Sport Golf", "id":"420", "name":"Ziggo Sport Racing", "id":"417", "name":"Extreme Sports Channel", "id":"411", "name":"Film1 Action", "id":"468", "name":"Fox Sport 2", "id":"469", "name":"Fox Sport 3", "id":"470", "name":"Fox Sport 4", "id":"39", "name":"Film1 Family", "id":"107", "name":"Film 1 Sundance", "id":"462", "name":"Shorts TV", "id":"407", "name":"OUTTV", "id":"430", "name":"Film1 Drama", "id":"408", "name":"RTL Lounge", "id":"409", "name":"Rtl crime", "id":"317", "name":"Comedy Family", "id":"437", "name":"Comedy Central Extra", "id":"104", "name":"BBC Entertainment", "id":"464", "name":"BBC First", "id":"315", "name":"CBS Reality", "id":"473", "name":"Viceland", "id":"404", "name":"FOXlife", "id":"25", "name":"MTV", "id":"427", "name":"MTV Brand new", "id":"428", "name":"Brava NL", "id":"89", "name":"Nickelodeon", "id":"21", "name":"Cartoon Network", "id":"424", "name":"Disney Channel", "id":"311", "name":"Disney XD", "id":"312", "name":"Nick Jr.", "id":"313", "name":"Boomerang", "id":"461", "name":"Pebble TV", "id":"416", "name":"Nat Geo Wild", "id":"415", "name":"Travel Channel", "id":"471", "name":"KPN presenteert ", "id":"306", "name":"Discovery Science", "id":"406", "name":"Ons", "id":"305", "name":"Discovery World", "id":"414", "name":"Investigiation discovery", "id":"439", "name":"Animal Planet", "id":"64", "name":"NPO Zapp Xtra \/ NPO Best", "id":"70", "name":"NPO Cultura", "id":"38", "name":"ARTE", "id":"26", "name":"CNN", "id":"422", "name":"Euronews", "id":"86", "name":"BBC World", "name_short":"BBC W" "id":"423", "name":"Al Jazeera Engels", "id":"108", "name":"RTV Noord", "id":"109", "name":"Omrop Fryslân", "id":"110", "name":"RTV Drenthe", "id":"111", "name":"RTV Oost", "id":"112", "name":"Omroep Gelderland", "id":"113", "name":"Omroep Flevoland", "id":"103", "name":"NH", "id":"100", "name":"RTV Utrecht", "id":"101", "name":"RTV West", "name_short":"RTV West" "id":"102", "name":"RTV Rijnmond", "id":"116", "name":"Omroep Zeeland", "name_short":"Zeeland" "id":"114", "name":"Omroep Brabant", "id":"115", "name":"L1 TV", "id":"40", "name":"AT 5", "id":"401", "name":"Playboy TV", "id":"434", "name":"Dusk", "id":"105", "name":"Private Spice", "id":"410", "name":"101 TV", "id":"90", "name":"BVN", "id":"7", "name":"BBC 1", "id":"8", "name":"BBC 2", "id":"301", "name":"BBC 4", "id":"60", "name":"VT4", "id":"49", "name":"VTM", "id":"59", "name":"2BE", "id":"15", "name":"RTBF La 1", "id":"16", "name":"RTBF La 2", "id":"17", "name":"TV 5", "id":"9", "name":"ARD", "id":"10", "name":"ZDF", "id":"12", "name":"WDR Fernsehen", "id":"13", "name":"NDR Fernsehen", "id":"11", "name":"RTL", "id":"28", "name":"Sat 1", "id":"50", "name":"3Sat", "id":"58", "name":"PRO 7", "id":"32", "name":"TRT int.", "id":"467", "name":"Spike", "id":"304", "name":"AMC", </syntaxhighlight> <br><br> ---- ===Module - NZBget === Show your current downloads within the Dashboard.<br> <br> Add to config.js: <syntaxhighlight lang="java"> var _HOST_NZBGET = 'http://192.168.1.3:6789'; </syntaxhighlight> <br> AND in the blocks, add: <syntaxhighlight lang="java"> columns[1]['blocks'] = ['nzbget'] </syntaxhighlight> <br> If you want to use other widths, add this to config: <syntaxhighlight lang="java"> blocks['nzbget'] = {} blocks['nzbget']['width'] = 12; blocks['nzbget']['downloads_width'] = 6; </syntaxhighlight> <br><br> ---- ===Module - Sonarr=== Show your current series within the Dashboard.<br> <br> Add to config.js: <syntaxhighlight lang="java"> config['sonarr_url'] = 'http://sonarrserver:8989'; config['sonarr_apikey'] = '000000000000000000000000000000'; config['sonarr_maxitems'] = 8; </syntaxhighlight> <br> AND in the columns, add: <syntaxhighlight lang="java"> columns[1]['blocks'] = ['sonarr'] </syntaxhighlight> <br> If you want to use extra options, add this to config: <syntaxhighlight lang="java"> blocks['sonarr'] = {} blocks['sonarr']['title'] = 'Sonarr'; blocks['sonarr']['width'] = 8; blocks['sonarr']['title_position'] = 'left'; blocks['sonarr']['view'] = 'banner'; </syntaxhighlight> <br><br> ---- ===Module - Google Maps=== <syntaxhighlight lang="java"> - UPDATE FOLLOWS - </syntaxhighlight> Adding the GM to the dashboard:<br> <syntaxhighlight lang="java"> var maps = {} maps.location = { height: 800, width:12, latitude: 40.4989948, longitude: -3.6610076, zoom:15 } </syntaxhighlight> and used in:<br> <syntaxhighlight lang="java"> columns[3] = {} columns[3]['blocks'] = [maps.location] </syntaxhighlight> <br><br> ---- {| width="20%" |- valign="top" | width="16.6%" align="center" | [[file:dv2-home.png|link=Dashticz_V2]] |} {| width="20%" |- valign="top" | width="16.6%" align="center" | '''Dashticz V2.0 Main Page''' |} [[Category:Domoticz]] [[Category:Customization]]
返回
Dashticz V2 - Custom Applications
。
开关有限宽度模式