Tags
This module defines all the basic building blocks for every message.
Each message is composed of a series of tags, each of which represents a specific piece of information.
Tags can be of different types, such as Who
, What
, Where
, Dimension
, and Value
.
Each tag can have a set of parameters that further define its meaning.
pyown.tags.base.VALID_TAG_CHARS
module-attribute
¶
This are the only valid characters for a tag
pyown.tags.base.is_valid_tag
¶
pyown.tags.base.Tag
¶
Tag class.
This a base class for all the other types of tags. This class does not support parameters. To use parameters, use the TagWithParameters class.
parameters
property
¶
Returns the parameters of the tag. For a tag without parameters, this function returns None.
with_parameter
¶
with_parameter(parameter: str | int) -> TagWithParameters
Returns the tag with the specified parameter
pyown.tags.base.TagWithParameters
¶
Bases: Tag
Tag with parameters.
A tag with parameters is a tag that contains a value and a list of parameters. So, it follows the following format value#parameter1#parameter2#...#parameterN
pyown.tags.who.Who
¶
Who tag class.
This is an enum class because the value allowed in this tag is limited to the ones listed.
Attributes:
Name | Type | Description |
---|---|---|
SCENE |
str
|
used for scenarios modules |
LIGHTING |
str
|
used to manage all lighting devices |
AUTOMATION |
str
|
used to control shutter, rolling shutters, and other automation devices |
LOAD_CONTROL |
str
|
used to control power management devices |
THERMOREGULATION |
str
|
used to control heating and cooling centralized systems or probes |
BURGLAR_ALARM |
str
|
used to control security systems |
DOOR_ENTRY_SYSTEM |
str
|
used to control outdoor entry systems |
VIDEO_DOOR_ENTRY |
str
|
used to control video door entry systems |
AUXILIARY |
str
|
used to control auxiliary devices |
GATEWAY |
str
|
used to get information about the gateway |
ACTUATORS_LOCKS |
str
|
used to control actuators and locks |
CEN_1 |
str
|
similar to the SCENE who |
SOUND_DIFFUSION_1 |
str
|
used to control sound diffusion systems |
MH200N_SCENE |
str
|
used to control scenarios on the MH200N (similar to SCENE) |
ENERGY_MANAGEMENT |
str
|
used to read data from energy measurement devices |
SOUND_DIFFUSION_2 |
str
|
extension of SOUND_DIFFUSION_1 |
LIGHTING_MANAGEMENT |
str
|
extension of LIGHTING |
CEN_2 |
str
|
extension of CEN_1 |
AUTOMATION_DIAGNOSTICS |
str
|
used to read and set low level values to automation devices (only used by the official MyHome software) |
THERMOREGULATION_DIAGNOSTICS |
str
|
used to read and set low level values to thermoregulation devices (only used by the official MyHome software) |
DEVICE_DIAGNOSTICS |
str
|
used to read and set low level values to devices (only used by the official MyHome software) |
ENERGY_DIAGNOSTICS |
str
|
used to read and set low level values to energy management devices . (only used by the official MyHome software) |
parameters
property
¶
Returns the parameters of the tag. For a tag without parameters, this function returns None.
with_parameter
¶
with_parameter(parameter: str | int) -> TagWithParameters
Returns the tag with the specified parameter
pyown.tags.what.What
¶
Bases: TagWithParameters
Represents the WHAT tag.
The tag WHAT, identifies the action to make (ON lights, OFF lights, dimmer at 20%, shutters UP, shutters DOWN, etc...)
pyown.tags.where.Where
¶
Bases: TagWithParameters
Represents the WHERE tag.
The tag WHERE is the address on the bus for the related device. This can indicate, also, a group of devices or a local bus.
type
property
¶
type: WhereType
Gets what the where tag indicates to.
Returns:
Name | Type | Description |
---|---|---|
WhereType |
WhereType
|
The type of the WHERE tag. |
pyown.tags.dimension.Dimension
¶
Bases: TagWithParameters
Represents the DIMENSION tag.
It's used in dimension messages.
It's not clear in the official documentation what exactly is the DIMENSION tag. But in many cases it's used to request information about the status of a device, making it similar to the WHAT tag.
pyown.tags.base.Value
¶
Bases: Tag
Represents a value tag in a dimension response message.
parameters
property
¶
Returns the parameters of the tag. For a tag without parameters, this function returns None.
with_parameter
¶
with_parameter(parameter: str | int) -> TagWithParameters
Returns the tag with the specified parameter