Nothing
## code to update {pins} local board `inverter_data` dataset
## this requires the setup of the environment variables
## `APSYSTEMS_HOST1` and `APSYSTEMS_HOST2`with the IP address of your inverter(s)
board <- pins::board_local()
history <- board |> pins::pin_read("inverter_data")
print(glue::glue("history size : {nrow(history)}"))
device_ip = c(Sys.getenv("APSYSTEMS_HOST1"), Sys.getenv("APSYSTEMS_HOST2"))
new_data <- tibble::tibble(
date = Sys.time(),
microinverterdata::get_output_data(device_ip = device_ip)
)
board |> pins::pin_write(
rbind(history, new_data),
name = "inverter_data",
versioned = TRUE
)
print(glue::glue("updated `inverter_data`: {nrow(rbind(history, new_data))} rows."))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.