torreyleonard / RTSP-Utilities

Create timelapses, stream to YouTube, and add a live-weather overlay to RTSP streams.
27 stars 4 forks source link

Trouble with node conditions.js #1

Open centurion800 opened 6 years ago

centurion800 commented 6 years ago

root@servak:~/RTSP-Utilities# node conditions.js Running every 5 minutes. Getting current conditions... /root/RTSP-Utilities/conditions.js:32 const temp = json.temp_f; ^

TypeError: Cannot read property 'temp_f' of undefined at IncomingMessage. (/root/RTSP-Utilities/conditions.js:32:30) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:905:12) at nextTickCallbackWith2Args (node.js:441:9) at process._tickCallback (node.js:355:17) root@servak:~/RTSP-Utilities#

millette commented 6 years ago

@centurion800 See step 7 in the readme.

loganmines commented 5 years ago

Weather Underground is no longer providing free API keys, instead, they provide cloud based "Data Packages". Any chance of getting the new APIs integrated?

SA7BNT commented 5 years ago

After that Weather Underground no longer provides API keys for free, is it possible that some one can fix the conditions.js with https://web.stanford.edu/group/csp/cs22/using-an-api.pdf or may be with https://github.com/initialstate/wunderground-sensehat/wiki/Part-1.-How-to-Use-the-Dark-Sky-API Im absloutly not confirm with .js

Looking forward and hope some can fix the broken conditions.js

tjeerdoo commented 8 months ago

I noticed that http://api.wunderground.com/api/APIKETHERE/conditions/q/pws:IAMERSFO201

doesn't work

I found that https://api.weather.com/v2/pws/observations/current?stationId=IAMERSFO201&format=json&units=h&apiKey=APIKEYHERE

does give me back results, however, after changing the const url to

const url = 'https://api.weather.com/v2/pws/observations/current?stationId=' + pws + '&format=json&units=h&apiKey=' + apiKey + '.json';

I'm stuck there..