class
ShellyplugExporter::PlugClient
- ShellyplugExporter::PlugClient
- Reference
- Object
Overview
Handles HTTP communication with a single Shelly plug device.
Defined in:
shellyplug_exporter/plug_client.crConstant Summary
-
SHELLY_ENDPOINT =
"/shelly"
Constructors
Instance Method Summary
-
#detect_generation : PlugGeneration
Detects the plug generation by probing the /shelly endpoint.
-
#fetch_settings : HTTP::Client::Response
Fetches the settings/config from the plug.
-
#fetch_status : HTTP::Client::Response
Fetches the status from the plug.
Constructor Detail
Instance Method Detail
def detect_generation : PlugGeneration
#
Detects the plug generation by probing the /shelly endpoint. Gen2 devices include a "gen" field in their response. Returns the detected PlugGeneration, defaulting to Gen1 on failure.