New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled Exception #2
Comments
Similar problem. Just got my Tempest and installed the plugin on HomeBridge UI and same error. |
Thanks for the feedback! I'll look into it. Are you two using a HOOBS device by any chance? This could be a NodeJS issue I'll need to come up with a solution for... Additionally if you wouldn't mind could you run this command (filling in your station details) and share with me? I want to make sure your API is returning a valid data object.
Thank you. |
Thanks for removing the personal info. I'm using HOOBS. The command you requested returned this JSON string: {"station_id":80786,"station_name":"Chateau Boudreau","public_name":"Hawkeye Cir","latitude":38.92613,"longitude":-104.82841,"timezone":"America/Denver","elevation":1949.3895263671875,"is_public":true,"status":{"status_code":0,"status_message":"SUCCESS"},"station_units":{"units_temp":"f","units_wind":"mph","units_precip":"in","units_pressure":"mb","units_distance":"mi","units_direction":"cardinal","units_other":"imperial"},"outdoor_keys":["timestamp","air_temperature","barometric_pressure","station_pressure","pressure_trend","sea_level_pressure","relative_humidity","precip","precip_accum_last_1hr","precip_accum_local_day","precip_accum_local_day_final","precip_accum_local_yesterday_final","precip_minutes_local_day","precip_minutes_local_yesterday_final","wind_avg","wind_direction","wind_gust","wind_lull","solar_radiation","uv","brightness","lightning_strike_last_epoch","lightning_strike_last_distance","lightning_strike_count","lightning_strike_count_last_1hr","lightning_strike_count_last_3hr","feels_like","heat_index","wind_chill","dew_point","wet_bulb_temperature","wet_bulb_globe_temperature","delta_t","air_density"],"obs":[{"timestamp":1669687567,"air_temperature":3.8,"barometric_pressure":787.9,"station_pressure":787.9,"sea_level_pressure":999.4,"relative_humidity":32,"precip":0.0,"precip_accum_last_1hr":0.0,"precip_accum_local_day":0.0,"precip_accum_local_day_final":0.0,"precip_accum_local_yesterday":0.0,"precip_accum_local_yesterday_final":0.0,"precip_minutes_local_day":0,"precip_minutes_local_yesterday":0,"precip_minutes_local_yesterday_final":0,"precip_analysis_type_yesterday":0,"wind_avg":0.6,"wind_direction":172,"wind_gust":1.4,"wind_lull":0.1,"solar_radiation":0,"uv":0.0,"brightness":0,"lightning_strike_last_epoch":1666551734,"lightning_strike_last_distance":26,"lightning_strike_count":0,"lightning_strike_count_last_1hr":0,"lightning_strike_count_last_3hr":0,"feels_like":3.8,"heat_index":3.8,"wind_chill":3.8,"dew_point":-11.4,"wet_bulb_temperature":-1.7,"wet_bulb_globe_temperature":5.2,"delta_t":5.5,"air_density":0.99106,"pressure_trend":"steady"}]} |
I am NOT using HOOBS Node.js Version | v16.16.0 Node.js Version v16.16.0 Here is my response.
|
I was not able to reproduce. With that said this looks like Axios the HTTP library I'm using may not be returning a JSON object as it should. In a Hail Mary attempt to patch this for you I added JSON string parsing and more exception handling. Please let me know if this works! Thank you! https://github.com/chasenicholl/homebridge-weatherflow-tempest/releases/tag/v1.2.1 |
This seems like a relative thread after you two respond I'll try pinning the library to a lower version. |
I updated. I see a different error in the log now... And it appears to result in an infinite loop. PlatformERRORSyntaxError: Unexpected token � in JSON at position 0 |
This seems to be related to a regression introduced in the Axios dependency where it does not decompress the gzipped http responses. The unknown char is http gzip binary response data. Today I’ll pin the dependencies on an early version before the regression for introduced which should fix this. Thanks for the feedback! |
1.2.2 should fix this issue. Please confirm? Thank you! |
Confirmed. Fixed. Bravo! Thank YOU! 12/2/2022, 11:54:26 AMWeatherflow Tempest Bridge starting |
Thanks everyone for their feedback. Closing out this issue. Thank you! |
Thank you! It's working great! |
Here is my configuration:
The following log shows the unhandled exception that is being produced when initializing the bridge using HOOBS 4.2.8, Homebridge 1..5.0,
The text was updated successfully, but these errors were encountered: