etho.services.RelayZeroService#

class etho.services.RelayZeroService.REL(*args, serializer: str = 'default', head_ip: str = '192.168.1.1', **kwargs)[source]#

toggle relay using gpiozero library very hacky since the relay cannot be toggled (requires 5V GPIO, not 3.3V as in rpi). so we turn on the relay by initializing the pin, and turn it off by de-initializing it

[summary]

Parameters
  • serializer (str, optional) – [description]. Defaults to ‘default’.

  • head_ip (str, optional) – [description]. Defaults to ‘192.168.1.1’.

  • logging_port (int, optional) – [description]. Defaults to None.

  • service_port (int, optional) – [description]. Defaults to None.

cleanup(**kwargs)#

free resources

is_busy(**kwargs)#

return state of the instance - IDLE, BUSY, FAILED, etc

test(**kwargs)#

test whether the instance will be functional