Author Topic: MQTT from Demo205 - Receiving Beacons but not Messages  (Read 338 times)

DanielV

  • Newbie
  • *
  • Posts: 5
    • View Profile
MQTT from Demo205 - Receiving Beacons but not Messages
« on: January 08, 2017, 11:47:33 am »
Hi.

I have a CloudMQTT account setup.

I have the following code in my Demo205 {

Class ThisThanThat
   
    Shared Event SW1FallingEdge()
       
        Dim payload As ListOfByte
        Dim paystring As String
       
        paystring = "Daniel"       
       
        payload.Add(paystring)
       
        Lplan.Publish("/water", payload)
        Thread.Sleep(100000)
        Thread.ClearHardwareEvent()
        Dim update As Integer = Device.Uptime()
             
    End Event
End Class
}

I am not receiving this message on my MQTT account,
but I am receiving messages from a beacon.

Messages Received:
mcThings/beacon/0001136D/000205D8   Binary data (base64 encoded)
2AUCAAAAAADUbRMBAA==
mcThings/beacon/0001136D/000205D8   Binary data (base64 encoded)
2AUCAAAAAADUbRMBAA==


Questions:
1. Does Demo205 do these messages?
2. Why arn't the messages showing up on Cloud?
3. How do I turn off the beacon messages?

Share on Facebook Share on Twitter


DanielV

  • Newbie
  • *
  • Posts: 5
    • View Profile
Fixed.     

I changed the code from:        Dim payload As ListOfByte

To:                                           Dim payload As ListOfByte = New ListOfByte



I still get the beacon messages, but I can filter those.

mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Hey Daniel,
You can change the beacon interval frequency If you wish!
Here is an example:

Shared Event Boot()

Lplan.SetBeaconTime(60)

lpLan.SetLowPowerMode(130)

end event

 

These commands set the time between beacons to 1 minute (60sec) and the connection beacon time to 2:10 minutes (130 Sec)

Be aware, if you change the connection beacon time and wish to connect to the 205 wirelessly, you will need to wait for the period of time you designate to connect wirelessly.
Hope that helps!
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB