Re: Python Plugin: MoonPhases
Posted: Wednesday 07 February 2018 10:14
Just updated to the latest beta (3.8890), will try it again.
Same resultassenzuid wrote: Wednesday 07 February 2018 10:14 Just updated to the latest beta (3.8890), will try it again.
Domoticz is fresh compiled because of the same Error with the buienradar pluginycahome wrote: Wednesday 07 February 2018 8:48Hi there again.htilburgs wrote: Tuesday 06 February 2018 23:59 After installing MoonPhases Plugin, Domoticz Crashes:
Domoticz v3.8889
Domoticz Log Entry:
Your installation seems ok. I can't tell what exactly is causing this behavior.
You remind me some months ago that I personally faced the same behavior with another plugin.
Ended up to reinstall Domoticz and recreate database/sensors from scratch.
Don't get me wrong, am not saying that the plugin is correct and your installation is wrong. Just saying that didn't found any solution for "Domoticz received fatal signal 11 !..." error.
Do you have other plugins working?
Hi ! I got the same need a few month ago, so I wrote a script for that. I shared it for you here viewtopic.php?f=61&t=22090Marci wrote: Tuesday 06 February 2018 23:24 Umm no... % cloud cover. [...] DarkSkies makes it available in their JSON feed but the current DarkSkies sensors for Domoticz don’t utilise it.
Code: Select all
# turn moon right way up for images kindly provided for domoticz plugin
# see http://www.domoticz.com/forum/viewtopic.php?f=65&t=21993
# ross lazarus me fecit march 10 2018
# run this in a temporary directory containing all the moon icon zip files and they will be
# rotated 180 degrees to suit the Southern hemisphere
import os
ourd = os.getcwd()
flist = os.listdir('.')
flist = [x for x in flist if x[0] == 'M']
for f in flist:
os.chdir(ourd)
dname = f.split('.')[0]
try:
os.mkdir(dname)
except:
print dname, 'already exists'
os.chdir(dname)
try:
os.system('unzip -o ../%s' % dname)
except:
print f, 'zip contents already exist'
pnames = os.listdir('.')
pnames = [x for x in pnames if x.endswith('.png')]
for pname in pnames:
os.system('mogrify -rotate "180" ./%s' % pname)
print 'rotated',pname
os.system('zip -f ../%s' % dname)
print 'freshened',dname
fubar wrote: Saturday 10 March 2018 3:22
To fix the icons, I just had to uninstall the moon phases hardware entry; run the script to freshen the individual icon archives; replace the original zips in the plugins folder; restart domoticz; reinstall the plugin as hardware and reconfigure with my weather underground api key
Code: Select all
# turn moon right way up for images kindly provided for domoticz plugin # see http://www.domoticz.com/forum/viewtopic.php?f=65&t=21993 # ross lazarus me fecit march 10 2018 # run this in a temporary directory containing all the moon icon zip files and they will be # rotated 180 degrees to suit the Southern hemisphere import os ourd = os.getcwd() flist = os.listdir('.') flist = [x for x in flist if x[0] == 'M'] for f in flist: os.chdir(ourd) dname = f.split('.')[0] try: os.mkdir(dname) except: print dname, 'already exists' os.chdir(dname) try: os.system('unzip -o ../%s' % dname) except: print f, 'zip contents already exist' pnames = os.listdir('.') pnames = [x for x in pnames if x.endswith('.png')] for pname in pnames: os.system('mogrify -rotate "180" ./%s' % pname) print 'rotated',pname os.system('zip -f ../%s' % dname) print 'freshened',dname
Code: Select all
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"astronomy": 1
}
}
, "moon_phase": {
"percentIlluminated":"36",
"ageOfMoon":"23",
"phaseofMoon":"Last Quarter",
"hemisphere":"South",
"current_time": {
"hour":"10",
"minute":"39"
},
"sunrise": {
"hour":"6",
"minute":"50"
},
"sunset": {
"hour":"19",
"minute":"19"
},
"moonrise": {
"hour":"0",
"minute":"54"
},
"moonset": {
"hour":"15",
"minute":"14"
}
},
"sun_phase": {
"sunrise": {
"hour":"6",
"minute":"50"
},
"sunset": {
"hour":"19",
"minute":"19"
}
}
}Just upload or PM with the iconset.fubar wrote: Sunday 11 March 2018 0:59 . I'll change the script to create a separate set of icons with S in the name for the southern hemisphere that you can bundle up
Code: Select all
2018-03-12 17:58:49.487 (Moon days) Initialized version 1.0.0, author 'ycahome ft. jackslayter'
2018-03-12 17:58:49.488 (Moon days) Debug log level set to: 'true'.
2018-03-12 17:58:49.488 (Moon days) 'HardwareID':'9'
2018-03-12 17:58:49.488 (Moon days) 'HomeFolder':'/home/rlazarus/domoticz/plugins/MoonPhases/'
2018-03-12 17:58:49.488 (Moon days) 'Version':'1.0.0'
2018-03-12 17:58:49.488 (Moon days) 'Author':'ycahome ft. jackslayter'
2018-03-12 17:58:49.488 (Moon days) 'Name':'Moon days'
2018-03-12 17:58:49.489 (Moon days) 'Port':'0'
2018-03-12 17:58:49.489 (Moon days) 'Key':'MoonPhases'
2018-03-12 17:58:49.489 (Moon days) 'Mode1':'081dbdbeaac85246'
2018-03-12 17:58:49.489 (Moon days) 'Mode2':'au'
2018-03-12 17:58:49.489 (Moon days) 'Mode3':'sydney'
2018-03-12 17:58:49.489 (Moon days) 'Mode4':'60'
2018-03-12 17:58:49.489 (Moon days) 'Mode6':'Debug'
2018-03-12 17:58:49.489 (Moon days) 'DomoticzVersion':'3.9014'
2018-03-12 17:58:49.489 (Moon days) 'DomoticzHash':'6b5dd0b7'
2018-03-12 17:58:49.489 (Moon days) 'DomoticzBuildTime':'2018-03-11 00:16:03'
2018-03-12 17:58:49.489 (Moon days) Device count: 0
2018-03-12 17:58:49.489 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases1NM.zip'.
2018-03-12 17:58:49.497 (Moon days) Added icon: SH_MoonPhases1NM from file SH_MoonPhases1NM.zip
2018-03-12 17:58:49.497 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases2WC.zip'.
2018-03-12 17:58:49.500 (Moon days) Added icon: SH_MoonPhases2WC from file SH_MoonPhases2WC.zip
2018-03-12 17:58:49.500 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases3FQ.zip'.
2018-03-12 17:58:49.503 (Moon days) Added icon: SH_MoonPhases3FQ from file SH_MoonPhases3FQ.zip
2018-03-12 17:58:49.503 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases4WG.zip'.
2018-03-12 17:58:49.505 (Moon days) Added icon: SH_MoonPhases4WG from file SH_MoonPhases4WG.zip
2018-03-12 17:58:49.505 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases5FM.zip'.
2018-03-12 17:58:49.508 (Moon days) Added icon: SH_MoonPhases5FM from file SH_MoonPhases5FM.zip
2018-03-12 17:58:49.508 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases6WG.zip'.
2018-03-12 17:58:49.511 (Moon days) Added icon: SH_MoonPhases6WG from file SH_MoonPhases6WG.zip
2018-03-12 17:58:49.511 (Moon days) Creating images from file '/home/rlazarus/domoticz/plugins/MoonPhases/SH_MoonPhases7LQ.zip'.
2018-03-12 17:58:49.513 (Moon days) Added icon: SH_MoonPhases7LQ from file SH_MoonPhases7LQ.zip
2018-03-12 17:58:49.513 (Moon days) Number of icons loaded = 9
2018-03-12 17:58:49.513 (Moon days) Icon 101 MoonPhases1NM
2018-03-12 17:58:49.513 (Moon days) Icon 102 MoonPhases2WC
2018-03-12 17:58:49.513 (Moon days) Icon 103 MoonPhases3FQ
2018-03-12 17:58:49.513 (Moon days) Icon 104 MoonPhases4WG
2018-03-12 17:58:49.513 (Moon days) Icon 105 MoonPhases5FM
2018-03-12 17:58:49.513 (Moon days) Icon 106 MoonPhases6WG
2018-03-12 17:58:49.513 (Moon days) Icon 107 MoonPhases7LQ
2018-03-12 17:58:49.513 (Moon days) Icon 108 MoonPhases8WC
2018-03-12 17:58:49.514 (Moon days) Icon 116 SH_MoonPhases8WC
2018-03-12 17:58:49.514 (Moon days) Creating device 'Status'.Code: Select all
Use the "</>" button