lsiddiquee / com.rexwel.bmwconnected

GNU General Public License v3.0
2 stars 3 forks source link

“When” card for geofence trigger #33

Closed BBEHannes closed 7 months ago

BBEHannes commented 1 year ago

As of now the only way to trigger geofence changes is to do it based on a “when” trigger that checks every time the location changed. It would be beneficial if we can have a “when” card specifically to the vehicle leaving/entering a Geofence.

lsiddiquee commented 9 months ago

That is a great idea, will add it on the next update. I was not really sure how much the geofencing option is actually being used.

lsiddiquee commented 9 months ago

@BBEHannes I have just published a test version of the app where I have added the enter and exit geofence. Also added support to use the current location to populate the geofence in the settings area. Can you test and provide feedback,

https://homey.app/en-nl/app/com.rexwel.bmwconnected/BMW-Connected/test/

BBEHannes commented 9 months ago

Hello!

thanks for your efforts.

so I tried installing the app and from that moment on my car became unreachable from within homey.

tried to delete the vehicle but it could not find the car anymore. Removed the test app, restarted homey, installed the normal/stable app and even then it cannot find my car anymore, showing “network request failed” every time I try and add the device.

Super strange, any thoughts what this could be?

in the logs it shows; “error 401”, attempting to retrieve token.

lsiddiquee commented 9 months ago

Can you logout from the BMW app (The connected drive app from bmw not the one in Homey) and login again. If this does not help can you change the password. I am seeing this issue regarding 401, and seems to get resolved by changing password.

BBEHannes commented 9 months ago

Logged out, logged in, changed password but same behavior… when I (re-)install the app I try to log in and click on “save changes”. Then I wait and it times out I think? All worked flawless until I installed the test app. From that moment on (even when removing and installing the stable app) nothing seems to work anymore.

reboots of homey also did not resolve the issues.

I am at a loss :(

BBEHannes commented 9 months ago

Three hours of testing later I give up… adding the credentials and pressing “save settings” takes a very long time, then times out and trying to add the car shows credentials needing to be entered (which I’ve already done). Restarting the app allows me to search for the car but never gets found. Problem is with both test app and stable.

On the BMW app side of things I’ve logged out multiple times, logged in, changed password three times but still nothing.

Too bad as the app used to work alright

lsiddiquee commented 9 months ago

Can you enable the logging in debug mode and see if any logs are generated. If the logging does not work, let me know I will push a new test version with additional logging to try to identify the issue.

BBEHannes commented 9 months ago

Thanks! Ive installed the test app, added username and password as well as enabling debug logging, clicked "save settings" and waited until it timed out.

reopened the app and checked the logs and they show;

image

=========== Additionally, I restarted the app and tried adding the car. This ends up in "Network request failed". Logs then show the following;

image

Let me know how to proceed and thanks again for your efforts :)

BBEHannes commented 9 months ago

Update on this... During all my tests I was not on my own network (the local network my Homey also is running on) as I was traveling. I just arrived home, installed the test app, added my username/password and instantly it Signed in successfully. Not sure what to conclude from this other than you need to be on your local network in order to successfully add your ConnectedDrive Profile?

BBEHannes commented 9 months ago

Tested the new geo-fence (when) cards and they are working flawlessly! Might it be helpful to add a "and" logic card that can live outside of the "when" geo-fence? That way in other flows that don't have the "when geo-fence enter" we can call the condition of the fence.

lsiddiquee commented 7 months ago

@BBEHannes Feature added and currently available in test build available https://homey.app/en-nl/app/com.rexwel.bmwconnected/BMW-Connected/test/.

Please verify and let me know if there are any issues.

BBEHannes commented 7 months ago

Perfect, thanks for your hard work! I’ve changed my flows with these new cards and monitor the results.

Final “great to have card” would then be a “then” card that starts/stops charging

lsiddiquee commented 7 months ago

I am planning on adding this, however, as I have a PHEV this functionality is not available to me. Will need to see if I can get my hands on one sometime then will add this feature. Please provide an update on the condition card, so that I can proceed on closing this ticket.

25 is the issue for start/stop charging. You can follow that, will post update on that one.

BBEHannes commented 7 months ago

@BBEHannes Feature added and currently available in test build available https://homey.app/en-nl/app/com.rexwel.bmwconnected/BMW-Connected/test/.

Please verify and let me know if there are any issues.

Working like a charm!

lsiddiquee commented 7 months ago

Thanks for the update closing the issue.