Page 80 of 184

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

Posted: Friday 28 April 2017 9:38
by mvveelen
Followed the steps to add the moon phase to the dashboard and now I'm stuck:

In the log I see:

Code: Select all

LUA: MoonPhase - Update not allowed: Difference is xxx seconds
The Moon.tmp file is NOT created in (/volume1/web/tmp/) whereas the tmp folder has CHMOD 777 (where is this Moon.tmp file mentioned in the script ?)

There is a file called 'phase.tmp' with contents.

The URl does give me the right data from Wunderground, so the API key and such are OK I think:

Code: Select all


{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "astronomy": 1
  }
		, "results": [
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "FR",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.5.06251",
		"l": "/q/zmw:00000.5.06251"
		}
		,
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "GE",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.55.06278",
		"l": "/q/zmw:00000.55.06278"
		}
		,
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "GR",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.182.06286",
		"l": "/q/zmw:00000.182.06286"
		}
		,
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "NH",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.1.06244",
		"l": "/q/zmw:00000.1.06244"
		}
		]
	}
}
The LUA script I made is DEVICE-based, not TIME based. Is that OK ? (tried both by the way)

The image in the dashboard isn't displayed, it reads "<img src="img/moon/0?t=1493365024904" style="width:100%;"> so that can't be right.

And also the devices (Utility devices) aren't updated, it reads "Hello world", 0 days, 0 %.

What is the one thing I'm missing here :) ?

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

Posted: Friday 28 April 2017 9:44
by robgeerts
TapNL wrote:
Would it be possible to add a wiki-file / how-to / readme for the extra's some users have made?

For instance:

- The waste calendar: how-to ad the switch, the contents of the lua script, etc.
- The moon add-on: what switches to add (and how), etc (nice, but not really sure HOW to add which switches etc).
- The calendar add-on (most recent)
- How to adjust the height (and witdh) of the traffic
- etc.

We can read this topic, but if it is in the package, then it would me much easier to maintain and find. Right?
I think this is a good idea, and are more then happy to contribute to this.
The way I imagine it is that we make per function as short description in the wiki and keep updating that.
If we create a trello board of functions that need to be fixed and functions that changed we can set this up quite easy.

@Rob: what do you think?
@Others: who wants to participate?
I just switched from Trello to the issue tracker of Github, for several reasons...
The wiki is already there, maintained by @htilburg. Everybody can participate to this wiki to expand the possibilities.
http://www.domoticz.com/wiki/Dashticz-v2

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

Posted: Friday 28 April 2017 9:59
by TapNL
I know you switched. But an overview of items that need updating on the wiki I think the issue tracker on GitHub is not that handy.
Anyway - I will add ome things on the wiki later today.

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

Posted: Friday 28 April 2017 10:04
by TapNL
Is there a way to show in the buienradar a map which is zoomed at a defined POI (your home)
I have been playing with https://www.buienradar.nl/overbuienrada ... s-weerdata - Option 1.4
But I don't seem to get it working.

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

Posted: Friday 28 April 2017 10:22
by bimse
Help with 'streamplayer'

Is there anyone who can help with a lua program that can start and stop playback, as well as choose which program to play with 'streamplayer'.

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

Posted: Friday 28 April 2017 10:25
by EdwinK
mvveelen wrote:Followed the steps to add the moon phase to the dashboard and now I'm stuck:

In the log I see:

Code: Select all

LUA: MoonPhase - Update not allowed: Difference is xxx seconds
The Moon.tmp file is NOT created in (/volume1/web/tmp/) whereas the tmp folder has CHMOD 777 (where is this Moon.tmp file mentioned in the script ?)

There is a file called 'phase.tmp' with contents.
I had the tmp file Moon.tmp, as I found that a better choice. The tmp. file name doesn't really matter.

As mentioned in the PM, change line 51 to read

Code: Select all

    read = os.execute('curl -s -o '..tempfilename..' "'..url..'"')
The URl does give me the right data from Wunderground, so the API key and such are OK I think:

The LUA script I made is DEVICE-based, not TIME based. Is that OK ? (tried both by the way)

The image in the dashboard isn't displayed, it reads "<img src="img/moon/0?t=1493365024904" style="width:100%;"> so that can't be right.

And also the devices (Utility devices) aren't updated, it reads "Hello world", 0 days, 0 %.

What is the one thing I'm missing here :) ?

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

Posted: Friday 28 April 2017 10:29
by mvveelen
Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.

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

Posted: Friday 28 April 2017 10:30
by poudenes
Is it possible to change the font-size of a frame loaded page?

I have now "rijden de treinen" in a frame, but the font-size is bigger than i use for the whole control panel

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

Posted: Friday 28 April 2017 10:32
by EdwinK
mvveelen wrote:Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
Did you set the permissions to 777 for that .tmp file? chmod 0777 phase.tmp

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

Posted: Friday 28 April 2017 10:42
by EdwinK
And all of a sudden (well, sudden for me, looks like the script hasn't been updating since April 22) there is no update anymore in the script.Afval.lua script.


*edit* removed it from the 'scripts' folder and put it in the 'events' box and now it works again.

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

Posted: Friday 28 April 2017 10:44
by mvveelen
EdKo66 wrote:
mvveelen wrote:Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
Did you set the permissions to 777 for that .tmp file? chmod 0777 phase.tmp
Yes, the file permissions are set to 777.....

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

Posted: Friday 28 April 2017 10:47
by EdwinK
mvveelen wrote:
EdKo66 wrote:
mvveelen wrote:Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
Did you set the permissions to 777 for that .tmp file? chmod 0777 phase.tmp
Yes, the file permissions are set to 777.....
Then I really don't know. Maybe user Wizjos will respond.

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

Posted: Friday 28 April 2017 11:05
by mvveelen
I just found out that I also had to change the line with

Code: Select all

var _IDXmoonpicture = 12;
to the right IDX of my setup (i.e. 18), so I changed that.

But the error still remains.

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

Posted: Friday 28 April 2017 11:38
by SwordFish
madrian wrote:It's live, merge request was sent to Rob.

Until he accepts the request, go and find your iCal URL at Google Calendar:

Gear Icon -> Settings -> Calendars Tab -> click on desidered calendar name -> in Private address row click on ical icon and copy your URL.

The plugin (it shows the next 5 events):

Screen-Shot-2017-04-27-23-21-52.png
;)
Verry nice done

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

Posted: Friday 28 April 2017 11:47
by htilburgs
robgeerts wrote:
TapNL wrote:
Would it be possible to add a wiki-file / how-to / readme for the extra's some users have made?

For instance:

- The waste calendar: how-to ad the switch, the contents of the lua script, etc.
- The moon add-on: what switches to add (and how), etc (nice, but not really sure HOW to add which switches etc).
- The calendar add-on (most recent)
- How to adjust the height (and witdh) of the traffic
- etc.

We can read this topic, but if it is in the package, then it would me much easier to maintain and find. Right?
I think this is a good idea, and are more then happy to contribute to this.
The way I imagine it is that we make per function as short description in the wiki and keep updating that.
If we create a trello board of functions that need to be fixed and functions that changed we can set this up quite easy.

@Rob: what do you think?
@Others: who wants to participate?
I just switched from Trello to the issue tracker of Github, for several reasons...
The wiki is already there, maintained by @htilburg. Everybody can participate to this wiki to expand the possibilities.
http://www.domoticz.com/wiki/Dashticz-v2
Currentlly I'm looking at a way to make the Wiki more "clear". Now it's one big page, what does it not easy to read and maintain. If anybody has knowledge of Mediawiki and for example creating "tabs" let me know ;)

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

Posted: Friday 28 April 2017 11:50
by Ierlandfan

Code: Select all

attempt to concatenate global 'moonriseMinute' (a nil value)
Most of the times it means that the value is empty, you can try a

Code: Select all

put the normal code here
if moonriseMinute  == nil then
   moonriseMinute = "N/A"
   print("moonriseMinute -- Error " .. moonriseMinute .."")
   else
put the normal code here
print("moonriseMinute -- Ok " .. moonriseMinute .."")
end
Not sure where moonriseMinute is used but at least the error will be gone

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

Posted: Friday 28 April 2017 11:52
by SwordFish
Martijn85 wrote:
SwordFish wrote:I have dashticz running on a rpi and a tablet on the wall. Now i have dashticz also running on my NAS webserver. So i did some dirty custom css and now its fits on my iphone with a different layout as on my tablet 8-)
Nice! Can you please share this custom css? :D
Sorry for the the late reaction. I Thought i missed something.
The only thing i put extra in the custom.css is

Code: Select all

.col-xs-5 
{
    width: 100% !important;
}

And changed the config file so that its fits the screen.
Noticed that it is running completely separate. So NOT one place for tablet AND iphone

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

Posted: Friday 28 April 2017 11:56
by mvveelen
Ierlandfan wrote:

Code: Select all

attempt to concatenate global 'moonriseMinute' (a nil value)
Most of the times it means that the value is empty, you can try a

Code: Select all

put the normal code here
if moonriseMinute  == nil then
   moonriseMinute = "N/A"
   print("moonriseMinute -- Error " .. moonriseMinute .."")
   else
put the normal code here
print("moonriseMinute -- Ok " .. moonriseMinute .."")
end
Not sure where moonriseMinute is used but at least the error will be gone
Thanks, but when I use this, then the next error appears:

Code: Select all

Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:127: attempt to perform arithmetic on global 'percentIlluminated' (a nil value)
So I don't think this will bring me to a solution. And, if others have it working with the same script, then we shouldn't change the script right? There might be something else I might oversee ?

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

Posted: Friday 28 April 2017 12:02
by madrian
SwordFish wrote:
madrian wrote:It's live, merge request was sent to Rob.

Until he accepts the request, go and find your iCal URL at Google Calendar:

Gear Icon -> Settings -> Calendars Tab -> click on desidered calendar name -> in Private address row click on ical icon and copy your URL.

The plugin (it shows the next 5 events):

Screen-Shot-2017-04-27-23-21-52.png
;)
Verry nice done
Thank you, now it's time to work on Apple Calendar support. I found a workaround to access .ics (from URL), but it's not working at the moment. I must check the ical parser, something is wrong here.

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

Posted: Friday 28 April 2017 13:54
by SwordFish
Just for me, iCal isn't live updated when I make a new appointment in Google calendar after I copied the url or am I wrong?