We have moved at community.getvera.com

Author Topic: [_CODE_] DAD - Display of Astronomical Data V1.2  (Read 83860 times)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0b - Display of Astronomical Data
« Reply #90 on: March 24, 2011, 10:33:48 am »
Quote
Daylight saving finishes here in a little over a week.  I'll set a scene to use one of your events (say, civil twilight) and see when it fires.  That should test whether we've got the kludge code right.

DST will start here in a few days. I've setup scenes which log the current time for all astronomical events.

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0b - Display of Astronomical Data
« Reply #91 on: March 26, 2011, 05:55:14 pm »
Earthquake announcements:

Code: [Select]
local DAD_ID = 4 -- adjust accordingly
local TAD_ID = 8 -- adjust accordingly

local DAD_SERVICE = "urn:upnp-ap15e-com:serviceId:DAD1"
local TAD_SERVICE = "urn:upnp-org:ServiceId:TimerAnnouncerService"

local reg = luup.variable_get( DAD_SERVICE, 'EarthquakeRegion' , DAD_ID  )
local mag = luup.variable_get( DAD_SERVICE, 'EarthquakeMagnitude' , DAD_ID )
local tim = luup.variable_get( DAD_SERVICE, 'EarthquakeDate' , DAD_ID )
local dis = luup.variable_get( DAD_SERVICE, 'EarthquakeDistance' , DAD_ID )

local age = os.time() - tim or 0

local tab={}

tab['announcement']=
'Warning, Warning, Warning, Earthquake: Region: '..
tostring(reg)..
' magnitude: '..tostring(mag)..':'..
' distance: '..tostring(dis)..'km: '..
math.floor(age/60+0.5)..' min ago.'

local err, errm = luup.call_action( TAD_SERVICE, "Announce", tab, TAD_ID )

Requirements:
« Last Edit: March 26, 2011, 06:23:40 pm by Ap15e »

Offline MNB

  • Hero Member
  • *****
  • Posts: 689
  • Karma: +4/-9
Re: DAD V1.0b - Display of Astronomical Data
« Reply #92 on: March 26, 2011, 06:23:34 pm »
Ap15e Great app, is there any reason why when I view DAD via IE9 that I don't see and of the data in the 1st two tabs, can see that the app is working because the data is in the Advance tab. I then ran Mozilla Foxfire and both tabs including the app tab have all fields poplulated. Also the earthquake, is the information only in regards to california or is based on my location? thanxs in advance, Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0b - Display of Astronomical Data
« Reply #93 on: March 26, 2011, 06:37:56 pm »
IE8 does work for me.

Please go to http://earthquake.usgs.gov/earthquakes/catalogs/ for information about the coverage.

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0b - Display of Astronomical Data
« Reply #94 on: March 29, 2011, 04:04:40 pm »
Please read the warning notice on page 1:

WARNING:
There is a bug in the firmware for Vera V2 (including 1.1.1234) which leads to wrong calculations due to rounding errors (the Lua implementation uses 'float' instead of 'double'). You are definitely affected by the bug, if the seconds for moonrise and/or moonset are different from '00'. Vera V1 users should be fine.
« Last Edit: March 29, 2011, 04:08:57 pm by Ap15e »

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0c - Display of Astronomical Data
« Reply #95 on: April 01, 2011, 04:16:26 pm »
Please upgrade to DAD V1.0c.

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: DAD V1.0c - Display of Astronomical Data
« Reply #96 on: April 01, 2011, 06:26:13 pm »
Nice job!
This will be helpful to the yachting world.....with eartquakes comes BIG waves!
Getting a text message would allow an owner to prepare for possible wave action.
How quickly after an earthquake could an event be triggered?
Regards
Tim Alls
AllSeas Yachts

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0c - Display of Astronomical Data
« Reply #97 on: April 01, 2011, 06:58:52 pm »
Quote
This will be helpful to the yachting world.....with eartquakes comes BIG waves!
Getting a text message would allow an owner to prepare for possible wave action.

... or play an announcement (see above, http://forum.micasaverde.com/index.php?topic=5466.msg36405#msg36405).

Quote
How quickly after an earthquake could an event be triggered?

From http://earthquake.usgs.gov/earthquakes/catalogs/:
'Earthquakes will be broadcast within a few minutes for California events, and within 30-minutes for worldwide events.'

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0d - Display of Astronomical Data
« Reply #98 on: April 05, 2011, 11:31:36 am »
DAD V1.0d is available from page 1:

V1.0d adds support for earthquake data from http://www.seismicportal.eu/.

European users should set the new UPnP variable EarthquakeProviderEU to 1 and restart the Lua engine (detailed instructions are on page 1).

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0e - Display of Astronomical Data
« Reply #99 on: April 12, 2011, 01:34:19 pm »
DAD V1.0e adds more robustness against error conditions and makes sure that the earthquake data set for the distance event is consistent (the earthquake data set for the magnitude event is inconsistent, this is a limitation of MiOS, see http://forum.micasaverde.com/index.php?topic=6213.0).
« Last Edit: April 12, 2011, 01:43:24 pm by Ap15e »

Offline sjolshagen

  • Sr. Member
  • ****
  • Posts: 416
  • Karma: +5/-0
Re: DAD V1.0e - Display of Astronomical Data
« Reply #100 on: April 13, 2011, 11:02:37 am »
@AP15e: Do you know if there's a US DoseRateStation URL I could use?
Vera3/UI5 @ v1.5.622

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0e - Display of Astronomical Data
« Reply #101 on: April 13, 2011, 01:06:43 pm »
The thread http://forum.micasaverde.com/index.php?topic=5939.0 has some links to radiation data sites, but DoseRateStationURL is an implementation specific to the German ODL site.
« Last Edit: April 13, 2011, 01:09:03 pm by Ap15e »

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0e - Display of Astronomical Data
« Reply #102 on: April 28, 2011, 06:37:57 pm »
DAD currently doesn't display moonrise/moonset/illumination because http://aa.usno.navy.mil/ is down ...

http://aa.usno.navy.mil/data/:

Quote
This content isn't available right now. We are currently working to restore all services and apologize for any inconvenience. Please check back soon.

Does anyone know what happened to the USNO Astronomical Applications Department?
 
Edit:
USNO AA seems to be back online.
« Last Edit: April 29, 2011, 08:55:48 am by Ap15e »

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: DAD V1.0e - Display of Astronomical Data
« Reply #103 on: April 29, 2011, 09:36:11 am »
Quote
This content isn't available right now. We are currently working to restore all services and apologize for any inconvenience. Please check back soon.
Does anyone know what happened to the USNO Astronomical Applications Department?
Ehm, unusually high interest from all over the world in some of their data lately?
Dezwaved at the moment...

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: DAD V1.0e - Display of Astronomical Data
« Reply #104 on: April 29, 2011, 05:10:19 pm »
Quote
Ehm, unusually high interest from all over the world in some of their data lately?

Yes, Luup plugins are an ideal tool for DDoS attacks  :) - but DAD uses some kind of load distribution in the time domain.