Author Topic: [SOLVED] SubscriptionDelivery() msg.PayLoad  (Read 682 times)

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
[SOLVED] SubscriptionDelivery() msg.PayLoad
« on: June 12, 2016, 04:02:08 pm »
Hello.

I am having some issues with the msg.PayLoad here is a simple code that i run now just to test the SubscriptionDelivery()

Code: [Select]
Shared Event Boot()
        Lplan.Subscribe("mcModule/000104e6/test")           
    End Event
   
    Shared Event SubscriptionDelivery()
        Dim msg As Message = Lplan.GetDelivery()
       
        If msg.Topic= "mcModule/000104e6/test" Then
            Dim payload As ListOfByte = msg.PayLoad     
            If payload.ToString() = "abc123" Then
                LedGreen = True
            Else
                LedGreen = False
            End If
        End If
    End Event

But for some reason the msg.PayLoad (ListOfByte) only contains the first character in the payload that I am sending. So If i send "abc123" then msg.PayLoad (ListOfByte) contains "Count=1 Version=1 Value=(97)"
« Last Edit: June 23, 2016, 11:00:24 pm by mc-Abe »

Share on Facebook Share on Twitter


mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: SubscriptionDelivery() msg.PayLoad
« Reply #1 on: June 12, 2016, 09:35:01 pm »
How do you publish?

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: SubscriptionDelivery() msg.PayLoad
« Reply #2 on: June 13, 2016, 01:40:44 am »
Hello.
This time i used the Google Chrome app MQTTLens as MQTT client and made my publish from that.

I have now also published with client on Android and same thing happens.
« Last Edit: June 13, 2016, 02:19:30 am by kristofferis »

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: SubscriptionDelivery() msg.PayLoad
« Reply #3 on: June 17, 2016, 02:21:52 pm »
Kristofferis,

Sorry for the delayed response. We have tracked down this issue and resolved it. It will be in a module release later today.

Thanks,

Abe
Useful Useful x 1 View List

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: SubscriptionDelivery() msg.PayLoad
« Reply #4 on: June 17, 2016, 03:10:36 pm »
No problem Abe, Good that you found the problem.

Thanks.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: SubscriptionDelivery() msg.PayLoad
« Reply #5 on: June 17, 2016, 08:52:55 pm »
This issue is resolved in v0.7-357 of module firmware.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: SubscriptionDelivery() msg.PayLoad
« Reply #6 on: June 18, 2016, 02:47:29 am »
I have now tested and could verify that it is now working as it should, great.