EVMap
EVMap copied to clipboard
Nobil integration & real-time data
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.
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.
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.
See #363 for the implementation of the Nobil data source (without real-time data for now)
I've added nobil real-time support in https://github.com/robho/EVMap/tree/nobil_realtime. 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:
- Set environment variable NOBIL_REALTIME_API_KEY (this is not the same key as the "normal" nobil API key)
- Start web client/server _tools/nobil_realtime_server
- 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)
- 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
Nobil seem to be deprecating support for Denmark, Finland and Iceland in October, and focusing only on Sweden and Norway: https://info.nobil.no/nyheter/264-important-update-on-nobil-data-nobil-will-no-longer-support-data-from-denmark-finland-and-iceland I have already adjusted the description within EVMap so that it mentions Sweden and Norway.
Do you still want to keep the Nobil implementation? If so, I can clean it up once nobil has removed the unmaintained data. I think the implementation would continue working without any adaptations, but there could possibly be failing API calls when querying nobil for the number of chargers in Denmark, Finland and Iceland (download progress bar calculation).
Although they're dropping some countries from Nobil, my feeling is that data for Sweden is improving daily. Nobil has OCPI data from many charge point operators in Sweden and the number of manually handled charge points has decreased quite a bit. Today there are 7573 OCPI chargers and 894 manually handled chargers in Sweden.
For Norway I don't know how reliable Nobil is. They have a higher ratio of manually handled to OCPI chargers: 1396 manual, 3318 OCPI.
Yes, of course we can keep the implementation - don't want to waste your great work 🙂. Nobil's rationale that they want to focus on the countries where they have the means to keep the data quality high makes sense.
Yes, would be great if you can keep an eye on the data and check if any updates to the implementation are needed once the countries have been removed.
As mentioned elsewhere, I have started working on a backend that could aggregate data (static and real-time) from multiple sources. So then it will be even less of a problem if one data source only focuses on certain regions. But that will take some more time.