Author Topic: AWS IoT and Losant  (Read 831 times)

millennial

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
AWS IoT and Losant
« on: June 13, 2016, 10:40:59 am »
Can we configure MQTT on the mc-gateway with certificates and/or client identifiers? In the mc-innovation video for the door open/closed status we use cloudmqtt unsecured port 1**** (not the 2**** or 3**** ports). It would be nice to know if it is possible to securely communicate from/to mc-things.

I am familiarizing myself with AWS IoT and at first glance it seems to require one of their SDK's, but I believe there is potential to use it if we could load certificates and give clientIDs (either to the mc-gateway or in mc-module code).

Another startup is at losant.com, brought to us by the creators of Modulus.io. I believe I could use their service now if only I knew how to send a client-id to them from mc-*.

Could the mc-team let us know if it is possible to connect to these two services today, in the near future, or is it even on the roadmap?

Thanks.

Share on Facebook Share on Twitter


millennial

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: AWS IoT and Losant
« Reply #1 on: June 13, 2016, 11:40:11 am »
One of the biggest issues is that the mc-gateway password field cannot be a hexadecimal value of length 64.

TheReddest

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: AWS IoT and Losant
« Reply #2 on: June 13, 2016, 02:02:28 pm »
Hey mcthings!

I run product at Losant and would love to chat more about how we can integrate our platform with your hardware. I've looked over all of your material and I think we can provide a pretty seamless experience for users. Let's connect!

mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Re: AWS IoT and Losant
« Reply #3 on: June 13, 2016, 03:45:56 pm »
@ TheReddest - I am sending you a private message to discuss, thank you!

@ Millennial - Seems like we can set this up according to the Reddest. We'll advise you after we discuss!
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

mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Re: AWS IoT and Losant
« Reply #4 on: June 17, 2016, 04:32:27 pm »
@Millennial - We've had a chat with Losant and are working through the requirements to allow data from the modules to get into their fantastic application! We'll have more news next week as we finalize the requirements and make the necessary changes
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

millennial

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: AWS IoT and Losant
« Reply #5 on: June 18, 2016, 02:01:28 pm »
With mc-gateway Application Processor v0.6-357 I have been successfully sending temperature readings to Losant for about 9 minutes now. Thank you for getting a bare-bones implementation out so quickly from 356 to 357!

I am sure that your collaboration will lead to more tight integration with Losant, such as being able to have each mc-module map to their Device IDs.

Another roadblock that I encountered when integrating with Losant was making a payload of a string JSON object. From the mc-studio documentation, it appears that to escape double quotes in a string, you just use another double quote. However it seems this is not yet implemented because the studio auto formats this code and has a compile error.

Before formatting, and as I would expect it to work:
Code: [Select]
payload = "{""name"":""set-temperature"",""payload"":{""temperature"":72}"
After formatting:
Code: [Select]
payload = "{" "name" ":" "set-temperature" "," "payload" ":{" "temperature" ":72}"
The compile error is "Multiple operands without an operator."

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: AWS IoT and Losant
« Reply #6 on: June 18, 2016, 03:27:35 pm »
Quote
Another roadblock that I encountered when integrating with Losant was making a payload of a string JSON object.
We will support JSON with the classes Json, JProperty, JValue and JListOfJValue. The JValue is a class that can contain a Boolean, Integer, Float, DateTime, String, ListOfJValue and Json class and Null. By the way what a mess. Dates are not described as type in the JSON definition. I think the best choice is to use the ISO 8601 date format. There will be size limitations and the strings contain ASCII characters and not Unicode characters.

Quote
From the mc-studio documentation, it appears that to escape double quotes in a string, you just use another double quote.
However it seems this is not yet implemented because the studio auto formats this code and has a compile error.

I think you are looking at older documentation. The new documentation describe the "\x22" solution at page 27. Not ideal but it works. The JSON class will solve this anyway.


mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: AWS IoT and Losant
« Reply #7 on: June 18, 2016, 06:30:03 pm »
@millenial
We are working on the Device ID mapping with Losant. There is a solution and we are working with them on implementing it. You will see this in the new future hopefully.