Comments (17)
I tried the update and had some issues with my bluetooth unrelated.. then had some travel. Will try again when i get back.
Did you see the new bluetooth proxy stuff in 2022.9? Its ‘listen only’ for now, but they expect it to be bidirectional in a future update. This might be far and away the simplest solution.
from snooz.
So far, the last 30 min or so has been very reliable. If it does 'disconnect' I will move it and try it again.
I am running HASSOS as a VM in unraid
I would be down for that 'relay' thing. I have been using an ESP32 for connecting to a little BLE temp sensor and that has been awesome.
I had tried several times to rename the entity to 'master_snooz' and then it could never connect again..
I will try to also connect my son's snooz and I can try more things.
one thing that might be cool to add would be an information sensor for tracing the BLE statistics. those might be readily available and might make this sort of troubleshooting easier.
from snooz.
Awesome, I will try tonight.
I have Three Snooz's, one for each bedroom.
Thanks for your work on this.
from snooz.
Hi @kpurintun, thanks for reaching out. Unfortunately this integration isn't currently stable. In short, the instability is due to the SNOOZ device's Bluetooth controller "crashing" after long persistent Bluetooth connections.
A fix to this instability would be to change the integration to use less frequent, short lived Bluetooth connections, rather than staying connected for as long as possible. The downside here is that it may take much longer to respond to requests from home assistant if SNOOZ isn't connected at the time of the request.
That said, I do plan on revisiting this integration to fix these stability issues soon - a few people including yourself have reached out and I think it's worthwhile.
I met with one of the founders of SNOOZ earlier this year to talk about the SNOOZ's Bluetooth protocol and make sure the reverse engineered protocol was accurate. From what I learned in this meeting, I suspect we might also be able to add functionality to this integration that exists in the mobile apps today, like scheduling. Stay tuned for that work, but in the meantime I hope to get some free time in the near term to address the stability issues.
from snooz.
That is great news. It would be great to have some Snooz support in the integration.
Are there any FW updates that they have put out? I couldn't find any.
from snooz.
@kpurintun Just pushed an update that should resolve all problems with instability. It turns out these issues were related to my approach to multithreading, and the SNOOZ device was functioning as expected.
I've only tested adding a single device, although it theoretically should support multiple devices. If you're willing - please let me know if you can successfully add and control multiple devices. I plan on picking up another one to test myself.
My next goal is adding tests and submitting this integration to home assistant core, so that HACS is no longer needed.
from snooz.
@kpurintun following up - were you able to try it out?
from snooz.
I was not able to get this to work. in the very beginning, I could get it to connect briefly. use HA to change speeds and turn it on and off. It worked for a few minutes then stopped.
i am going to try again and follow the logs. see if i can see a reason why
from snooz.
Okay.. just tried and had some workingness.
- I always can setup the integration. it always smoothly adds the integration.
- immediately after set up, I cannot get it to activate the fan. but a few minutes later, the fan will activate.
- at this point it will respond to commands. sometimes intermittently or delayed.
- I have found that if I rename it from 'Snooz-XXXX' to 'Master Snooz' it will stop working. and it will never respond again.
- not renaming it has made it work longer than ever.
I definitely think I have a range issue. the BLE adapter I have has a large antenna and was supposed to have a good range.
This error originated from a custom integration.
<
Logger: custom_components.snooz.peripheral
Source: custom_components/snooz/peripheral.py:55
Integration: SNOOZ Noise Maker (documentation)
First occurred: 9:29:41 PM (2 occurrences)
Last logged: 9:29:41 PM
Missing 'state' in stat response during connection: None
2022-06-12 21:29:41 ERROR (SnoozDevice-88:6b:0f:33:cf:45) [custom_components.snooz.peripheral] Missing 'state' in stat response during connection: None
2022-06-12 21:29:41 ERROR (SnoozDevice-88:6b:0f:33:cf:45) [custom_components.snooz.peripheral] Missing 'state' in stat response during connection: None
from snooz.
crud. I was helping my brother out with getting HACS working and forgot I was still in his account.
from snooz.
Thanks for providing those logs! It very well could be a range issue.
- Are you able to test with the SNOOZ right next to your host to rule out distance?
- What platform is your home assistant instance running on? i.e. Raspberry PI via HassOS, container, etc.
If distance is indeed the issue, there's a few things I have planned to potentially work around this. One idea is to have a separate device relay commands/state change to WIFI so the hardware running home assistant isn't constrained by distance to SNOOZ devices.
immediately after set up, I cannot get it to activate the fan. but a few minutes later, the fan will activate.
at this point it will respond to commands. sometimes intermittently or delayed.
Right now, when a command is sent to a SNOOZ and the device isn't connected, it queues the command for next time the device is connected. This may explain the delayed updates.
I have found that if I rename it from 'Snooz-XXXX' to 'Master Snooz' it will stop working. and it will never respond again.
Rename what exactly? The device/entity in home assistant, or the SNOOZ's bluetooth name? This integration only discovers devices with names that start with Snooz-
.
from snooz.
So i think my issue is range.. i think it might sort of go to sleep after a while, then just not connect to the low signal after that.
from snooz.
Hi @kpurintun, I just released v0.1.1 which adds a sensor for connection status and signal strength. SNOOZ was kind enough to send out a device so I've been able to thoroughly test connections, multiple devices at once, etc. This release is a complete rewrite - let me know if you're still having issues with range.
I'm thinking the most straightforward solution for an ESP32 gateway might be something like this - https://github.com/shmuelzon/esp32-ble2mqtt
from snooz.
Did you see the new bluetooth proxy stuff in 2022.9? Its ‘listen only’ for now, but they expect it to be bidirectional in a future update. This might be far and away the simplest solution.
I did not - holy moly, what an exciting project. I'll follow along and make sure SNOOZ is supported when active connections are supported.
from snooz.
I've just updated to 2022.10.0 and ESPHome 2022.9.3 to try out the Bluetooth active connections. For reference, my Snooz is out of Bluetooth range for my Pi4 running HA but within Bluetooth range for an ESP32 running ESPHome. When I updated my ESPHome config, HA automatically detected the Snooz and asked if I wanted to set it up! I put the Snooz into pairing mode and the integration setup completed successfully, but commands do not work. My log has one related error:
[Snooz 07C8] Unavailable after 3 connection attempts
This is with my phone's Bluetooth turned off, so nothing else is actively trying to connect to the Snooz. I tried turning up the ESPHome logger level but the result didn't seem to show any errors, just ble advertisement info.
from snooz.
Thanks for the details @strikeir13. It's promising that you're able to setup the integration using a ESP32 proxy. Setup doesn't require an active connection, so I suspect there may be some code changes to support active connections setup by the esphome proxy device.
Let's move this discussion to #10.
from snooz.
Going to close this thread since a lot has changed since it was opened. @kpurintun please feel free to open a new issue when you get a chance to test again.
from snooz.
Related Issues (9)
- AttributeError: 'SnoozFan' object has no attribute '_address' HOT 3
- Home Assistant 2022.10 - Active Bluetooth proxy connections HOT 5
- Device doesn't respond to commands from Home Assistant HOT 8
- Component causes performance issues across all of Home Assistant HOT 6
- Error in HA log and on component install with HA 2021.5.0 HOT 2
- No valid version key in manifest file - as of HA 2021.6, integration is not loaded at startup HOT 1
- Latest HA update 2022.7 breaks Bluetooth-based integrations HOT 2
- Error setting up entry Snooz A516 for snooz HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snooz.