Page 3 of 3

Re: Dashticz - Module Moonphases

Posted: Saturday 17 March 2018 22:39
by EdwinK
Same here

I think this is the problem:

Code: Select all

Refused to execute script from 'http://192.168.0.11:8080/json.htm?username=&password=&type=command&param=getuservariable&idx=1&jsoncallback=jQuery22406583362093528788_1521322394438&_=1521322394439' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.[/quote]

Googled to find an answer, but didn't come to much more info

Re: Dashticz - Module Moonphases

Posted: Sunday 01 April 2018 23:05
by Joep123
I had a problem with showing the picture of the moon.

After changing the filename on my server from moon.01.png into moon.1.png it works fine!

Re: Dashticz - Module Moonphases

Posted: Monday 02 April 2018 21:10
by Beschuitje
Having a strange problem with the moon pictures since today.
Dashticz gives a broken image
IMG_9502.jpg
IMG_9502.jpg (36.79 KiB) Viewed 1425 times
I checked the user variable in Domoticz and the image with MoonPicture was indeed a non exiting number.
IMG_9503.jpg
IMG_9503.jpg (151.43 KiB) Viewed 1425 times
I changed the image line to the right one and the moon picture was back in Dashticz.
After a WU update the pucture was broken again. Changing WU site did not help.

Does anybody know what is happening here?

Re: Dashticz - Module Moonphases

Posted: Tuesday 03 April 2018 22:16
by zoyou
When looking to the script, you can guess that it supposed to use only half of moon pictures (0->50 then 50->0).
If you change to :

Code: Select all

        picnumber=math.floor(percentIlluminated)
        n=tostring(picnumber)
        if n.length==1 then
            n='0'+n
        end
It will run with all moon pictures (in 'DashBoard2/img/moon' folder)

Re: Dashticz - Module Moonphases

Posted: Wednesday 04 April 2018 6:59
by Beschuitje
When looking to the script, you can guess that it supposed to use only half of moon pictures (0->50 then 50->0).
You are right but that was not the problem. The first 9 pictures in the moon folder are 01, 02, 03 etc. Donoticz started using 1, 2, etc. The 0 fell off and i wunder why.
I solved it by changing the image names of the first 9 moon pictures. Now wait and see what happens when he starts using 10, 11... ;)

Re: Dashticz - Module Moonphases

Posted: Wednesday 04 April 2018 8:56
by Beschuitje
And the problems are changing...
I now get errors in the log about the script
A0E4808A-38DC-4D5B-A1A1-C9728EE4A083.jpeg
A0E4808A-38DC-4D5B-A1A1-C9728EE4A083.jpeg (399.13 KiB) Viewed 1388 times
It loads a moon picture but its the wrong one. Moon percentage is ok (85%) but the picture does not match this.
It gives almost a full moon (picture 6)

Will see if deleting the script and re install after a reboot of the Pi helps. It had worked for more than a month so very strange. Haven’t updates Domoticz and or Dashticz in a while so this can’t be the problem.

Re: Dashticz - Module Moonphases

Posted: Wednesday 04 April 2018 17:28
by Beschuitje
When looking to the script, you can guess that it supposed to use only half of moon pictures (0->50 then 50->0).
If you change to :

CODE: SELECT ALL
picnumber=math.floor(percentIlluminated)
n=tostring(picnumber)
if n.length==1 then
n='0'+n
end
It will run with all moon pictures (in 'DashBoard2/img/moon' folder)
Before starting over i decided to change this and indeed it uses al of the images now but there is still a problem. The image is now the other way around. The wrong side is dark. The percentage however matches the image now but again, the other way around. I keep searching...

Re: Dashticz - Module Moonphases

Posted: Friday 17 April 2020 16:23
by RezaRose
I have problems with the scrips my log say this:

2020-04-17 16:20:00.369 Error: EventSystem: in Maanfase: [string "-- Variables to customize -------------------..."]:77: attempt to concatenate a nil value (global 'percentIlluminated')
2020-04-17 16:21:00.020 Status: LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/REEKSME ... eppel.json
2020-04-17 16:21:00.322 Status: LUA: Moonrise: --:--
2020-04-17 16:21:00.322 Status: LUA: Moonset: --:--
2020-04-17 16:21:00.322 Error: EventSystem: in Maanfase: [string "-- Variables to customize -------------------..."]:77: attempt to concatenate a nil value (global 'percentIlluminated')

I made a weatherstation in Wunderground, but it is not a real one. Maybe that is why i get no values. Is there another option to get data?

Re: Dashticz - Module Moonphases

Posted: Friday 17 April 2020 16:56
by Lokonli
RezaRose wrote: Friday 17 April 2020 16:23 I have problems with the scrips my log say this:

2020-04-17 16:20:00.369 Error: EventSystem: in Maanfase: [string "-- Variables to customize -------------------..."]:77: attempt to concatenate a nil value (global 'percentIlluminated')
2020-04-17 16:21:00.020 Status: LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/REEKSME ... eppel.json
2020-04-17 16:21:00.322 Status: LUA: Moonrise: --:--
2020-04-17 16:21:00.322 Status: LUA: Moonset: --:--
2020-04-17 16:21:00.322 Error: EventSystem: in Maanfase: [string "-- Variables to customize -------------------..."]:77: attempt to concatenate a nil value (global 'percentIlluminated')

I made a weatherstation in Wunderground, but it is not a real one. Maybe that is why i get no values. Is there another option to get data?
You are in a pretty old Dashticz thread. I guess you have a Domoticz related question, so it's better to post it somewhere in the Domoticz forum.
If you want to display the moonphase in Dashticz I probably can help.

Re: Dashticz - Module Moonphases

Posted: Tuesday 21 April 2020 8:06
by RezaRose
Thanks i really like some help with the moonphase

Re: Dashticz - Module Moonphases

Posted: Tuesday 21 April 2020 12:48
by RezaRose
Lokonli wrote: Friday 17 April 2020 16:56
RezaRose wrote: Friday 17 April 2020 16:23 I have problems with the scrips my log say this:

2020-04-17 16:20:00.369 Error: EventSystem: in Maanfase: [string "-- Variables to customize -------------------..."]:77: attempt to concatenate a nil value (global 'percentIlluminated')
2020-04-17 16:21:00.020 Status: LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/REEKSME ... eppel.json
2020-04-17 16:21:00.322 Status: LUA: Moonrise: --:--
2020-04-17 16:21:00.322 Status: LUA: Moonset: --:--
2020-04-17 16:21:00.322 Error: EventSystem: in Maanfase: [string "-- Variables to customize -------------------..."]:77: attempt to concatenate a nil value (global 'percentIlluminated')

I made a weatherstation in Wunderground, but it is not a real one. Maybe that is why i get no values. Is there another option to get data?
You are in a pretty old Dashticz thread. I guess you have a Domoticz related question, so it's better to post it somewhere in the Domoticz forum.
If you want to display the moonphase in Dashticz I probably can help.
Could you help me with the moonphase? I have a api key, but i do not own weather station so I got zero values.