PfisterDaniel / node-red-contrib-apple-find-me

Node to get the current locations and other metrics of connected Apple devices.
MIT License
23 stars 5 forks source link

Locate my Devices (apple-find-me) doesn't return "batteryLevel" and "batteryState" reliably #5

Closed steve2211 closed 3 years ago

steve2211 commented 3 years ago

Node Red V1.2.5 running on Raspberry Pi. node-red-contrib-apple-find-me on V1.0.7.

I had the "Locate my Devices"-Node running for a while and the data was being saved to influx db. However after a while the "msg.payload.iPhone[0].batteryLevel" value started to be 0 more and more often. When I redeploy the Node it returns the correct battery Level once and then starts to return 0 again. Let me know if you need more information.

PfisterDaniel commented 3 years ago

Hello, unfortunately I cannot replicate the problem. My node has been running for a long time and I always get the correct percentage values back. I save my values in a SQLite database.

PfisterDaniel commented 3 years ago

what interval have you set? My interval is 5 minutes.

steve2211 commented 3 years ago

My interval is set to 15min. I just double checked if the problem has to do with my code or influxDB but a "debug" node connected to the "Locate my devices" node returns zeros as well. But maybe it has something to do with my phone being in airplane mode during the night? As you can see in the picture the first faulty datasets startet to appear before I turned airplane mode on. Then the last dataset for the day was the one from 01:18 and i turned the airplane mode off at 11:40. The first transmission was correct. After that mostly zeros again. dataset

steve2211 commented 3 years ago

So I turned the interval back to 5min and now everything works fine. No more zeros. For me this solves my Problem so I will close this case.

PfisterDaniel commented 3 years ago

Perfect, but I'll double-check the problem in detail over my Christmas vacation. Thank you for your feedback

steve2211 commented 3 years ago

Let me know if you find something. The 5min interval is draining the battery of my phone faster than i expected ;)