Page 85 of 184

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

Posted: Saturday 29 April 2017 20:12
by b00n
Use it like this:

Code: Select all

blocks[21]['hide_lastupdate'] = true;

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

Posted: Saturday 29 April 2017 20:28
by koowee
b00n wrote:Use it like this:

Code: Select all

blocks[21]['hide_lastupdate'] = true;
Thanks!

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

Posted: Saturday 29 April 2017 20:33
by Ierlandfan
Moonproblem troubleshooting:

First: Check the actual data

sudo curl http://api.wunderground.com/api/api-key ... -city.json
Example (without api-key)
sudo curl http://api.wunderground.com/api/api-key ... erdam.json

And see whetther the phrase that gives you a "nill" (empty as in doesn't exist) value is present.

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

Posted: Saturday 29 April 2017 20:46
by EdwinK
Ierlandfan wrote:Moonproblem troubleshooting:

First: Check the actual data

sudo curl http://api.wunderground.com/api/api-key ... -city.json
Example (without api-key)
sudo curl http://api.wunderground.com/api/api-key ... erdam.json

And see whetther the phrase that gives you a "nill" (empty as in doesn't exist) value is present.

This is the output for my location

Code: Select all

{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "astronomy": 1
  }
	}
		,	"moon_phase": {
		"percentIlluminated":"15",
		"ageOfMoon":"4",
		"phaseofMoon":"Waxing Crescent",
		"hemisphere":"North",
		"current_time": {
		"hour":"20",
		"minute":"45"
		},
		"sunrise": {
		"hour":"6",
		"minute":"16"
		},
		"sunset": {
		"hour":"21",
		"minute":"03"
		},
		"moonrise": {
		"hour":"8",
		"minute":"45"
		},
		"moonset": {
		"hour":"",
		"minute":""
		}
	},
	"sun_phase": {
		"sunrise": {
		"hour":"6",
		"minute":"16"
		},
		"sunset": {
		"hour":"21",
		"minute":"03"
		}
	}
}
So, there is some data to be written

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

Posted: Saturday 29 April 2017 20:58
by Ierlandfan
@Edko66

Code: Select all

2017-04-29 18:35:00.223 Error: EventSystem: in Regen Verwacht: [string "local RainTextIDX = 113 -- your domoticz te..."]:13: attempt to index global 'file' (a nil value) 
This seems an typo in your script. Did you forgot a ' after IDX = 113 ? Like in the moon_script for example

Code: Select all

local idxmoonage ='131' 
Observe the opening ' and the closing ' between 131

Code: Select all

2017-04-29 18:35:00.495 Error: EventSystem: in Moon: [string "-- Variables to customize..."]:54: attempt to index global 'file' (a nil value)
Same as above or a typo since this is a rem (debug, explanation line) on top.

Code: Select all

2017-04-29 18:35:37.130 Error: Logitech Media Server: No response from server 192.168.0.10:9000
Your Logitech is off or service isn't started

It's probably something that's easy to look over (Happens to me every so often when changing a value too fast)

Edit: I hate typo's in my own post so that's why the edit.

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

Posted: Saturday 29 April 2017 21:00
by EdwinK
I know. I just installd a new router and now Logitech can't connect anymore. That will be fixed later :)

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

Posted: Saturday 29 April 2017 21:02
by EdwinK
Ierlandfan wrote:@Edko66
[ice isn't started

It's probably something that's eassy to look over (Happens to me every so often when changing a value too fast)

Checking this after some tv-time :)

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

Posted: Saturday 29 April 2017 21:25
by mvveelen
EdKo66 wrote:
Ierlandfan wrote:Moonproblem troubleshooting:

First: Check the actual data

sudo curl http://api.wunderground.com/api/api-key ... -city.json
Example (without api-key)
sudo curl http://api.wunderground.com/api/api-key ... erdam.json

And see whetther the phrase that gives you a "nill" (empty as in doesn't exist) value is present.

This is the output for my location

Code: Select all

{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "astronomy": 1
  }
	}
		,	"moon_phase": {
		"percentIlluminated":"15",
		"ageOfMoon":"4",
		"phaseofMoon":"Waxing Crescent",
		"hemisphere":"North",
		"current_time": {
		"hour":"20",
		"minute":"45"
		},
		"sunrise": {
		"hour":"6",
		"minute":"16"
		},
		"sunset": {
		"hour":"21",
		"minute":"03"
		},
		"moonrise": {
		"hour":"8",
		"minute":"45"
		},
		"moonset": {
		"hour":"",
		"minute":""
		}
	},
	"sun_phase": {
		"sunrise": {
		"hour":"6",
		"minute":"16"
		},
		"sunset": {
		"hour":"21",
		"minute":"03"
		}
	}
}
So, there is some data to be written
But, not all data: the "moonset" is empty. And I think THAT is causing the problem that all other values aren't written. So, maybe the script should have a 'failsafe': when data is missing, keep reading until the next value and write that value in the corresponding place, etc.

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

Posted: Saturday 29 April 2017 22:17
by robgeerts
SuperMouse wrote: https://drive.google.com/file/d/0B3pz_b ... c4bVE/view
Use them on a starry background and there you go !
Thanks, added them to latest beta!

htilburgs wrote: For my iPhone location, it will show ON instead of the location.
Can you look into this? User @poudenes has the same problem.
In latest beta, you should see the value!

madrian wrote:
I see that you guys are working on the 2 hours time difference, but now at least I can see the calendar.
Now, we have more than 1 calendar (private, work, kids). Would it be possible to merge them?
1, work released, waiting for Rob to merge request.
2, this is a thing what Rob can do quickly, because only he has the super power.
Time fix is merged, try latest beta!
I will fix the multiple calendars, stay tuned!

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

Posted: Saturday 29 April 2017 22:51
by robgeerts
madrian wrote:
I see that you guys are working on the 2 hours time difference, but now at least I can see the calendar.
Now, we have more than 1 calendar (private, work, kids). Would it be possible to merge them?
1, work released, waiting for Rob to merge request.
2, this is a thing what Rob can do quickly, because only he has the super power.
Fixed in latest beta:

add in config.js:

Code: Select all

var calendars = {}
calendars.business = { title: 'Zakelijk', icalurl: 'http://callurl1' }
calendars.private = { title: 'Privé', icalurl: 'http://callurl2' }
And define them in a column like:

Code: Select all

columns[1]['blocks'] = [calendars.business,calendars.private]

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

Posted: Saturday 29 April 2017 23:01
by madrian
See guys, I could worked on this on whole day, but this gold guy knows his job. :)

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

Posted: Saturday 29 April 2017 23:04
by robgeerts
Yeah, but please test....

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

Posted: Saturday 29 April 2017 23:24
by madrian
robgeerts wrote:Yeah, but please test....
It's working, but:

You either use:

Code: Select all

var _ICALENDAR_URL			= 'https://crossorigin.me/https://calendar.g......ics';
+
columns[3]['blocks'] = ['icalendar'];
or the new type:

Code: Select all

var calendars = {}
calendars.business = { title: 'Business', icalurl: 'https://crossorigin.me/https://calendar.g......ics' }
calendars.private = { title: 'Private', icalurl: 'webcal://......ics' }

+
columns[3]['blocks'] = ['calendars.business','calendar.private'];
do not use:

columns[3]['blocks'] = ['calendars.business','calendar.private','icalendar']; --> it not going to work and calendar will be not load.

+title is a little bit too big:
Screen-Shot-2017-04-29-23-27-17.png
Screen-Shot-2017-04-29-23-27-17.png (51.94 KiB) Viewed 1686 times
I imagined title in the box itself, something like this (font-weight: 900 + padding-bottom: 5px):
Screen-Shot-2017-04-29-23-30-52.png
Screen-Shot-2017-04-29-23-30-52.png (31.2 KiB) Viewed 1686 times

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

Posted: Saturday 29 April 2017 23:25
by madrian
+at this moment Apple Calendar is broken, because of: https://github.com/robgeerts/dashticz_v ... -298194264

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

Posted: Sunday 30 April 2017 5:18
by poudenes
poudenes wrote:Hi Guys,

Suddenly i got errors for the Moon...:

Error: EventSystem: in MOON 17.04.27: [string "-- Variables to customize -------------------..."]:136: attempt to concatenate global 'moonsetMinute' (a nil value)

It worked, didn't do anything about scripting of testing... it started .....
And suddenly its working again... See 1 or 2 errors but have accurate info now. So seems something with wunderground....

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

Posted: Sunday 30 April 2017 10:34
by mvveelen
madrian wrote:+at this moment Apple Calendar is broken, because of: https://github.com/robgeerts/dashticz_v ... -298194264
True.

I'm using:

Code: Select all

var calendars = {}
calendars.business = { title: 'Samen', icalurl: 'https://p9-calendars.icloud.com/published/2/nuh36ehiydwgreggsgdef_DSgEIaCw_Tv6VZAn0xMLLCMhlEE-RIreVpahV4zKT-fE_XyvWaKHmFSf4cTYEptui-tRa1buriW7k' }
calendars.private = { title: 'Shayna', icalurl: 'webcal://p3-calendarws.icloud.com/ca/subscribe/1/bknN4a2idziGc9c-aovFkgAbSxMoQI2e0tAhOcMfsegeefvHAX4BGQWLky6D0zegjfYzfclMpDEZlXKTgwztQnah7Lxm6Yof9Q' }
And:

Code: Select all

columns[6] = {}
columns[6]['blocks'] = [calendars.business,calendars.private,'clock',buttons.buienradar,'news_1']
columns[6]['width'] = 2; 
and all I see is the 2 headers.

-question: do the 2 var's have to be called calendars.business / calendars.private or can we use other var's / names ? And, is it (at the moment) limited to 2? Because we also have a 'Birthday' calendar: this calendar uses input from our contacts to display the birthdays and age of our contacts.

For now the Apple calendar-users have to wait until there is a fix, right?

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

Posted: Sunday 30 April 2017 11:06
by Ierlandfan
and all I see is the 2 headers.
Same here using Google calendar.
Tried both solutions.

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

Posted: Sunday 30 April 2017 11:14
by madrian
Apple Calendar is broken in the new "style". Interesting that it works fine in the old style (I mean _ICALENDAR_URL). I am trying to fix it.

Google Calendar works, you must add https://crossorigin.me/ before the url.

----

Apple Calendar works too, but you must replace original webcal protocol with https:// + add crossorigin.me as prefix:

calendars.private = { title: 'Otthon', icalurl: 'https://crossorigin.me/https://p56-cale ... cloud.com/


Originally it was built into the code, but Rob doesn't want to hardcode crossorigin.me. I am working on a fix so you at least do not have to replace webcal with https://, but you still need to add crossorigin.me...so....


----
Edit, found the problem

Multiple calendar definitions broke the code.

Code: Select all

calendars.private = { title: 'Otthon', icalurl: 'https://xyxyxyxyxyx' }
calendars.business = { title: 'Business', icalurl: 'https://calendar.google.com/basic.ics' }
...
only the lower calendar is working...

It's time to fix this.

---

Edit 2:

It seems like Rob forgot to make a loop for calendars variable, so only the last is used. :)

Please wait patiently for a fix from @Rob.

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

Posted: Sunday 30 April 2017 11:34
by Ierlandfan
For the moonscript we can insert some extra error checking like:

Code: Select all

-- if the string moonrise, hour, minute is present (!="nill") AND their value is not empty, (!="")
if string.find(s, [["moonrise": {"hour":"(%d+)","minute":"(%d+)"]]) !="nill" && string.match(s, [["moonrise": {"hour":"(%d+)","minute":"(%d+)"]]) != ""
moonriseHour, moonriseMinute = string.find(s, [["moonrise": {"hour":"(%d+)","minute":"(%d+)"]]) 
if debug then print("Moonrise:\t"..moonriseHour..":"..moonriseMinute)
else 
-- Give the values a value of N/A, continue script, throw warning
moonriseHour, moonriseMinute = "N/A"
if debug then print("Moonrise warning:\t"..moonriseHour..":"..moonriseMinute)
end
Then extend this for all the values that needs te be present
This is not tested lua so it will probably missing some brackets or some () here and there

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

Posted: Sunday 30 April 2017 12:52
by Blueone
In my dashboard I want one block with a bigger font for the icon and title, does someone know how to do this:

This currently the html code of the block:

Code: Select all

<div class="mh transbg block_85_1 col-xs-6"><div class="col-xs-4 col-icon"><em class="fa fa-thermometer-half"></em></div><div class="col-xs-8 col-data"><strong class="title">21,0°C</strong><br><span>Woonkamer</span></div></div>
Can I add something in the custom.css specific for this block?

I also having some issues with the graphs. I have a log short log period of 7 days but the dashboard can't handle this. Currently is shows as this:
2017-04-30 12_50_44-Dashticz.png
2017-04-30 12_50_44-Dashticz.png (141.23 KiB) Viewed 1591 times
In can't be read and the most of the time dashtics crashes because is probably to much information to show. Maybe this can be improved :).

I also noticed something with the moonphase, the icon isn't corresponding with the moon, I live in the Area of Eindhoven and if I look up the moon is more lighted then the picture. Today it illuminated for 21% with corresponds to the real moon, but the corresponding picutre (moon 60) is only showing about 10% of the moon.