ShellyplugExporter::PlugClient
Inherits Reference < Object
Handles HTTP communication with a single Shelly plug device.
Constants
CONNECT_TIMEOUT = 4.seconds
READ_TIMEOUT = 4.seconds
SHELLY_ENDPOINT = "/shelly"
Constructors
new(config : PlugConfig)
SourceInstance methods
detect_generation
Detects the plug generation by probing the /shelly endpoint. Gen2 and later devices include a "gen" field in their response and all serve the same RPC API, so Gen3 and Gen4 are handled as Gen2. Returns the detected PlugGeneration, defaulting to Gen1 on failure.