MQTT > MQTT

Beacons & MQTT

(1/1)

kbrooking:
I’m still a bit confused about beacons.

By default the 120 will send a beacon every 10 seconds in low power mode correct? So if the gateway is programmed for MQTT will it automatically send the beacon to the MQTT server every 10 seconds as well or do you have to program the 120 to send the beacon manually using the Lplan.SendBeacon()command?

mc-John:
You are correct, with the default settings, it will send the beacon every 10 seconds and you have to use the beacon command only if you want to change the timing. If you use MQTT it will send it over MQTT every 10 seconds

kbrooking:
Do you have an example on how to send a beacon with battery level & temp in the four user byte fields and change the time to send from 10 seconds to say 20 seconds?

Nick_W:
Kbrooking

If you haven't found my github yet https://github.com/NickWaterton/mcScript I have examples of exactly that, plus a python program (beacon_decode.py) for receiving the beacons and converting them back to regular mqtt messages.

I currently support 12 data types (I think), such as temperature, battery, Rssi, humidity, pressure, altitude, boolean etc.

The data is converted to 24 bits, so there are limits on the range of numbers that can be sent, and you are limited to 2 decimal places, but the range is +/-32k, so enough for environmental sensors.

Navigation

[0] Message Index

Go to full version