Add grid and EVSE meter components with load balancer

This commit is contained in:
2025-06-08 14:21:10 +01:00
parent e77ea55047
commit 56231fa788
23 changed files with 289 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
#include "evsemeter.h"
#include "esp_event.h"
#include "esp_log.h"
static const char *TAG = "evsemeter_ade7758";
esp_err_t evsemeter_init(void)
{
ESP_LOGI(TAG, "Initializing EVSE meter (ADE7758)");
return ESP_OK;
}
esp_err_t evsemeter_read_current(float *current)
{
if (!current) {
return ESP_ERR_INVALID_ARG;
}
*current = 0.0f;
esp_event_post(EVSEMETER_EVENT, EVSEMETER_EVENT_UPDATE, current, sizeof(float), portMAX_DELAY);
return ESP_OK;
}