naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
316 stars 63 forks source link

Warning in homebridge 1.3.0 because of wrong datatypes #184

Closed mrMiimo closed 3 years ago

mrMiimo commented 3 years ago

Hi, with the latest beta.66 version 1.3.0 of homebridge I got an error for the illegal "Air Pressure" value provided (see log below). This error prevents me from using the new "Child Bridges" feature and adds the accessory to the home app.

Tnks, Greetings

Feb 18 11:20:39 raspberrypi homebridge[23776]: [18/02/2021, 11:20:39] [homebridge-weather-plus] This plugin generated a warning from the characteristic 'Air Pressure': characteristic was supplied illegal value: number 700 exceeded maximum of 255. See https://git.io/JtMGR for more info.

https://github.com/naofireblade/homebridge-weather-plus/blob/52117ddb03e9fca0003686836427a22ad081c699/util/characteristics.js#L168

bigrichwood commented 3 years ago

Changing the format from UINT8 to UINT16 seems to fix it from a quick check. No idea if it breaks anything else though.

    let airpressureProps = (min, max) =>
    {
            let range = (units === 'sitorr') ? {unit: 'mmhg', maxValue: hpa2mmhg(max), minValue: hpa2mmhg(min)}
                    : {unit: 'hPa', maxValue: max, minValue: min};

            return underscore.extend(
                    {
                            format: Characteristic.Formats.UINT16
                            , minStep: 1
                            , perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
                    }, range);
    };
NorthernMan54 commented 3 years ago

@naofireblade We have marked homebridge-weather-plus as a blocking issue with homebridge 1.3.0 and advising users to not upgrade until these issues can be resolved. If you need assistance please reach out to us on discord.

We are tracking the status here

https://github.com/homebridge/homebridge/wiki/Homebridge-1.3.0-Release-Plugin-Testing-Status

joberembt commented 3 years ago

Also experiencing this but applied the changes bigrichwood above suggested and now it's loading - would be nice to get an official fix.

naofireblade commented 3 years ago

Will fix later today :)

naofireblade commented 3 years ago

All issues with homebridge 1.3.0 should be fixed now in v3.2.5.

NorthernMan54 commented 3 years ago

@naofireblade awesome, did you test with homebridge-1.3.0 ?

naofireblade commented 3 years ago

@naofireblade awesome, did you test with homebridge-1.3.0 ?

yes

NorthernMan54 commented 3 years ago

Thank you very much

I'm going to change the status of weather-plus to, update needed to weather-plus v3.2.5 or do you have another release coming ?

Tracker is here

https://github.com/homebridge/homebridge/wiki/Homebridge-1.3.0-Release-Plugin-Testing-Status

naofireblade commented 3 years ago

Thank you very much

I'm going to change the status of weather-plus to, update needed to weather-plus v3.2.5 or do you have another release coming ?

Tracker is here

https://github.com/homebridge/homebridge/wiki/Homebridge-1.3.0-Release-Plugin-Testing-Status

That would be great. No further update is planned for the near future.