Hi @hadi.farnoud,
Apologies for this, it is somewhat hidden. Once you have the Python MQTT library installed via the instructions in this readme, you can get the sort of detailed documentation you’re looking for with the command pydoc cayenne.client
.
Ultimately, you’ll notice that functions like celsiusWrite()
or luxWrite()
are just shorthand for the more generic virtualWrite()
function. The former allow you to skip specifying the data and unit types, where as the latter being generic wants you to explicitly define them. For a really quick example,
client.celsiusWrite(2, 25.2)
and
client.virtualWrite(2, 25.2, "temp", "c")
are directly equivalent – both will pass 25.2˚C as a value to MQTT channel 2.
You’ll likely find this thread useful if you want to see what your data/unit options are for populating virtualWrite()
.
If you edit this file on your local install, you can define your own functions that wrap virtualWrite()
as well.