Dashticz - Module Moonphases

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

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 - Module Moonphases

Post 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
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Joep123
Posts: 56
Joined: Monday 26 March 2018 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Dashticz - Module Moonphases

Post 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!
Beschuitje
Posts: 32
Joined: Saturday 24 February 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module Moonphases

Post 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 1416 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 1416 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?
zoyou
Posts: 1
Joined: Tuesday 03 April 2018 22:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module Moonphases

Post 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)
Beschuitje
Posts: 32
Joined: Saturday 24 February 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module Moonphases

Post 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... ;)
Beschuitje
Posts: 32
Joined: Saturday 24 February 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module Moonphases

Post 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 1379 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.
Beschuitje
Posts: 32
Joined: Saturday 24 February 2018 12:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module Moonphases

Post 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...
RezaRose
Posts: 65
Joined: Sunday 09 February 2020 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Holland
Contact:

Re: Dashticz - Module Moonphases

Post 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?
Raspberry Pi 4 - Raspbian bullseye - Python 3.9 - stable
Dashticz on apache2 - Mqqt - node red
Zigate - USB Tll - Philips hue - Ikea - Innr - Xiaomi - TPlink - Nest -v3
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module Moonphases

Post 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.
RezaRose
Posts: 65
Joined: Sunday 09 February 2020 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Holland
Contact:

Re: Dashticz - Module Moonphases

Post by RezaRose »

Thanks i really like some help with the moonphase
Raspberry Pi 4 - Raspbian bullseye - Python 3.9 - stable
Dashticz on apache2 - Mqqt - node red
Zigate - USB Tll - Philips hue - Ikea - Innr - Xiaomi - TPlink - Nest -v3
RezaRose
Posts: 65
Joined: Sunday 09 February 2020 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Holland
Contact:

Re: Dashticz - Module Moonphases

Post 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.
Raspberry Pi 4 - Raspbian bullseye - Python 3.9 - stable
Dashticz on apache2 - Mqqt - node red
Zigate - USB Tll - Philips hue - Ikea - Innr - Xiaomi - TPlink - Nest -v3
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest