twocolors / esphome-native-api

MIT License
5 stars 6 forks source link

fix: not authorizing if no password specified #6

Closed richardhopton closed 1 year ago

richardhopton commented 1 year ago

A number of the requests (such as Subscribing to Bluetooth advertisements) require the ConnectRequest to be sent, and if it's not sent the socket is closed by the esphome device. The ConnectRequest is never sent if the device doesn't have an API password.

Making the ConnectRequest without a password is totally valid and stops the socket being forcibly closed by the esphome device.

twocolors commented 1 year ago

yep, looks right.

Thank you.

How do you implement with Bluetooth?

richardhopton commented 1 year ago

I'm testing out how to get Bluetooth to work currently; will submit PRs as I figure out how to make features work - but I'm using typescript so am also making a typescript type definition for this project.