Stable UV Index site for US

I used to get my UV index from a site that is paid now. I can't seem to extract it via openweather, nor can I get it from the EPA (UV Index Search | US EPA)-- since they use a .gif for the number (I would need to extract the ALT= text.) I'm looking to get the MAX UV level for that day, not necessarily the current as they usually offer the max UV number.

example EPA result:
UVI 10

I have tried JSON, text, html selectors and the scraper tool. no joy. Have I forgotten how to node-red from one summer to the next?

My weather station worked fine last year, but the UV change has me scrambling a bit. Any tips are greatly appreciated. It's just my own personal little weather station based on an 8266, and a Pi3B+ running NR and MQTT -- and I'm using the UV to plan skin safety during the summer.

It seems alot of the pages I used to scrape are now generated on the fly so a new tactic must be used...

They also have an open api available it seems

2 Likes

@bodylinksystems This looks something many could benefit from. Do you have plans to share your flow?

@zenofmud @bakman2 this is working for me right now. Hope it helps someone else

[{"id":"566f56af6f283360","type":"tab","label":"EPA Open API UV Scrape","disabled":false,"info":"","env":[]},{"id":"87ab3aba989a130c","type":"inject","z":"566f56af6f283360","name":"UV scrape","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"str"}],"repeat":"14400","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":200,"wires":[["38d55d4f2a2073de"]]},{"id":"38d55d4f2a2073de","type":"http request","z":"566f56af6f283360","name":"UVscrape","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://data.epa.gov/efservice/getEnvirofactsUVDAILY/ZIP/20050/JSON","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":300,"y":200,"wires":[["9a81606bfd8060ca"]]},{"id":"75deb0a6e30a1539","type":"ui_button","z":"566f56af6f283360","name":"","group":"ced86898.7b5518","order":11,"width":3,"height":1,"passthru":false,"label":"REFRESH UV","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"","x":120,"y":280,"wires":[["38d55d4f2a2073de"]]},{"id":"9a81606bfd8060ca","type":"change","z":"566f56af6f283360","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].UV_INDEX","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":260,"wires":[["b77726646ede7f81"]]},{"id":"b77726646ede7f81","type":"switch","z":"566f56af6f283360","name":"UV array","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"false","repair":false,"outputs":1,"x":560,"y":300,"wires":[["6a181d4fbfe57811","c8ac4a906f5b2f2f"]]},{"id":"6a181d4fbfe57811","type":"ui_artlessgauge","z":"566f56af6f283360","group":"ced86898.7b5518","order":8,"width":3,"height":3,"name":"UV index","icon":"fa-medkit","label":"UV","unit":"index","layout":"radial","decimals":0,"differential":false,"minmax":false,"colorTrack":"#ff2801","colorFromTheme":true,"sectors":[{"val":0,"col":"#12ff00","t":"min","dot":0},{"val":4,"col":"#ffff00","t":"sec","dot":1},{"val":5,"col":"#ff8a00","t":"sec","dot":1},{"val":6,"col":"#ff0000","t":"sec","dot":1},{"val":7,"col":"#ff00bf","t":"sec","dot":1},{"val":10,"col":"#ff00bf","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"x":640,"y":360,"wires":[]},{"id":"c8ac4a906f5b2f2f","type":"debug","z":"566f56af6f283360","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":280,"wires":[]},{"id":"ced86898.7b5518","type":"ui_group","name":"Sensors","tab":"359cc23c.7c394e","order":1,"disp":false,"width":12,"collapse":false},{"id":"359cc23c.7c394e","type":"ui_tab","name":"POOL WX","icon":"fa-tint","order":1,"disabled":false,"hidden":false}]
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.