Author Topic: Beacon Question  (Read 198 times)

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Beacon Question
« on: November 28, 2016, 07:55:19 pm »
As per the Beaconing white paper, when sending beacons over MQTT, the topic defaults to  “mcThings/beacon/{GatewayUID}/{DeviceUID}”. Is this correct? We do not need to set the topic as we do when we use Lplan.Publish?

If so, could I then subscribe to “mcThings/beacon” and get beacons from all GW and modules?

Social Buttons

Like Like x 1 View List

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Beacon Question
« Reply #1 on: November 28, 2016, 09:31:06 pm »
The topic is programmed in the gateway itself and described in page 7 of the white papers and is correct. See also the example on page 8.

You can use wildcards to subscribe to all gateways and devices. Google "MQTT subscribe wildcards" and you will find a lot of examples.

Nick_W

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: Beacon Question
« Reply #2 on: December 02, 2016, 09:55:18 pm »
Checkout my beacon_decode.py program for an example of one way of reading/decoding beacons via mqtt or UDP socket.

This decodes my beacon data format, but you can use any format you like, it's just 4 bytes.

https://github.com/NickWaterton/beacon_decode
Like Like x 1 View List