kestrel

This modules allows communication with Kestrel weather stations.

class runmacs.spec.hw.kestrel.Kestrel(*args, **kwargs)[source]

Manages communication with a Kestrel weather station.

close()[source]

Close the connection.

getCurrentData()[source]

Get current measurement data.

Returns:dictionary containing the data.
getIdentification()[source]

Get the identiication data of the connected device.

Returns:nested dictionary of identification data
getLoggedData()[source]

Get all logged data from the connected device.

Returns:list of dictionaries containing:

field_name: (value, unit)

open(portname)[source]

Open a serial port to connect to the Kestrel device.

This can also be a virtual bluetooth serial port.

receiveDataResponse(multiline=False)[source]

Block until a data response was received and return it.

If multiline is set, return a list of responses.

sendCommand(cmd)[source]

Send a command to the device.

Parameters:cmd (str) – command
runmacs.spec.hw.kestrel.cleanKestrelLine(l)[source]

Removes communication artifacts from Kestrel answer lines.

runmacs.spec.hw.kestrel.kestrelTimeToDatetime(s)[source]

Converts Kestrel time format to python datetime.