Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration automatic updates #137

Open
craigo1975 opened this issue Mar 12, 2024 · 4 comments
Open

Integration automatic updates #137

craigo1975 opened this issue Mar 12, 2024 · 4 comments

Comments

@craigo1975
Copy link

Hi,

What a cracking integration, only just found it this week, loving all the info it pulls into HA. I've tried various different configuration options all with my PIN populated but I'm finding the integration only seems to update once a day even though I've set the scan interval to every 5 minutes. I've setup a manual refresh button that works and was about to configure an automation to manually refresh every 5 minutes but thought I would check if there is a known issue with the integration not refreshing itself automatically or just my miss-understanding?
I have setup automations to notify me when the car is started up and driving (sensor.my_car_current_status) so was assuming that scanning every 5 mins would pick up a change in status within 5 mins of having started a journey? or do I need to set the health info scan to every 5 minutes to achieve that?

Thanks,
Craig

@ismarslomic
Copy link
Collaborator

@craigo1975 are you using the main version og beta version?

@craigo1975
Copy link
Author

Hi!
I'm using the latest main version 2.2.7.

Here's an example that hopefully displays my query:

I have the "scan interval" set to every 5 minutes, "Health Update" every hour:
1

Home Assistant checked for activity at 8:10
My partner left home in the car at 8:15
At 8:43 no activity has been identified, the car shows as being at home locked, when in fact it's been driving for 28 minutes and is 10 miles away?
2
3

I just don't understand what info the "scan interval" every 5 minutes pulls back? It seems if I want to get alerted that our car has been unlocked and is moving, then I need to perform a "health update" every 5 mins as the "scan interval" set to 5 minutes doesn't seem to identify anything or update any sensors, but I'm concerned about the "don't set health update to less than 2 hours" advice in the instructions?

At 9:09, 54 minutes after the car had been moving still no sensor updates
4

Then at 9:10, I assume as part of the hourly Health update it identifies that the car is turned on and moving...
5
6

Any advice will be greatly appreciated

@msp1974
Copy link
Owner

msp1974 commented Mar 21, 2024

Just for info on scan interval v health update. Your car (well most cars) should send updates to the JLR servers on certain events like unlocking, starting engine, stopping engine etc. The scan interval reads this current info from the JLR servers. The health update requests the car to send its info to the servers for us then to read a current status.

I'm wondering if your car is not sending these event updates as we normally see but only when you request a health update.

I have posted tonight on the forum page about work we have been doing to better get current status from the JLR server data. It will be a number of weeks as I am not able to work on this for a little while but we can see if this improves the situation.

I assume the app reflects the status correctly? You will need to have the app open to test this as the first time you load it, it often calls a health update.

@craigo1975
Copy link
Author

Sounds like your theory is spot on.

I just tried a test for extra info:
open Home Assistant at 12:49 and it shows HA last checked for activity at 12:10 (I assume as part of the hourly health check)
Screenshot 2024-03-21 124939

I then went into the land rover app at 12:50 which initially said last connected 16 hours ago, but after a few seconds updated itself...I assumed that would be the equivalent of a heath check but via the Land Rover app and updates the LR servers?

So I was half expecting Home Assistant to then pull the new info from the LR servers within 5 minutes of 12:50?

However at 13:05, Home Assistant still hasn't pulled any updates as part of the 5 minute scans?
Screenshot 2024-03-21 130518

Then strangely, 30 seconds later and 5 mins earlier than the hourly scheduled health update, Home Assistant updated...
Screenshot 2024-03-21 130703

To me this indicates the servers that Land Rover expose to Home Assistant were updated around 10 minutes after I opened the LR app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants