raspyrfm_client package



raspyrfm_client.client module

Example usage of the RaspyRFMClient can be found in the example.py file

class raspyrfm_client.client.RaspyRFMClient[source]

Bases: object

This class is the main interface for generating and sending signals.

get_controlunit(manufacturer: raspyrfm_client.device_implementations.manufacturer_constants.Manufacturer, model: raspyrfm_client.device_implementations.controlunit.controlunit_constants.ControlUnitModel) → raspyrfm_client.device_implementations.controlunit.base.ControlUnit[source]

Use this method to get a device implementation intance :param manufacturer: device manufacturer :param model: device model :return: device implementation

get_gateway(manufacturer: raspyrfm_client.device_implementations.manufacturer_constants.Manufacturer, model: raspyrfm_client.device_implementations.gateway.manufacturer.gateway_constants.GatewayModel, host: str = None, port: int = None) → raspyrfm_client.device_implementations.gateway.base.Gateway[source]

Use this method to get a gateway implementation instance :param manufacturer: gateway manufacturer :param model: gateway model :param host: gateway host address (optional) :param port: gateway port (optional) :return: gateway implementation

get_supported_controlunit_manufacturers() → [<class 'str'>][source]
Returns:a list of supported control unit manufacturers
get_supported_controlunit_models(manufacturer: raspyrfm_client.device_implementations.manufacturer_constants.Manufacturer) → [<enum 'ControlUnitModel'>][source]
Parameters:manufacturer – supported control unit manufacturer
Returns:a list of supported control unit models for this manufacturer
Returns:a list of supported gateway manufacturers
get_supported_gateway_models(manufacturer: raspyrfm_client.device_implementations.manufacturer_constants.Manufacturer) → [<enum 'GatewayModel'>][source]
Parameters:manufacturer – supported gateway manufacturer
Returns:a list of supported gateway models for this gateway manufacturer
list_supported_controlunits() → None[source]

Prints an indented list of all supported manufacturers and models

list_supported_gateways() → None[source]

Prints an indented list of all supported manufacturers and models


Dynamically reloads device implementations

search() → [<class 'raspyrfm_client.device_implementations.gateway.base.Gateway'>][source]

Sends a local network broadcast with a specified message. If a gateway is present it will respond to this broadcast.

If a valid response is found the properties of this client object will be updated accordingly.

Returns:list of gateways
send(gateway: raspyrfm_client.device_implementations.gateway.base.Gateway, device: raspyrfm_client.device_implementations.controlunit.base.ControlUnit, action: raspyrfm_client.device_implementations.controlunit.actions.Action) → None[source]

Use this method to generate codes for actions on supported device. It will generates a string that can be interpreted by the the RaspyRFM module. The string contains information about the rc signal that should be sent.

  • gateway – the gateway to generate the code for
  • device – the device to generate the code for
  • action – action to execute

Module contents