ev-map / EVMap

Android app to find electric vehicle charging stations - compatible with community databases such as GoingElectric.de and OpenChargeMap.org.
https://ev-map.app/
MIT License
192 stars 52 forks source link

Nobil real-time data #360

Open robho opened 3 weeks ago

robho commented 3 weeks ago

Nobil provides charger information for the Nordic countries and recently they also added support for real-time data (ie charger status / availability). EVMap could connect to Nobil to retrieve and present this real-time data.

Some general comments:

Nobil API

johan12345 commented 3 weeks ago

Hej, thanks for the information, that sounds really interesting! I have just requested a Nobil API key and signed up for an Enova account to check it out.

Of the sources we have currently implemented for real-time data, only NewMotion/Shell Recharge has some data in Norway, and additionally EnBW in Sweden and Denmark. But many operators there (I think especially in Norway) don't have roaming agreements with Shell, so the data is by no means complete. And of course it's much better to have an official public and documented API and to be able to directly match chargers to the realtime data by their IDs.

However, it doesn't look like Open Charge Map exposes the Nobil identifiers needed to map it's chargers to the real-time data.

Yes, they do - there is a "DataProvidersReference" included in the OCM data. I checked for a couple OCM stations that have been imported from Nobil, and the "DataProvidersReference" does seem to match the Nobil IDs.

The way to retrieve real-time data from Nobil looks different from how the existing real-time data in EVMap is fetched. Nobil uses websocket to send status updates. I don't think there's a way to request status for a specific charger / area.

Oh, right, this seems to be just a live data stream that provides all status changes from chargers while you are connected to it. But it doesn't seem to have a way to actively query the current status of a certain charger. So, I guess, if Nobil are not planning to offer this in the future, we would have to build our own backend that keeps a connection to Nobil's Websocket and stores the current state of each charger - then the app could query that information with a simple REST API.

Nobil could be implemented as a separate data source in EVMap since Nobil has an open API that provides all information needed.

Right. That could be an option, especially as Nobil seems to be quite complete in the Nordic countries and well-maintained - would you consider it to be the best data source for the Nordics (on a similar level or maybe even better than GoingElectric.de for Germany)?

The main benefits of continuing to use OCM are:

But I have also heard that OCM is not so actively maintained anymore, I'm not sure if the Nobil import is still up-to-date... See also this forum post: https://community.openchargemap.org/t/retirement-of-data-imports-etc/307 And I am also working on adding OpenStreetMap as another data source (#290) - this has mainly been requested by the Swiss community. It seems like Nobil data are being imported to OSM as well? So maybe this would be another option, once it is implemented.

robho commented 3 weeks ago

Nobil seems to be quite complete in the Nordic countries and well-maintained - would you consider it to be the best data source for the Nordics (on a similar level or maybe even better than GoingElectric.de for Germany)?

I wouldn't say that Nobil data is well-maintained, but it has potential to be a very good data source since it gets automatic OCPI updates from many charge providers. A big problem with Nobil (at least in Sweden) is that it has lots of data that has been added manually and this data rots over time or gets duplicated when the same data is received over OCPI. The only way to fix these problems is to send e-mail to the authority that manages Nobil in Sweden and the level of attention you get varies.

Open Charge Map, as you write, isn't running the Nobil import regularly and has imported lots of invalid data. OCM also can't detect and handle entries that have been removed from Nobil, so removed data is left in OCM. So, unfortunately, OCM, in its current state, isn't very reliable.

Open Street Map.. I didn't know that they imported from Nobil. It looks like they also import manually and at the moment have data that's quite outdated and have inherited invalid data from Nobil.

I think the best user experience, in Sweden, today would be to use Nobil directly as a data source, but ignore all the manual entries ("ocpidb_mapping_stasjon_id" == null in Nobil data). Or, maybe the manual entries could be enabled/disabled by the user or highlighted in in UI with a specific symbol or colour.

There are ways [with OCM] for users to contribute additional information for chargers (pictures, descriptions, comments, outage reports) and add extra chargers that might be missing (e.g., chargers operated local businesses without connection to any of the big networks) - I'm not sure if there are ways to do this directly at Nobil?

I think it's possible to add some user data to Nobil. Here's one EVSE where there is a description, a comment and a picture:

{"id": 22957, "name": "revirvägen 18", "ocpidb_mapping_stasjon_id": null, "Street": "revirvägen", "House_number": "18", "Zipcode": "69530", "City": "Laxå", "Municipality_ID": "1860", "Municipality": "Laxå", "County_ID": "18", "County": "ÖREBRO", "Description_of_location": "58.983471, 14.627367\r\nhttps://maps.app.goo.gl/FX9vs32dEK3tMpc16", "Owned_by": "Compromix AB", "Operator": "Compromix AB", "Number_charging_points": 4, "Position": "(58.98379,14.62791)", "Image": "22957.png", "Available_charging_points": 4, "User_comment": "El bilsladdning 4st ccs max 180kw\r\nöppet dygnet runt", "Contact_info": "felanmälan till +46352611001", "Created": "2024-03-23 11:05:28", "Station_status": 1, "Land_code": "SWE", "International_id": "SWE_22957"}

However, it's not as flexible as OCM. You have to send contributions by e-mail and hope that it gets handled.