Open ustunsoz opened 2 years ago
Could you please try the following: On line 60 of the yaml, you can change it to
if (data_flags == 0x98 || data_flags == 0x18) {
If this doesn't work, please send your full yaml, and verbose debug log from startup, and let it run a few minutes while it scans bluetooth devices. Please make sure your Watch is very close (< 30 cm) to the receiver. Verbose logging can be set:
logger:
level: VERY_VERBOSE
Unfortunately if (data_flags == 0x98 || data_flags == 0x18) { didn't workout. Here is my log & yaml logs_presense_logs.txt presence.txt
Thank you for your kind help
Thanks for the debug logs.
When you were testing this, were you wearing your watch, and was it unlocked? (i.e. didn't need a pin code to access the screen). If it was locked at the time of debug, please can you repeat the test, but with the watch unlocked (on wrist) and send the results?
On line 60 try change the line
if (data_flags == 0x98 || data_flags == 0x18) {
to
if (data_flags == 0x98 || data_flags == 0x18 || data_flags == 0x1C) {
Thanks for the prompt reply, yeah after last tweak now I can see my watch as online!
My watch was unlocked at first attempt . And again I have got the result as unlocked again.
As you have pointed out, in order to get online, I should get watch very close to esp32 it sensing only 5-10cm close. But normally my iPhone always in connect with my watch in a same room, shouldn't be that much close isn't it?
Finally if you lead me how to tweak distance I will appreciate very much.
I have shared latest log with you
Here is the log after turn off very_verbose option logs_presense_logs (3).txt
Thanks. Both log files were helpful. Try changing line 61 from
if (status_flags == 0 || status_flags == 2) {
to
if (status_flags <= 2) {
Also, please see my point (3) above. But let me clarify more: In Home Assistant, you have
input_number.rssi_not_present
currently set to -50. Change this value to -90input_number.rssi_present
is currently set to -40. Change this to -77See the readme config file explanation
-77/-90 values are good defaults and you should only need to change them if your watch is being detected outside the room, or not being detected inside the room. Try the defaults fist, and then tweak later.
Thank you Dale now working fine. I appreciate your assistance.
Last think, is there any way to send messages to mqtt only if certain distance change occurred. Because there is big data flow to mqtt and I afraid it will fill-up all SD card on raspberry pi (Home Assistant)
I'm glad we got it working.
Does it still work when your watch is off your wrist, and auto-locked?
Regarding 'too much data': That's a good point. The largest source comes from the apple_watch_rssi
sensor. You can make that sensor internal to ESPHome, so the data is not shared with MQTT/HA. To do this, at about line 79, add a new line with
internal: true
You won't be able to see the rssi in HA any more, so maybe only do this after you've tweaked the input_number.rssi_present
and input_number.rssi_not_present
values for your room.
However, there is also inconsistent action when I am away from esp32 sensor, it remains as detected and not going back not-home state and rssi value remains as last updated state. I couldn't justify somehow.
I have shutdown the watch and dale_lounge_presence state not switching to OFF
Could you send some debug logs of
Thank you for the reply,
I have attached the log, and sensor states as well as the yaml and automation.
When I take off the watch, the rssi pulses stopping after while, also complete shutdown the pulse stopped (roughly took a a minute to stop, I think during shutdown process pulse remains).
Watch shutdown at 16:21 and home assistant remains detected never turns to Clear.
The main issue is the automation not updating on the rssi signal stops.
Hi,
I am happily using first generation apple watch! I am starving to use this tool but I couldn't detect my watch ever.
LightBlue App shows my apple watch ID as UUID: 5F666A3B-2EA9-8653-46E8-298D92EAF408
I will be grateful if you lead me to the right direction