caspia.gateway.services.sensors.light package

Submodules

caspia.gateway.services.sensors.light.analog module

class caspia.gateway.services.sensors.light.analog.AnalogLightSensor(config, network, storage)[source]

Bases: caspia.gateway.services.base.GatewayService, caspia.meadow.services.sensors.light.LightSensorBase

property all_observables
attach(connection)
property attached
auto_discovery = False
characteristic_cached_read(characteristic)
characteristic_cached_write(characteristic, value_and_meta)
async characteristic_read(characteristic, **kwargs)
characteristic_subscribe(characteristic, on_value, on_error=None)
async characteristic_write(characteristic, value, **kwargs)
characteristics = {'$metadata': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:$metadata>, 'light': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:light>}
configure()[source]
convert_from_raw(raw)[source]
convert_ratio_to_resistance(ratio)[source]
property dependant_components
detach()
get_node()
static get_subclass(stype, mixin=None)
property is_updated_periodically
light
async light_read(**kwargs)[source]
load_definition(spec)

Update characteristics of this instance based on serialized specs.

Parameters

spec – Dict most likely going to be coming from meadow - from some gateway informing us about its services and their characteristics.

metadata
async notify(characteristic, value, if_changed=False, extra=None)
on(name, *args, **kwargs)
async on_component_event(component, event)[source]
optional = {}
async published()
serialize()

Return serialized version (most likely dict) if possible or None.

type = 'light-sensor'

caspia.gateway.services.sensors.light.apds9300 module

class caspia.gateway.services.sensors.light.apds9300.APDS9300LightSensor(config, network, storage)[source]

Bases: caspia.gateway.services.base.GatewayService, caspia.meadow.services.sensors.light.LightSensorBase

property all_observables
attach(connection)
property attached
auto_discovery = False
characteristic_cached_read(characteristic)
characteristic_cached_write(characteristic, value_and_meta)
async characteristic_read(characteristic, **kwargs)
characteristic_subscribe(characteristic, on_value, on_error=None)
async characteristic_write(characteristic, value, **kwargs)
characteristics = {'$metadata': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:$metadata>, 'light': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:light>}
configure()[source]
property dependant_components
detach()
get_node()
static get_subclass(stype, mixin=None)
property is_updated_periodically
light
async light_read(**kwargs)[source]
load_definition(spec)

Update characteristics of this instance based on serialized specs.

Parameters

spec – Dict most likely going to be coming from meadow - from some gateway informing us about its services and their characteristics.

metadata
async notify(characteristic, value, if_changed=False, extra=None)
on(name, *args, **kwargs)
async on_component_event(component, event)[source]
optional = {}
async published()
serialize()

Return serialized version (most likely dict) if possible or None.

type = 'light-sensor'

caspia.gateway.services.sensors.light.service module

class caspia.gateway.services.sensors.light.service.LightSensor(config, network, storage)[source]

Bases: caspia.gateway.services.base.GatewayService, caspia.meadow.services.sensors.light.LightSensorBase

property all_observables
attach(connection)
property attached
auto_discovery = True
characteristic_cached_read(characteristic)
characteristic_cached_write(characteristic, value_and_meta)
async characteristic_read(characteristic, **kwargs)
characteristic_subscribe(characteristic, on_value, on_error=None)
async characteristic_write(characteristic, value, **kwargs)
characteristics = {'$metadata': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:$metadata>, 'light': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:light>}
abstract configure()
abstract property dependant_components
detach()
get_node()
static get_subclass(stype, mixin=None)
light
load_definition(spec)

Update characteristics of this instance based on serialized specs.

Parameters

spec – Dict most likely going to be coming from meadow - from some gateway informing us about its services and their characteristics.

metadata
async notify(characteristic, value, if_changed=False, extra=None)
on(name, *args, **kwargs)
async on_component_event(component, event)
optional = {}
async published()
serialize()

Return serialized version (most likely dict) if possible or None.

type = 'light-sensor'

caspia.gateway.services.sensors.light.tsl258x module

class caspia.gateway.services.sensors.light.tsl258x.TSL258XLightSensor(config, network, storage)[source]

Bases: caspia.gateway.services.base.GatewayService, caspia.meadow.services.sensors.light.LightSensorBase

property all_observables
attach(connection)
property attached
auto_discovery = False
characteristic_cached_read(characteristic)
characteristic_cached_write(characteristic, value_and_meta)
async characteristic_read(characteristic, **kwargs)
characteristic_subscribe(characteristic, on_value, on_error=None)
async characteristic_write(characteristic, value, **kwargs)
characteristics = {'$metadata': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:$metadata>, 'chip_part_name': <Characteristic <class 'caspia.gateway.services.base.GatewayServiceMeta'>:chip_part_name>, 'chip_revision': <Characteristic <class 'caspia.gateway.services.base.GatewayServiceMeta'>:chip_revision>, 'light': <Characteristic <class 'caspia.meadow.services.base.ServiceMeta'>:light>}
chip_part_name
async chip_part_name_read(**kwargs)[source]
chip_revision
async chip_revision_read(**kwargs)[source]
property component_config
configure()[source]
property dependant_components
detach()
get_node()
static get_subclass(stype, mixin=None)
property is_updated_periodically
light
async light_read(**kwargs)[source]
load_definition(spec)

Update characteristics of this instance based on serialized specs.

Parameters

spec – Dict most likely going to be coming from meadow - from some gateway informing us about its services and their characteristics.

metadata
async notify(characteristic, value, if_changed=False, extra=None)
on(name, *args, **kwargs)
async on_component_event(component, event)[source]
optional = {}
async published()
serialize()

Return serialized version (most likely dict) if possible or None.

type = 'light-sensor'

Module contents