Versions in this module Expand all Collapse all v0 v0.0.2 Feb 7, 2024 Changes in this version type CloudConfig + SensorValueKey string v0.0.1 Nov 10, 2023 Changes in this version + var Description = "An on/Off fan controller for Viam" + var Model = resource.NewModel("viam-soleng", "fan", "onoff") + var PrettyName = "Raspberry Pi Clock Sensor" + var Version = utils.Version + func NewSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, ...) (sensor.Sensor, error) + type CloudConfig struct + BoardName string + FanPin string + OffDelay int64 + OffTemperature float64 + OnDelay int64 + OnTemperature float64 + SensorName string + SensorValueField string + SensorValueRegex string + func (conf *CloudConfig) Validate(path string) ([]string, error) + type Config struct + Board *board.Board + FanPin board.GPIOPin + LastStateChange time.Time + OffDelay time.Duration + OffTemperature float64 + OnDelay time.Duration + OnTemperature float64 + Sensor sensor.Sensor + SensorValueField string + SensorValueRegex *regexp.Regexp + func (c *Config) Close(ctx context.Context) error + func (c *Config) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error) + func (c *Config) Ready(ctx context.Context, extra map[string]interface{}) (bool, error) + func (c *Config) Reconfigure(ctx context.Context, deps resource.Dependencies, conf resource.Config) error