Dashticz - General Discussions

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Locked
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:Yes, I even triple checked it. Just to be sure I put in the full path to the Moon.tmp file, '../var/packages/domoticz/scripts/lua/tmp/Moon.tmp', checked the permissions of that file (777). My Rain.tmp uses the same path (different file, of course) and that is working. It has to have something to do with permissions, but can't figure it out now. And since I'm now working on it for about 8 hours, going to bed, and will think more tomorrow.
Hmmm, a thought on that: have you checked the output from a direct call to Wunderground (eg.: in a putty session issueing the same command as the script would)?
This is what I get. At first I thought maybe it's because of the double '/' in the URL, but it seems to work.

Code: Select all

root@DiskStation:~# curl http://api.wunderground.com/api/APIKEY/astronomy/q//Rhoon.json

{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "astronomy": 1
  }
	}
		,	"moon_phase": {
		"percentIlluminated":"14",
		"ageOfMoon":"26",
		"phaseofMoon":"Waning Crescent",
		"hemisphere":"North",
		"current_time": {
		"hour":"9",
		"minute":"23"
		},
		"sunrise": {
		"hour":"6",
		"minute":"28"
		},
		"sunset": {
		"hour":"20",
		"minute":"53"
		},
		"moonrise": {
		"hour":"5",
		"minute":"26"
		},
		"moonset": {
		"hour":"16",
		"minute":"56"
		}
	},
	"sun_phase": {
		"sunrise": {
		"hour":"6",
		"minute":"28"
		},
		"sunset": {
		"hour":"20",
		"minute":"53"
		}
	}
}
Last edited by EdwinK on Sunday 23 April 2017 10:18, edited 1 time in total.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

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

Post by robgeerts »

That seems ok!
Remove your api key ;)

I really think its your tempfile, it gets the data but cannot write correctly...
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 »

Would it make a change if I put the script inside the /scripts/lua folder instead of in the events tab.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

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

Post by robgeerts »

Yeah or setup a cronjob
User avatar
wizjos
Posts: 78
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:Would it make a change if I put the script inside the /scripts/lua folder instead of in the events tab.
For me, on a synology a well, the latter is not an option. I can place a script there, but it does nothing...
I agree with @robgeerts that it's probably a matter of rights...
Sure you have the lua script set up like this?
event.PNG
event.PNG (51.23 KiB) Viewed 1859 times
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

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

Post by SwordFish »

This is a very nice update with the swipe and stuff :D
One question, how do i remove the dots on the bottom page? When i have swipe i don't need the dots 8-)
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

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

Post by maluko »

SwordFish wrote:This is a very nice update with the swipe and stuff :D
One question, how do i remove the dots on the bottom page? When i have swipe i don't need the dots 8-)
good question :)
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

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

Post by SwordFish »

Also noticed that the train and traffic isn't working?
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 »

SwordFish wrote:Also noticed that the train and traffic isn't working?
Just wanted to ask the same, my news and traffic aren't working anymore.
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

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

Post by SwordFish »

Dropshot wrote:
SwordFish wrote:Also noticed that the train and traffic isn't working?
Just wanted to ask the same, my news and traffic aren't working anymore.
I think there down, just did a test with a older version and there is it also not working :?
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

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

Post by SwordFish »

maluko wrote:
SwordFish wrote:This is a very nice update with the swipe and stuff :D
One question, how do i remove the dots on the bottom page? When i have swipe i don't need the dots 8-)
good question :)
Found it ( i think)

Code: Select all

.swiper-pagination-bullet 
{
	display: none !important;
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 100%;
    background: #000;
    opacity: .2;
}
This is working
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:Would it make a change if I put the script inside the /scripts/lua folder instead of in the events tab.
For me, on a synology a well, the latter is not an option. I can place a script there, but it does nothing...
I agree with @robgeerts that it's probably a matter of rights...
Sure you have the lua script set up like this?event.PNG
Screen Shot 2017-04-23 at 11.15.23.png
Screen Shot 2017-04-23 at 11.15.23.png (31.84 KiB) Viewed 1843 times
(Changed 'time' to 'all')
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Maartenkr
Posts: 15
Joined: Sunday 18 September 2016 23:56
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7196
Location: Hellevoetsluis
Contact:

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

Post by Maartenkr »

I dont se the picture of the moon fase in the dasboard.

First i had a fault i forgote the pictures. now ia add them but no picture?
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

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

Post by maluko »

SwordFish wrote:
maluko wrote:
SwordFish wrote:This is a very nice update with the swipe and stuff :D
One question, how do i remove the dots on the bottom page? When i have swipe i don't need the dots 8-)
good question :)
Found it ( i think)

Code: Select all

.swiper-pagination-bullet 
{
	display: none !important;
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 100%;
    background: #000;
    opacity: .2;
}
This is working
you can put this on custom.css

Code: Select all

.swiper-pagination-bullet {
    width: 0px;
    height: 0px;
}
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:Together with @robgeerts I've created the possibility to read Wunderground's moonphase data. It will be released in the upcoming version...

Image

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.
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 »

@Rob,
Dashboard.jpg
Dashboard.jpg (101.8 KiB) Viewed 1823 times
1, Can you please change title order for percentage and fertility (General-Custom Sensor) type device (red arrow, blue arrow)?

Percentage:

Code: Select all

{
         "BatteryLevel" : 93,
         "CustomImage" : 0,
         "Data" : "54.00%",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "Dummy",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveTimeout" : true,
         "Image" : "Computer",
         "LastUpdate" : "2017-04-23 12:10:09",
         "Name" : "MiFlora1_moisture",
         "SubType" : "Percentage",
         "Type" : "General",
         "TypeImg" : "hardware",
         "Unit" : 1,
         "Used" : 1,
         "idx" : "41"
      },
Fertility:

Code: Select all

 {
         "Data" : "788 Fertility",
         "HardwareName" : "Dummy",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "Image" : "Custom",
         "LastUpdate" : "2017-04-23 12:10:09",
         "Name" : "MiFlora1_fertility",
         "SensorType" : 1,
         "SensorUnit" : "Fertility",
         "ShowNotifications" : true,
         "SubType" : "Custom Sensor",
         "Type" : "General",
         "TypeImg" : "Custom",
         "Unit" : 1,
         "Used" : 1,
         "idx" : "42"
      },
2, add missing FA icon for fertility type sensor. We should use this one.
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 »

Hello all.

Just saying this Dashticz v2.0 is really really greet to play with an looks very nice.
Mayby it is an idea to create a new post and 'show off' you Dashticz?

My question: is it also possible to alter the 'data' value or to clear it totally?

Now I am using green for home and red for away:

See custom css:

.fa.fa-female.on {color: green}
.fa.fa-female.off {color: red}

I think this would look nicer.
Attachments
femkethuis.png
femkethuis.png (9.7 KiB) Viewed 1813 times
Last edited by SuperMouse on Sunday 23 April 2017 13:05, edited 3 times in total.
User avatar
wizjos
Posts: 78
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: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
virtual devices.PNG (18.4 KiB) Viewed 1811 times
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
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

SuperMouse wrote:Hello all.

Just saying this Dashticz v2.0 is really really greet to play with an looks very nice.
Mayby it is an idea to create a new post and 'show off' you Dashticz?
A new topic with "show off" your Dashticz v2 would be nice, BUT.....with exactly a how-to. So, if someone has something added or changed, simply write down how you did it so others can use it.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
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 »

I will start mine with some print screens and exports of the custom.css and config.js
I need to clean up the code and make some pictures first :P

Here it is:
Show your Dashticz v2.0 and how-to's!

https://www.domoticz.com/forum/viewtopi ... =8&t=17242
Last edited by SuperMouse on Sunday 23 April 2017 16:54, edited 1 time in total.
Locked

Who is online

Users browsing this forum: No registered users and 1 guest