mickgiles / homebridge-vesync

Homebridge plugin for vesync WiFi Power Outlets
6 stars 4 forks source link

Error message in console: ERR_INVALID_ARG_TYPE #17

Open intrepidsilence opened 1 year ago

intrepidsilence commented 1 year ago

Latest homebridge and this plugin, seeing this message (a lot) in console:

[homebridge-vesync-v2] ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null

mickgiles commented 1 year ago

I'm not seeing this on 1.6. Do you have any vsync devices that might not be supported that you need to add to the exclude list?

intrepidsilence commented 1 year ago

Apparently my scale is unsupported. However I cannot seem to figure out what to exclude to get it to stop complaining.

I have turned on debug, but the output from the plugin is exactly the same as without it.

Here is the output I get:

[2/10/2023, 10:48:50 AM] [homebridge-vesync-v2] Adding discovered devices
[2/10/2023, 10:48:50 AM] [homebridge-vesync-v2] Adding device:  null Scale
[2/10/2023, 10:48:50 AM] [homebridge-vesync-v2] ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null

I have tried excluding both "Scale" and "null Scale" but neither worked.

mickgiles commented 1 year ago

Best way to find the string to exclude is to find the accessory under the "Accessories" tab in homebridge and click the gear icon. That will give you a list of properties and you want the "Model" property. Also remember that is case sensitive. So it needs to be exactly the same. I suspect it's going to be the same model number as your scale, for example ESF-551, ESF24, or FIT8S

intrepidsilence commented 1 year ago

THat's great for things that get added, but since this causes a fault it never gets added and thus is not listed in Accessories.

mickgiles commented 1 year ago

Ah, good point. Can you tell me which model scale it is?

intrepidsilence commented 1 year ago

https://www.amazon.com/gp/product/B09HLZV4H9?ie=UTF8&psc=1

mickgiles commented 1 year ago

Can you try ESN-C551S and ESN-C551S-SUS and see if either of those work?

Phil-angelo commented 2 weeks ago

Hello, I am also receiving the same error message. I also do not see any of my VeSync devices in the Accessories in Homebridge, even after I have entered my credentials for the VeSync account. If I do need to exclude strings, where do I find the list of unsupported devices?