Skip to content

This is a project to make a serial gateway for Industrial IoT devices.

License

Notifications You must be signed in to change notification settings

Man101a/serial-iot-gateway

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

This original project has been forked to adapt it for the Industrial Internet of Things Edge gateway for Industrial Automation and Safety Instrumented Systems. More details of the project will be at https://www.abhisam.com

Serial IoT Gateway

The GLIDERBITS's Serial IoT Gateway is an open source (GNU GPL v3), open hardware (CC BY-SA 3.0) serial-ethernet module that you can use to very easly connect to the Internet of Things.

How to use it

Just connect the module to your microcontroller using a serial line communication (GND, TX, RX, +5V) and send string commands to the module. Example:

Serial.print("K:xively:YOURAPIKEY\n");
Serial.print("P:xively:12345\nMyTemperature:-3.2\n\n");

That will update the MyTemperature to -3.2 in your xively account in the 12345 feed. Easy? A more complete Arduino example that updates a channel feed with an analog input value:

void setup()
{
  Serial.begin(9600);                       // Setup serial port speed
}

void loop()
{
  String strAnalogPin0 = String(analogRead(0), DEC);  // Read analog value from channel 0
  Serial.print("K:xively:YOURAPIKEY\n");  // Set API key
  Serial.print("P:xively:12345\nAnalogPin0:" + strAnalogPin0 + "\n\n"); // Post it!
  delay(60 * 1000); // 1 minute delay
}

Suported data services

  • Xively
  • Emoncms
  • Data.Sparkfun
  • ThingSpeak
  • Carriots

Xively

http://xively.com

Terms and conditions:

https://xively.com/dev/docs/api/communicating/usage_limits/ https://xively.com/dev/docs/api/api_terms_and_conditions/

Emoncms

http://emoncms.org

Terms and conditions:

http://emoncms.org/site/usage "Post rate limit: 5-10s.. keep the brakes on your arduino's and nanodes!"

Data.Sparkfun

https://data.sparkfun.com https://learn.sparkfun.com/tutorials/pushing-data-to-datasparkfuncom/what-is-phant

Terms and conditions:

https://data.sparkfun.com
http://phant.io/docs/input/limit/
"Each stream has a maximum of 50mb. After you hit the limit, the oldest data will be erased. (These limitations can be removed if installed on your own server). Logging is limited to 100 pushes in a 15 minute window. This allows you to push data in bursts, or spread them out over the 15 minute window."

ThingSpeak

https://thingspeak.com

Terms and conditions:

http://community.thingspeak.com/documentation/api/ "API Rate Limit: The open service via ThingSpeak.com has a rate limit of an update per channel every 15 seconds."

Carriots

https://www.carriots.com/

Terms and conditions:

https://www.carriots.com/terms-of-service https://www.carriots.com/pricing "Max. accepted streams 15000 streams / day 500 streams / minute" "Max. Devices Number 10"

Serial Protocol

Module configurations

"C:RESET\n" - Reset module
"C:ack:0\n" - Disable acknowledge of messages
"C:ack:1\n" - Enable acknowledge of messages

Data services commands

The protocol is the same for all services. However, mind that each service have different meanings for their feeds (feeds, streams, ... )

"K:service:YOUR_API_KEY\n"
"P:service:optional_feed_id\nChannel_ID:value\n\n"
"G:service:optional_feed_id\nChannel_ID\n"
"I:service:000.000.000.000\n"

K - Configure the API Key to use in this sessions. You can setup it just once, it will keep this same API key for the next posts and gets.
P - Post one or multiple data. You can send multiple "feed:value\n" in the same sequence. In the end just send '\n'
G - Get one data value from service
I - Let you configure a specific IP address for that service, ex: if you are running a local service and not using the public one.

Xively

"K:xively:YOUR_API_KEY\n"
"P:xively:feed_id\nChannel_ID:value\n\n"
"G:xively:feed_id\nChannel_ID\n"

Emoncms

"K:emoncms:YOUR_API_KEY\n"
"P:emoncms:optional_node_id\nInput_ID:value\n\n"
"G:service:optional_node_id\nInput_ID\n"

Data.Sparkfun

"K:sparkfun:YOUR_API_KEY\n"
"P:sparkfun:optional_feed_id\nfeed:value\n\n"
"G:service:optional_feed_id\nfeed\n"

ThingSpeak

"K:thingspeak:YOUR_API_KEY\n"
"P:thingspeak:channel_id\nfield_id:value\n\n"
"G:thingspeak:channel_id\nfield_id\n"

Misc services

Licences

Source code licence

Copyright (C) 2014  Mario Luzeiro

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Hardware licence

The hardware files are licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License
(CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/deed.en

About

This is a project to make a serial gateway for Industrial IoT devices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published