Skip to contents

Starts a Shiny app with the readings of Pimoroni Enviro and Enviro+ sensors exported to Prometheus: gauges with the latest readings in the Current tab, and a chart per sensor in the Time Series tab.

Usage

pimoroni(
  prometheus_url,
  timezone = "Europe/Bucharest",
  onStart = NULL,
  options = list(),
  enableBookmarking = NULL,
  uiPattern = "/",
  ...
)

Arguments

prometheus_url

Character vector of Prometheus query_range urls, one per device, such as "http://pip1.crabdance.com:1507/api/v1/query_range".

timezone

The time zone the readings are shown in, while the app runs.

onStart

See shiny::shinyApp().

options

See shiny::shinyApp().

enableBookmarking

See shiny::shinyApp().

uiPattern

See shiny::shinyApp().

...

Further options passed to golem::with_golem_options().

Value

A shiny::shinyApp() object. Printing it, or calling pimoroni() at the console, opens the app in the browser.

Examples

if (interactive()) {
  pimoroni(prometheus_url = c(
    "http://pip1.crabdance.com:1507/api/v1/query_range",
    "http://pip1.crabdance.com:1505/api/v1/query_range"
  ))
}