Author Topic: ESP8266 - IoT protocol  (Read 6838 times)

0 Members and 1 Guest are viewing this topic.

Offline gflaterTopic starter

  • Newbie
  • Posts: 4
ESP8266 - IoT protocol
« on: August 03, 2016, 12:07:17 am »

I came across this today:

ESP8266 Arduino IoT Device to Cloud Setup

https://youtu.be/aolQxPTmpiY

Has anyone any experience with this SMQ protocol?

It looks very easy to use to drive IO from a web interface.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2332
  • Country: 00
Re: ESP8266 - IoT protocol
« Reply #1 on: August 03, 2016, 12:58:46 am »
This is a programmable device , the protocol will be defined by yourself, But if you want you can use that Library SMQ, But have many kinds available
« Last Edit: August 03, 2016, 01:00:54 am by ebclr »
 

Offline lwatts666

  • Supporter
  • ****
  • Posts: 78
  • Country: au
Re: ESP8266 - IoT protocol
« Reply #2 on: August 03, 2016, 01:36:07 am »



Has anyone any experience with this SMQ protocol?

It looks very easy to use to drive IO from a web interface.

Take a look at :https://learn.adafruit.com/adafruit-io-basics-digital-output/esp8266  and  https://learn.adafruit.com/adafruit-io-basics-digital-input/esp8266

They use the MQTT Library which is an OASIS standard rather than the proprietary SMQ library.

There are some nice MQTT visualization examples out there. Try http://www.hardill.me.uk:3000/
« Last Edit: August 03, 2016, 01:41:16 am by lwatts666 »
 
The following users thanked this post: gflater

Offline gflaterTopic starter

  • Newbie
  • Posts: 4
Re: ESP8266 - IoT protocol
« Reply #3 on: August 03, 2016, 08:29:03 pm »



Has anyone any experience with this SMQ protocol?

It looks very easy to use to drive IO from a web interface.

Take a look at :https://learn.adafruit.com/adafruit-io-basics-digital-output/esp8266  and  https://learn.adafruit.com/adafruit-io-basics-digital-input/esp8266

They use the MQTT Library which is an OASIS standard rather than the proprietary SMQ library.

There are some nice MQTT visualization examples out there. Try http://www.hardill.me.uk:3000/



When I dug around on the SMQ website, it appears that the SMQ sources are released under Eclipse Public License, in addition there is a ton of information how the protocol works. Not sure how that is any different from MQTT...

You are correct that MQTT has a wider adoption , but the reason why I was looking into SMQ is because there are behaviors that are simply impossible with MQTT: I needed point to point communication, MQTT forces me to go through a broker for everything, with SMQ I can send commands/information directly to do the device:  I was not able to solve the point-to-point using MQTT, that is how I came across SMQ. It appears to me the SMQ protocol includes pub/sub as in MQTT but also point-to-point communication including sender's address. I need this feature for controlling each device separately. I have seen some horrible MQTT hacks trying to circumvent this limitation in MQTT, but it's just too horrible of a hack.

Looking around on their website, I came across this information that explains how the point-to-point communication is used in their LED example:
https://makoserver.net/blog/2014/12/Browser-to-Device-LED-Control-using-SimpleMQ

I was just wondering if anyone out there has used this SMQ protocol to see if there is someone who had experience with it.
 

Offline lwatts666

  • Supporter
  • ****
  • Posts: 78
  • Country: au
Re: ESP8266 - IoT protocol
« Reply #4 on: August 03, 2016, 11:47:30 pm »
Your requirement for point-to-point effectively counts out MQTT for your application.

Just be aware that this pushes the subscription table management back into the IOT device. This will cause problems if the number of subscribers grow. At some point you run out of RAM to hold the subscriptions. 

In my case, the number of subscribers is quite large, so the MQTT broker is a nice beefy server. All the data source MQTT nodes can be small, needing only to manage one communication path to the broker.

 
The following users thanked this post: gflater

Offline gflaterTopic starter

  • Newbie
  • Posts: 4
Re: ESP8266 - IoT protocol
« Reply #5 on: August 04, 2016, 07:15:24 pm »
Your requirement for point-to-point effectively counts out MQTT for your application.

Just be aware that this pushes the subscription table management back into the IOT device. This will cause problems if the number of subscribers grow. At some point you run out of RAM to hold the subscriptions. 

In my case, the number of subscribers is quite large, so the MQTT broker is a nice beefy server. All the data source MQTT nodes can be small, needing only to manage one communication path to the broker.

Looking at the information here:
https://realtimelogic.com/ba/doc/?url=SMQ.html

It appears to me that it is still the broker keeping track of the unique ID of each publisher/subscriber but from the endpoint it looks like it is doing point to point communication.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6610
  • Country: 00
Re: ESP8266 - IoT protocol
« Reply #6 on: August 04, 2016, 07:39:01 pm »


In my case, the number of subscribers is quite large, so the MQTT broker is a nice beefy server. All the data source MQTT nodes can be small, needing only to manage one communication path to the broker.

The server also simplifies authentication and pushing notifications through NAT.

 

Offline surgeprotector

  • Newbie
  • Posts: 6
  • Country: us
Re: ESP8266 - IoT protocol
« Reply #7 on: August 04, 2016, 10:04:31 pm »

The server also simplifies authentication and pushing notifications through NAT.

What server, SMQ or MQTT?. I think they are the same from a NAT perspective since the data goes via the broker?

Also, SMQ seems to make it possible to use hash based authentication (see function create):
https://realtimelogic.com/ba/doc/?url=SMQ.html#create

Hash based authentication is important when the communication is not protected by SSL since an eavesdropper can read the password if it's not hash based.

The following is from the URL above (for the server code):

local function authenticate(credentials, info)
   local username,pwdhash=credentials:match("([^:]+):(.+)")
   pwdhash = pwdhash and ba.b64decode(pwdhash)
   if username and pwdhash then
      -- The local data will typically be fetched from a database
      local dbuname="username" -- For test only
      local dbpasswd="password"
      local data=string.format("%u%s%s%s",
                               info.seed,info.sock:peername(),dbuname,dbpasswd)
      if pwdhash == ba.crypto.hash("sha512")(data)(true) then
         return 0 -- Authenticated
      end
   end
   return 6, "Incorrect credentials"
end
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6610
  • Country: 00
Re: ESP8266 - IoT protocol
« Reply #8 on: August 05, 2016, 05:34:00 am »

The server also simplifies authentication and pushing notifications through NAT.

What server, SMQ or MQTT?. I think they are the same from a NAT perspective since the data goes via the broker?

gflater was talking about bypassing the SMQ broker:

"I needed point to point communication, MQTT forces me to go through a broker for everything, with SMQ I can send commands/information directly to do the device"
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->