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

Mark not connected charge points as unavailable #355

Closed
4 tasks done
redhell opened this issue May 23, 2020 · 9 comments
Closed
4 tasks done

Mark not connected charge points as unavailable #355

redhell opened this issue May 23, 2020 · 9 comments

Comments

@redhell
Copy link
Contributor

redhell commented May 23, 2020

Checklist

  • I checked other issues already, but found no answer/solution
  • I checked the documentation and wiki, but found no answer/solution
  • I am running the latest version and the issue still occurs
  • I am sure that this issue is about SteVe (and not about the charging station software or something unrelated to SteVe)

Specifications

SteVe Version     :  Latest master
Operating system  : Mac w/Docker
JDK               :  11
Database          : MySQL Docker

Expected Behavior

After a charge point looses connection and no heartbeat is received anymore the backend should mark the charge point as unavailable.

Actual Behavior

If a charge point disconnects/looses backend connection the charge point is never marked as unavailable. The charge point is listed with its last state.

Steps to Reproduce the Problem

  1. Connect charge point
  2. Disconnect from network
  3. Wait
  4. Box should have state unavailable

Additional context

image
The last entry never showed up again. It should be unavailable or removed from list.

@redhell redhell changed the title Mark not connected charge points as unav Mark not connected charge points as unavailable May 23, 2020
@redhell
Copy link
Contributor Author

redhell commented May 24, 2020

The stations are connected via OCPP 1.6J. So it makes sense if WS connection is lost and/or last heartbeat is ago, the station should have state Unavailable.
According to the OCPP specs it is advised to send a Heartbeat at least every 24 hours or configurable time interval.

@goekay
Copy link
Member

goekay commented May 25, 2020

i am not sure about this. i see the benefit, but it would be a major re-interpretation of ocpp status values. on this table, we are only reading and showing the status values that are sent with the ocpp message. no intermediate magic, no re-interpretation, no "marking a json station with the state unavailable, if it is disconnected"

@redhell
Copy link
Contributor Author

redhell commented May 29, 2020

@goekay So I should implement this in the controller/service which handles the web socket connections? Can you give me a hint where to go?

@csamsel
Copy link
Contributor

csamsel commented May 29, 2020

I would argue that a disrupted web socket connection alone is not indicative that the station is offline. We should only react on a missed heartbeat. So we would need to compare current time > previous heartbeat + interval -> change state in database to something like heartbeat missed.

@lategoodbye
Copy link
Contributor

Since charge points can operate while been offline so the term "Unavailable" won't be correct from CP perspective. I think it would be better use "Unknown", but this isn't an official status.

I agree with @csamsel that web socket connection shouldn't be the indication for offline in order to handle the SOAP connections, too. But the implementation must compare against the last received PDU, not just Heartbeat.

Beside that, may be this should be (also) a email notification.

@goekay
Copy link
Member

goekay commented May 30, 2020

maybe marking json stations as "not connected" additional to the ocpp status is the way to go? i am thinking an asterisk or superscript or something like that.

@csamsel
Copy link
Contributor

csamsel commented May 30, 2020

Yeah. Make the state an additional column/field independent of the OCPP state sounds reasonable.

@goekay
Copy link
Member

goekay commented Feb 12, 2022

hey all, i have a working implementation of this feature in the referenced branch. i added an offline icon next to the charging station with a tool tip as shown in the screenshot below.

if you are okay with this, i will merge it later.

station-offline2

goekay added a commit that referenced this issue Feb 13, 2022
Mark not connected JSON charge points as disconnected (#355)
@goekay goekay closed this as completed Feb 13, 2022
robertkrantz added a commit to foredev/steve that referenced this issue Feb 21, 2022
* Mark not connected JSON charge points as disconnected (steve-community#355)

SVG from https://uxwing.com/cloud-connection-offline-icon/

* Bump jooq.version from 3.16.3 to 3.16.4

Bumps `jooq.version` from 3.16.3 to 3.16.4.

Updates `jooq-meta` from 3.16.3 to 3.16.4

Updates `jooq-codegen` from 3.16.3 to 3.16.4

Updates `jooq` from 3.16.3 to 3.16.4

Updates `jooq-codegen-maven` from 3.16.3 to 3.16.4

---
updated-dependencies:
- dependency-name: org.jooq:jooq-meta
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jooq:jooq-codegen
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jooq:jooq
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jooq:jooq-codegen-maven
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump slf4j-api from 1.7.35 to 1.7.36

Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.35 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](qos-ch/slf4j@v_1.7.35...v_1.7.36)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump jcl-over-slf4j from 1.7.35 to 1.7.36

Bumps [jcl-over-slf4j](https://github.com/qos-ch/slf4j) from 1.7.35 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](qos-ch/slf4j@v_1.7.35...v_1.7.36)

---
updated-dependencies:
- dependency-name: org.slf4j:jcl-over-slf4j
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spring-framework-bom from 5.3.15 to 5.3.16

Bumps [spring-framework-bom](https://github.com/spring-projects/spring-framework) from 5.3.15 to 5.3.16.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](spring-projects/spring-framework@v5.3.15...v5.3.16)

---
updated-dependencies:
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump maven-pmd-plugin from 3.15.0 to 3.16.0

Bumps [maven-pmd-plugin](https://github.com/apache/maven-pmd-plugin) from 3.15.0 to 3.16.0.
- [Release notes](https://github.com/apache/maven-pmd-plugin/releases)
- [Commits](apache/maven-pmd-plugin@maven-pmd-plugin-3.15.0...maven-pmd-plugin-3.16.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-pmd-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump maven-compiler-plugin from 3.9.0 to 3.10.0

Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.9.0...maven-compiler-plugin-3.10.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Sevket Gökay <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@huzaifamk
Copy link

@goekay if you can share a little that how are you detecting that conncectors might be not up-to-date, it will help in implementing some functionality because I have been working with Steve and OCPPs and here is only one hurdle that I am facing that is to detect that conncectors might be not up-to-date, is there a way I can see anything related to this in Steve, or there is a formula above, are you using this: current time > previous heartbeat + interval -> change state in database to something like heartbeat missed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants