Giter Site home page Giter Site logo

Comments (2)

itchannel avatar itchannel commented on September 26, 2024 1

Hi @cr08

To answer a few of your points:

  1. Status function does a separate poll to refresh all HA entities as the service call needs to return True/False for HA to do it's thing. It could probably be rewritten to be a little smarter on the API call handling but it's finding the time :)

  2. In terms of smart polling etc. What you can currently do and it's what I do is have an automation that checks if the ignitionStatus is set to On if so it polls the API every minute or two until the IgnitionStatus goes back to Off. This is separate from the 15min set interval as you can just call the poll_api service request inside your automation.

I know @SquidBytes was looking into more charging orientated status's and automations however he's been busy with personal things. As said you can easily create automations in HA or outside if your running it standalone that monitor certain values as you mentioned and then just manually poll the API yourself to retrieve the data as often as you want. You could even set the auto poll interval to like every 24hrs so it's entirely dependent on your automations for updates.

Obviously just be careful with how often you poll the API as Ford have not released any details on what the API call limits are.

from fordpass-ha.

cr08 avatar cr08 commented on September 26, 2024

Awesome! So it looks like I'm on the right track and not the only one that's went down this thought process. 😅

In terms of smart polling etc. What you can currently do and it's what I do is have an automation that checks if the ignitionStatus is set to On if so it polls the API every minute or two until the IgnitionStatus goes back to Off. This is separate from the 15min set interval as you can just call the poll_api service request inside your automation.

Just to confirm since the terminology is a bit weird and easy to mix together, but the polling you do every minute is that just the basic get_status polling or is this the full refresh that calls for the vehicle to update? I'll probably stick to the 15m interval initially if only to play it safe. As you said, Ford hasn't published anything because technically this isn't an approved use of their API. But if I can increase that later, that would certainly be handy if it is the full refresh.

Yeah, I read some of Squid's comments elsewhere and family/personal stuff definitely comes first. But I think there may very well be some crossover in some of our work as things progress. Right now my ultimate intent intent is to have a dedicated web dashboard to return a lot of features that Ford has given up on for these 1st gen PHEVs like having full trip data, potentially charge 'logs', and whatever other useful data I can add in a user friendly manner. Unfortunately it seems like there's a lot of inferring to do with the data provided and figuring how to build all the logic for that.

I guess the next thing on my agenda to sort out and not sure if I should just keep it here or open a new issue is if anyone has tried to figure out how to correlate individual trips from the trip specific data points? I know on my vehicle there's no longer any direct trip/journey status info available, just the individual datapoints from the API. Not sure if this is the same for other vehicles. My original thought was using the correlation ID but I've found in some cases that updates on a refresh (including the update time) even if the vehicle hasn't moved. But if no one has any ideas on this, I can continue to pour over all the logs I have so far (I've had my script running for over a week and it saves an individual json file of the status endpoint every 15m. Just to have plenty of data to test with) and see if there's any logic I can use on that. May just be going back to the ignition on/off status.

from fordpass-ha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.