parsers
¶
This Code is partially vendored from: https://github.com/decentlab/decentlab-decoders Which is licensed under the MIT License, which is included in this repo
- class element.parsers.ATM41Measurement¶
-
Precipitation:
ParamReading
¶
-
Precipitation:
- class element.parsers.BLGMeasurement¶
-
Temperature:
ParamReading
¶
-
Temperature:
- class element.parsers.SHT35Measurement¶
- element.parsers._decode(msg, protocol_version, sensors, hex=False) dict[str, BLGMeasurement | ATM41Measurement] [source]¶
msg: payload as one of hex string, list, or bytearray
- Return type:
- element.parsers.decode_ATM41(msg, hex=False, protocol_version=2) ATM41Measurement [source]¶
Decode the message returned from the Meter ATM41 weather station (ATM41) sensor.
- Parameters:
msg (
bytes
) – byte-string returned e.g.b'02530400038283800080008000803488CD8076815C80CBA708816D817D80197FF680007FDB7FDB0AAE'
hex (
bool
) – whether or not the provided message is in hexadecimals (default:False
)protocol_version (
int
) – The expected version of the protocol. If theprotocol_version
in themsg
does not match this version, an exception will be raised (default:2
)
- Return type:
- element.parsers.decode_BLG(msg, hex=False, protocol_version=2) BLGMeasurement [source]¶
Decode the message returned from the blackglobe sensor (BLG).
- Parameters:
msg (
bytes
) – byte-string returned e.g.b'0254970003498800830BF7'
hex (
bool
) – whether or not the provided message is in hexadecimals (default:False
)protocol_version (
int
) – The expected version of the protocol. If theprotocol_version
in themsg
does not match this version, an exception will be raised (default:2
)
- Return type:
- element.parsers.decode_STH35(msg, hex=False, protocol_version=2) SHT35Measurement [source]¶
Decode the message returned from the temperature and relative humidity sensor (SHT35).
- Parameters:
msg (
bytes
) – byte-string returned e.g.b'0254A60003783F596E0C17'
hex (
bool
) – whether or not the provided message is in hexadecimals (default:False
)protocol_version (
int
) – The expected version of the protocol. If theprotocol_version
in themsg
does not match this version, an exception will be raised (default:2
)
- Return type: