Thanks @st_kbron. As soon as a few others post, I will go thru the process of adding them all to the Wiki.
$twcweather.alerts Observations
@WCmore. I think you need to move lol. I’ve been getting a lot but nothing new that hasn’t already been reported.
Well, in some ways, I am happy to live in paradise…
It just makes programming for alerts much tougher, LOL
@WCmore, not a weather alert. Not sure if this helps any.
Alert.length changed from 0 to 1
[[adminDistrict:Tennessee, adminDistrictCode:TN, areaId:TNC093, areaName:Knox County, areaTypeCode:C, categories:[[category:Other, categoryCode:12]], certainty:Unknown, certaintyCode:5, countryCode:US, countryName:UNITED STATES OF AMERICA, detailKey:7a48738b-5487-30f5-8b8d-ee74ddc4f863, disclaimer:null, effectiveTimeLocal:null, effectiveTimeLocalTimeZone:null, eventDescription:Child Abduction Emergency, eventTrackingNumber:0000, expireTimeLocal:2019-09-06T21:59:00-04:00, expireTimeLocalTimeZone:EDT, expireTimeUTC:1567821540, flood:null, headlineText:Child Abduction Emergency until FRI 9:59 PM EDT, ianaTimeZone:America/New_York, identifier:6e250092e881cc3ff9a07be4ecc1bc00, issueTimeLocal:2019-09-06T20:08:00-04:00, issueTimeLocalTimeZone:EDT, latitude:00.00, longitude:00.00, messageType:New, messageTypeCode:1, officeAdminDistrict:Tennessee, officeAdminDistrictCode:TN, officeCode:KOHX,
officeCountryCode:US, officeName:Nashville, onsetTimeLocal:null, onsetTimeLocalTimeZone:null, phenomena:TCA, processTimeUTC:1567814929, productIdentifier:CAE, responseTypes:[[responseType:Avoid, responseTypeCode:5]], severity:Moderate, severityCode:3, significance:L, source:National Weather Service, urgency:Unknown, urgencyCode:5]]
I am impressed that it notifies us of child abductions!
Edit :
…although a bit confused as to why the “significance” is the same as “Air Quality Alerts”…?!?
Edit 2 :
“Child Abduction Emergency” and “Air Quality Alerts” both have “significance:L
”… which we now know stands for “Local Alerts”
The Wiki has been updated with the last three alerts.
Thanks everyone for your continued contributions.
New additions:
- Child Abduction Emergency
- Tropical Storm Watch
- Tropical Weather Statement
- responseTypes.responseType = Prepare
I’ve been monitoring these down here in Sydney (Australia) as we went through a few days of severe gale force winds, so here’s a few of my observations:
.issueTimeLocal and UTC seems to be the time the alert was posted.
.updateTimeLocal or UTC shows when the alert was last updated. If not updated since issue, it’ll will be the same as issueTime.(may be a regional variation)
.effectiveTimeLocal and UTC seems to be the time the event is expected to occur.
.onsetTimeLocal and UTC appears to be the same as effectiveTime.
.expireTimeLocal and UTC shows when the alert is to be regarded as expired (can ignore).
Here’s a place to get some more of the event codes: https://www.weather.gov/NWR/eventcodes
I use the issueTime in my piston to determine if an alert is new or updated recently and then alert. I also evaluate the effectiveTime to warn of imminent events (say occurring in the next hour) and the recommended responseType to suggest the action to take.
I have also set up a piston to log each new alert to a spreadsheet, so hopefully can contribute that set of data soon.
Here’s a simplified version that “should” still work, that demonstrates the principle. It polls hourly and builds the notification message only if the alert found is new of updated within the last hour, or if the even occurring is imminent (in the next hour). Outside of that range it assumes it has seen new/updates in the previous hour or the event occurence (effectiveTime) is still more than an hour ahead.
updated to reflect correct logic evaluation on alert times and time conversions.
Thanks for your contributions, @AvronW.
Your observations have been added to the Wiki…
Also, thanks for sharing that link to weather.gov
.
Some of that data matches $twcweather, but some definitely does not.
Use that data with caution
I see no reference to either of these dataPoints in any of the alerts…
Perhaps you meant .processTimeUTC
…??
It seems to be inconsistently used, so perhaps only shows up if they’ve modified a previously issued alert.
I’ll share those that I do manage to log to the spreadsheet, as soon as I have a good collection.
Well, it takes quite a bit of work for me to add each one to the Wiki… so it may be better if you only share the unique alerts, to save me from getting grey hair too early, LOL
Hey WCMore, can you help me work out why dates are miss-evaluated when calling $twcweather.alerts dates that fall exactly at midnight?
for example:
$twcweather.alerts[0].onsetTimeLocal returns “onsetTimeLocal:2019-09-16T00:00:00+10:00”,
but
datetime($twcweather.alerts[0].onsetTimeLocal) returns “Sun, Sep 15 2019 @ 12:00:00 AM AEST”
That’s one full day behind the time specified!
This makes evaluating those dates a little tricky.
I remember a similiar bug about 18 months ago… Long before TWC came around… If memory serves me right, I think it was because one part of the code utilized daylight saving time, and another part of the code did not… so depending on which part of the code was gathering (or translating) the data, midnight may be Saturday at 11, or Sunday at 12. And of course, with the date wrong, I can easily see how the final output appears to be 24 hours off.
I suspect this only occurs during Daylight saving time.
(maybe because part of Australia observes DST, and part does not?)
Side note:
I think this fiasco can be avoided if you do your math with the UTC time
@WCmore, I don’t think we have this one…
Alert.length changed from 0 to 1
[[adminDistrict:Tennessee, adminDistrictCode:TN, areaId:TNZ069, areaName:Knox County, areaTypeCode:Z, categories:[[category:Met, categoryCode:2]], certainty:Likely, certaintyCode:2, countryCode:US, countryName:UNITED STATES OF AMERICA, detailKey:9d2148fb-8b72-3fd9-bc33-a25f5e244a17, disclaimer:null, effectiveTimeLocal:null, effectiveTimeLocalTimeZone:null, eventDescription:Frost Advisory, eventTrackingNumber:0003, expireTimeLocal:2019-10-18T09:00:00-04:00, expireTimeLocalTimeZone:EDT, expireTimeUTC:1571403600, flood:null, headlineText:Frost Advisory until FRI 9:00 AM EDT, ianaTimeZone:America/New_York, identifier:d0a00866907abb0aa02fbbae32e9f102, issueTimeLocal:2019-10-18T03:37:00-04:00, issueTimeLocalTimeZone:EDT, latitude:00.00, longitude:00.00, messageType:New, messageTypeCode:1, officeAdminDistrict:Tennessee, officeAdminDistrictCode:TN, officeCode:KMRX, officeCountryCode:US,
officeName:Knoxville/Tri-Cities, onsetTimeLocal:null, onsetTimeLocalTimeZone:null, phenomena:FR, processTimeUTC:1571384288, productIdentifier:NPW, responseTypes:[[responseType:Prepare, responseTypeCode:3]], severity:Minor, severityCode:4, significance:Y, source:National Weather Service, urgency:Expected, urgencyCode:2]]
@WCmore,
[10/31/19 3:23 AM] 844647: Weather alert: [[adminDistrict:Tennessee, adminDistrictCode:TN, areaId:TNZ069, areaName:Knox County, areaTypeCode:Z, categories:[[category:Met, categoryCode:2]], certainty:Likely, certaintyCode:2, countryCode:US, countryName:UNITED STATES OF AMERICA, detailKey:32b3544d-acb3-3ead-a7d4-6008fa7ac7c3, disclaimer:null, effectiveTimeLocal:2019-11-01T02:00:00-04:00, effectiveTimeLocalTimeZone:EDT, eventDescription:Freeze Warning, eventTrackingNumber:0003, expireTimeLocal:2019-11-01T10:00:00-04:00, expireTimeLocalTimeZone:EDT, expireTimeUTC:1572616800, flood:null, headlineText:Freeze Warning from FRI 2:00 AM EDT until FRI 10:00 AM EDT, ianaTimeZone:America/New_York, identifier:d74af5bd76200d8b8a74b5d750d74f66, issueTimeLocal:2019-10-31T03:16:00-04:00, issueTimeLocalTimeZone:EDT, latitude:00.00, longitude:00.00, messageType:New, messageTypeCode:1, officeAdminDistrict:Tennessee, officeAdminDistrictCode:TN, officeCode:KMRX, officeCountryCode:US, officeName:Knoxville/Tri-Cities, onsetTimeLocal:2019-11-01T02:00:00-04:00, onsetTimeLocalTimeZone:EDT, phenomena:FZ, processTimeUTC:1572506191, productIdentifier:NPW, responseTypes:[[responseType:Execute, responseTypeCode:4]], severity:Moderate, severityCode:3, significance:W, source:National Weather Service, urgency:Expected, urgencyCode:2]]
“Frost Advisory” and “Freeze Warning” have now been added to the Wiki…
Thanks for all your continued help, @Pantheon!!
Interesting observation regarding “productIdentifier”:
A bit strange why Fog, Heat and Frost are grouped together…
Maybe “NPW” stands for National Public Warning??
Edit:
High Wind Warning
also returns “NPW” for productIdentifier
Edit 2:
NPW might stand for “Non-Precipitation Warning”