Skip to content
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

I got the error like this: #226

Closed
boomchatchat opened this issue Nov 18, 2021 · 10 comments
Closed

I got the error like this: #226

boomchatchat opened this issue Nov 18, 2021 · 10 comments
Labels
question Further information is requested

Comments

@boomchatchat
Copy link

boomchatchat commented Nov 18, 2021

I got the error like this:
How to fix it?

[11/18/2021, 11:12:58 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[Removed rest of the log because they don't provide any additional value. - Rifat]

@boomchatchat boomchatchat added the question Further information is requested label Nov 18, 2021
@torifat
Copy link
Owner

torifat commented Nov 18, 2021

Can you please share your version of homebridge-xiaomi-mi-air-purifier?

@Csehla
Copy link

Csehla commented Nov 18, 2021

I got the error like this: How to fix it?

[11/18/2021, 11:12:58 PM] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info.
[Removed rest of the log because they don't provide any additional value. - Rifat]

I have the same problem!

@torifat
Copy link
Owner

torifat commented Nov 19, 2021

@Csehla your issue is similar to #223

@Dane03
Copy link

Dane03 commented Nov 20, 2021

@torifat Thanks for your effort here.
I am constantly getting errors like

20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.
[20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.

Version is homebridge-xiaomi-mi-air-purifier v2.0.0
NPM 8.1.4
Node 16.13

Using Xiaomi Air Purifier 2h and Pro H

@guesq
Copy link

guesq commented Nov 21, 2021

@torifat Thanks for your effort here. I am constantly getting errors like

20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Lock Physical Controls': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info. [20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info. [20/11/2021, 19:08:09] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'value'). See https://git.io/JtMGR for more info.

Version is homebridge-xiaomi-mi-air-purifier v2.0.0 NPM 8.1.4 Node 16.13

Using Xiaomi Air Purifier 2h and Pro H

Same here.
I find the values of property filter_life and child_lock are undefined.

return device.property('filter_life').value;

return device.property('filter_life').value <= options.filterChangeThreshold

So I comment these lines out for now, then return some determined values and these errors are gone. There might be something wrong with getting these properties values.

@torifat
Copy link
Owner

torifat commented Nov 21, 2021

@Dane03 @guesq seems like you folks are having a different problem. So I will create a separate issue for this. In the worse case, I can automatically disable filter_life and child_lock for 2H and Pro H.

@guesq did you try to turn them off in settings before commenting out the code?
Screen Shot 2021-11-21 at 4 36 12 pm

@guesq
Copy link

guesq commented Nov 21, 2021

@Dane03 @guesq seems like you folks are having a different problem. So I will create a separate issue for this. In the worse case, I can automatically disable filter_life and child_lock for 2H and Pro H.

@guesq did you try to turn them off in settings before commenting out the code? Screen Shot 2021-11-21 at 4 36 12 pm

@torifat Thanks for your reply.
I'm using Xiaomi Air Purifier 2H. This is my settings:
Mi-Air-Purifier-Settings
I did not turn Child Lock on and only got the errors about Filter Life Level and Filter Change Indication. So I just commented out the lines with filter_life property. I also tested turning on Child Lock and got the errors about Lock Physical Controls.

@torifat
Copy link
Owner

torifat commented Nov 21, 2021

@guesq Ah! thank you. My bad! It's filter_life and not Air Quality. Also, thanks for confirming that the setting works for Child Lock.

@luluhoc
Copy link

luluhoc commented Nov 22, 2021

#233

made a pull request fixing this bug

@torifat
Copy link
Owner

torifat commented Nov 23, 2021

Closing this in favour of #229

@torifat torifat closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants