Skip to content

Conversation

@robho
Copy link
Contributor

@robho robho commented Dec 7, 2025

This adds support for real-time availability data from Nobil. It uses the backend hosted by EVMap, described here.

It works very well I think! Thanks @johan12345 for setting up the backend!

One possible improvement would be to force a refresh of the nobil data when this code first runs. It's necessary to fetch all the data again to get the "EVSE UId" of all chargers for the real-time data to work properly. I haven't looked closely into this. Maybe I could force a database upgrade/migration (why isn't a database schema bump required when I've added EVSE UId to the database?) and clear the relevant Nobil tables?

Fixes #360

@johan12345
Copy link
Collaborator

Thanks a lot!

why isn't a database schema bump required when I've added EVSE UId to the database?

It should be - with a fresh install of the app, the Room library might not detect that something was added, but if you had the app already installed and data stored with the previous schema, it should complain that a migration is needed when you add the new field.

and clear the relevant Nobil tables?

Yes, you can delete any Nobil-related items in the SavedRegion and ChargeLocation tables as part of the migration, that should be enough to trigger a refresh.

@robho
Copy link
Contributor Author

robho commented Dec 14, 2025

Yes, you can delete any Nobil-related items in the SavedRegion and ChargeLocation tables as part of the migration, that should be enough to trigger a refresh.

👍 I added a migration step and it seems to work.

(I wasn't forced to create a migration step because (I guess) ChargeLocation.chargepoints is a text field (of json data) and it's still a text field after the EVSE UId change so the schema is unchanged.)

@robho robho force-pushed the nobil_realtime branch 2 times, most recently from 550118c to fe0d719 Compare December 15, 2025 19:09
@johan12345 johan12345 merged commit 897b439 into ev-map:master Dec 24, 2025
8 checks passed
@robho robho deleted the nobil_realtime branch December 24, 2025 18:14
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

Successfully merging this pull request may close these issues.

Nobil integration & real-time data

2 participants