Nobil: Add real-time availability support#407
Conversation
|
Thanks a lot!
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.
Yes, you can delete any Nobil-related items in the |
976124f to
d1fc4ea
Compare
👍 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.) |
550118c to
fe0d719
Compare
fe0d719 to
0972ca7
Compare
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