R Package Integration
Overview
The sensibo.sky
R package provides a convenient interface to interact with Sensibo Smart Air Conditioner devices through the Sensibo API. This package allows R users to monitor and control their AC units programmatically.
Installation
You can install the package directly from GitHub using the devtools
package:
# Install devtools if you haven't alreadyinstall.packages("devtools")
# Install sensibo.sky packagedevtools::install_github("theclue/sensibo.sky")
Prerequisites
Before using the package, you’ll need:
- A Sensibo device properly set up and connected
- A Sensibo API key (obtain it from your Sensibo account)
Basic Usage
Here’s how to get started with the package:
# Load the packagelibrary(sensibo.sky)
# Initialize the connection with your API keysensibo <- Sensibo$new(api_key = "YOUR_API_KEY")
# Get all your devicesdevices <- sensibo$devices()
# Get the state of a specific devicestate <- sensibo$pod_state(pod_id = "YOUR_DEVICE_ID")
# Get measurements for a devicemeasurements <- sensibo$measurements(pod_id = "YOUR_DEVICE_ID")
Available Functions
The package provides several key functions:
devices()
: List all your Sensibo devicespod_state()
: Get the current state of a specific devicemeasurements()
: Retrieve temperature and humidity measurementshistorical_measurements()
: Get historical measurement dataac_state()
: Control your AC unit settings