For inverters that do not collect historical data, you may want to do this collection with R.
Here are some ideas to achieve it.
pins
storagelibrary(pins)
board <- board_local()
if (!"inverter_data" %in% pin_list(board)) {
initial_data <- tibble::tibble(
date = lubridate::now(), get_output_data(c("192.168.0.175"))
)
board |> pin_write(initial_data, name = "inverter_data", versioned = TRUE)
}
new_data <- tibble::tibble(
date = lubridate::now(), get_output_data(c("192.168.0.175"))
)
board |> pin_write(rbind(history, new_data), name = "inverter_data", versioned = TRUE)
As we know the dynamic behavior, we can move that to a R script and run it on a regular basis with system tools like crontab for linux :
and you can use and edit the following file
and setup (or remove) the environment variables required for the script to run, then put that script in the crontab to run it every 30 min like in the following crontab entry
# m h dom mon dow command
0,30 * * * * R CMD BATCH inverter_data.R