Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create different ChargePoint based on subprotocol This also changes default subprotocol setting from OCPP 1.6 to 1.6 and 2.0.1. * Don't use CentralSystem from ChargePoint * Create base class for both OCPP versions * Move some functions to common ChargePoint class * Move entire post_connect to base ChargePoint * Move more boot notification handling to base ChargePoint * Add to base ChargePoint functions called by api.py * Split off OCPP part of get_supported_features * Initial OCPP 2.0.1 support * Implement get features and connector count for OCPP 2.0.1 * Implement connector status for OCPP 2.0.1 * Configure measurands on charger with OCPP 2.0.1 Also report available measurands to home assistant * Implement set availability and reboot with OCPP 2.0.1 * Implement trigger status notification with OCPP 2.0.1 * Implement get/set variables with OCPP 2.0.1 * Implement same authorisation logic for OCPP 2.0.1 Same as that used for OCPP 1.6, based on configuration.yaml * Support transaction measurements with OCPP 2.0.1 * Report charging state from OCPP 2.0.1 to HA * Report id token from OCPP 2.0.1 transactions to HA * Implement remote start and remote stop with OCPP 2.0.1 * Implement current limit with OCPP 2.0.1 * Clean up unused imports * Add common functions to be reused by OCPP 2.0.1 tests Only use switch and button pressing functions in existing 1.6 tests in this commit. * Add simple OCPP 2.0.1 test Test start-up, remote start and remote stop * Test realistic transaction with OCPP 2.0.1 * Test get/set variable services * Test more 2.0.1 calls and services * Move meter value processing to base ChargePoint * Reuse OCPP 1.6 meter value logic for 2.0.1 * Round energy consumption to 3 decimal places Subtracting to floats causes imprecision --------- Co-authored-by: Arseniy Lartsev <[email protected]>
- Loading branch information