Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nobil integration & real-time data #360

Open
robho opened this issue Aug 19, 2024 · 4 comments
Open

Nobil integration & real-time data #360

robho opened this issue Aug 19, 2024 · 4 comments
Labels
integration integration with 3rd party apps or services
Milestone

Comments

@robho
Copy link
Contributor

robho commented Aug 19, 2024

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 could be implemented as a separate data source in EVMap since Nobil has an open API that provides all information needed.
  • Open Charge Map uses Nobil to fetch chargers so it could be possible to use static data from Open Charge Map and "only" add the real-time data in EVMap. However, it doesn't look like Open Charge Map exposes the Nobil identifiers needed to map it's chargers to the real-time data.
  • 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.

Nobil API

@johan12345 johan12345 added the integration integration with 3rd party apps or services label Aug 19, 2024
@johan12345
Copy link
Collaborator

johan12345 commented Aug 19, 2024

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:

  • The user wouldn't need to switch to a different data source for other countries (we don't really have a solution to aggregate and deduplicate data from multiple sources - that's difficult to do efficiently without an own backend)
  • There are ways 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?

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
Copy link
Contributor Author

robho commented Aug 21, 2024

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.

@johan12345
Copy link
Collaborator

See #363 for the implementation of the Nobil data source (without real-time data for now)

@johan12345 johan12345 changed the title Nobil real-time data Nobil integration & real-time data Nov 24, 2024
@johan12345 johan12345 added this to the 2.0.0 milestone Nov 24, 2024
@robho
Copy link
Contributor Author

robho commented Dec 18, 2024

I've added nobil real-time support in https://github.com/robho/EVMap/tree/nobil_realtime (0cbffcb). It's based on #363.

There's a simple web client/server (python script) that receives nobil real-time data updates and provides an API that EVMap uses to fetch real-time data.

I don't know if this is something to build on going forward, but at least it's something to experiment with.

Instructions:

  1. Set environment variable NOBIL_REALTIME_API_KEY (this is not the same key as the "normal" nobil API key)
  2. Start web client/server _tools/nobil_realtime_server
  3. Update app/src/main/java/net/vonforst/evmap/api/availability/NobilAvailabilityDetector.kt and set the correct server address (needs to be https or you need to fix some android permissions)
  4. Build and launch EVMap

It takes some time for the web client/server to build up its database (availability updates are only sent on state change).


The nobil real-time data is quite good. Here are the number of unique charge locations that have reported real-time data some time during one week:
Denmark: 2288
Finland: 845
Iceland: 195
Norway: 3118
Sweden: 3809

Total: 10255

This can be compared to the total charge locations:

Country               OCPI   MANUAL
Denmark               2676   51
Finland               964    112
Iceland               210    0
Norway                3320   1379
Sweden                4301   2106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration integration with 3rd party apps or services
Projects
None yet
Development

No branches or pull requests

2 participants