Closed flavio-fernandes closed 1 year ago
heh, nevermind... it parses differently now. Sorry for the noise.
(env) vagrant@adavm:~/scripts$ ./mqtt_weather.py
Connected to Adafruit IO!
Connected to Adafruit IO! Listening to forecast: 2645...
Weather in 5 Days
FORECAST {'forecastStart': '2023-06-02T04:00:00Z', 'forecastEnd': '2023-06-03T04:00:00Z', 'conditionCode': 'MostlyClear', 'maxUvIndex': 8, 'moonPhase': 'waxingGibbous', 'moonrise': '2023-06-02T23:00:54Z', 'moonset': '2023-06-02T07:51:37Z', 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'solarMidnight': '2023-06-02T04:43:36Z', 'solarNoon': '2023-06-02T16:43:49Z', 'sunrise': '2023-06-02T09:10:19Z', 'sunriseCivil': '2023-06-02T08:36:16Z', 'sunriseNautical': '2023-06-02T07:52:23Z', 'sunriseAstronomical': '2023-06-02T06:59:51Z', 'sunset': '2023-06-03T00:17:49Z', 'sunsetCivil': '2023-06-03T00:52:04Z', 'sunsetNautical': '2023-06-03T01:36:12Z', 'sunsetAstronomical': '2023-06-03T02:28:59Z', 'temperatureMax': 33.01, 'temperatureMin': 15.41, 'daytimeForecast': {'forecastStart': '2023-06-02T11:00:00Z', 'forecastEnd': '2023-06-02T23:00:00Z', 'cloudCover': 0.26, 'conditionCode': 'MostlyClear', 'humidity': 0.44, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 65, 'windSpeed': 6.04}, 'overnightForecast': {'forecastStart': '2023-06-02T23:00:00Z', 'forecastEnd': '2023-06-03T11:00:00Z', 'cloudCover': 0.5, 'conditionCode': 'PartlyCloudy', 'humidity': 0.74, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 52, 'windSpeed': 10.17}}
Weather in Two Days
FORECAST {'forecastStart': '2023-05-30T04:00:00Z', 'forecastEnd': '2023-05-31T04:00:00Z', 'conditionCode': 'Clear', 'maxUvIndex': 8, 'moonPhase': 'waxingGibbous', 'moonrise': '2023-05-30T19:27:25Z', 'moonset': '2023-05-30T06:44:26Z', 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'solarMidnight': '2023-05-30T04:43:08Z', 'solarNoon': '2023-05-30T16:43:23Z', 'sunrise': '2023-05-30T09:11:50Z', 'sunriseCivil': '2023-05-30T08:38:03Z', 'sunriseNautical': '2023-05-30T07:54:37Z', 'sunriseAstronomical': '2023-05-30T07:03:10Z', 'sunset': '2023-05-31T00:15:26Z', 'sunsetCivil': '2023-05-31T00:49:28Z', 'sunsetNautical': '2023-05-31T01:33:06Z', 'sunsetAstronomical': '2023-05-31T02:24:53Z', 'temperatureMax': 23.08, 'temperatureMin': 5.97, 'daytimeForecast': {'forecastStart': '2023-05-30T11:00:00Z', 'forecastEnd': '2023-05-30T23:00:00Z', 'cloudCover': 0.05, 'conditionCode': 'Clear', 'humidity': 0.46, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 133, 'windSpeed': 7.15}, 'overnightForecast': {'forecastStart': '2023-05-30T23:00:00Z', 'forecastEnd': '2023-05-31T11:00:00Z', 'cloudCover': 0.02, 'conditionCode': 'Clear', 'humidity': 0.74, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 184, 'windSpeed': 7.05}}
Current Forecast
FORECAST {'name': 'CurrentWeather', 'metadata': {'attributionURL': 'https://developer.apple.com/weatherkit/data-source-attribution/', 'expireTime': '2023-05-28T19:16:06Z', 'latitude': 42.642, 'longitude': -71.436, 'readTime': '2023-05-28T19:11:06Z', 'reportedTime': '2023-05-28T18:18:17Z', 'units': 'm', 'version': 1}, 'asOf': '2023-05-28T19:11:06Z', 'cloudCover': 0.0, 'cloudCoverLowAltPct': 0.0, 'cloudCoverMidAltPct': 0.0, 'cloudCoverHighAltPct': 0.0, 'conditionCode': 'Clear', 'daylight': True, 'humidity': 0.31, 'precipitationIntensity': 0.0, 'pressure': 1014.83, 'pressureTrend': 'falling', 'temperature': 31.09, 'temperatureApparent': 30.54, 'temperatureDewPoint': 11.87, 'uvIndex': 6, 'visibility': 42638.24, 'windDirection': 250, 'windGust': 25.49, 'windSpeed': 13.44}
Weather in 5 Days
FORECAST {'forecastStart': '2023-06-02T04:00:00Z', 'forecastEnd': '2023-06-03T04:00:00Z', 'conditionCode': 'MostlyClear', 'maxUvIndex': 8, 'moonPhase': 'waxingGibbous', 'moonrise': '2023-06-02T23:00:54Z', 'moonset': '2023-06-02T07:51:37Z', 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'solarMidnight': '2023-06-02T04:43:36Z', 'solarNoon': '2023-06-02T16:43:49Z', 'sunrise': '2023-06-02T09:10:19Z', 'sunriseCivil': '2023-06-02T08:36:16Z', 'sunriseNautical': '2023-06-02T07:52:23Z', 'sunriseAstronomical': '2023-06-02T06:59:51Z', 'sunset': '2023-06-03T00:17:49Z', 'sunsetCivil': '2023-06-03T00:52:04Z', 'sunsetNautical': '2023-06-03T01:36:12Z', 'sunsetAstronomical': '2023-06-03T02:28:59Z', 'temperatureMax': 33.01, 'temperatureMin': 15.41, 'daytimeForecast': {'forecastStart': '2023-06-02T11:00:00Z', 'forecastEnd': '2023-06-02T23:00:00Z', 'cloudCover': 0.26, 'conditionCode': 'MostlyClear', 'humidity': 0.44, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 65, 'windSpeed': 6.04}, 'overnightForecast': {'forecastStart': '2023-06-02T23:00:00Z', 'forecastEnd': '2023-06-03T11:00:00Z', 'cloudCover': 0.5, 'conditionCode': 'PartlyCloudy', 'humidity': 0.74, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 52, 'windSpeed': 10.17}}
Weather in Two Days
FORECAST {'forecastStart': '2023-05-30T04:00:00Z', 'forecastEnd': '2023-05-31T04:00:00Z', 'conditionCode': 'Clear', 'maxUvIndex': 8, 'moonPhase': 'waxingGibbous', 'moonrise': '2023-05-30T19:27:25Z', 'moonset': '2023-05-30T06:44:26Z', 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'solarMidnight': '2023-05-30T04:43:08Z', 'solarNoon': '2023-05-30T16:43:23Z', 'sunrise': '2023-05-30T09:11:50Z', 'sunriseCivil': '2023-05-30T08:38:03Z', 'sunriseNautical': '2023-05-30T07:54:37Z', 'sunriseAstronomical': '2023-05-30T07:03:10Z', 'sunset': '2023-05-31T00:15:26Z', 'sunsetCivil': '2023-05-31T00:49:28Z', 'sunsetNautical': '2023-05-31T01:33:06Z', 'sunsetAstronomical': '2023-05-31T02:24:53Z', 'temperatureMax': 23.08, 'temperatureMin': 5.97, 'daytimeForecast': {'forecastStart': '2023-05-30T11:00:00Z', 'forecastEnd': '2023-05-30T23:00:00Z', 'cloudCover': 0.05, 'conditionCode': 'Clear', 'humidity': 0.46, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 133, 'windSpeed': 7.15}, 'overnightForecast': {'forecastStart': '2023-05-30T23:00:00Z', 'forecastEnd': '2023-05-31T11:00:00Z', 'cloudCover': 0.02, 'conditionCode': 'Clear', 'humidity': 0.74, 'precipitationAmount': 0.0, 'precipitationAmountByType': {}, 'precipitationChance': 0.0, 'precipitationType': 'clear', 'snowfallAmount': 0.0, 'windDirection': 184, 'windSpeed': 7.05}}
Current Forecast
FORECAST {'name': 'CurrentWeather', 'metadata': {'attributionURL': 'https://developer.apple.com/weatherkit/data-source-attribution/', 'expireTime': '2023-05-28T19:16:06Z', 'latitude': 42.642, 'longitude': -71.436, 'readTime': '2023-05-28T19:11:06Z', 'reportedTime': '2023-05-28T18:18:17Z', 'units': 'm', 'version': 1}, 'asOf': '2023-05-28T19:11:06Z', 'cloudCover': 0.0, 'cloudCoverLowAltPct': 0.0, 'cloudCoverMidAltPct': 0.0, 'cloudCoverHighAltPct': 0.0, 'conditionCode': 'Clear', 'daylight': True, 'humidity': 0.31, 'precipitationIntensity': 0.0, 'pressure': 1014.83, 'pressureTrend': 'falling', 'temperature': 31.09, 'temperatureApparent': 30.54, 'temperatureDewPoint': 11.87, 'uvIndex': 6, 'visibility': 42638.24, 'windDirection': 250, 'windGust': 25.49, 'windSpeed': 13.44}
Ref script: https://github.com/flavio-fernandes/adaio/blob/master/scripts/mqtt_weather.py
The
message
callback never happens. I tried with bothDark sky
and the newApple WeatherKit
ids. Waited 1hr+ w/out success.zzzzzz ZZZ zzzzz