diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..217df35c --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2008-2015 Nicholas O'Leary + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..89e0088c --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +ThingsBoard client for Arduino +============================== diff --git a/keywords.txt b/keywords.txt new file mode 100644 index 00000000..fafc479d --- /dev/null +++ b/keywords.txt @@ -0,0 +1,25 @@ +####################################### +# Syntax Coloring Map For ThingsBoard +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +PubSubClient ThingsBoard + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +connect KEYWORD2 +connected KEYWORD2 +sendInt KEYWORD2 +sendFloat KEYWORD2 +sendString KEYWORD2 +sendJson KEYWORD2 +loop KEYWORD2 + +####################################### +# Constants (LITERAL1) +####################################### diff --git a/library.json b/library.json new file mode 100644 index 00000000..6ab9e800 --- /dev/null +++ b/library.json @@ -0,0 +1,12 @@ +{ + "name": "ThingsBoard", + "keywords": "mqtt, m2m, iot, thingsboard", + "description": "A library for connecting to the ThingsBoard IoT platform. Thin wrapper on PubSubClient", + "repository": { + "type": "git", + "url": "https://github.com/forGGe/ThingsBoardArduino" + }, + "version": "0.1", + "examples": "examples/*/*.ino", + "frameworks": "arduino" +} diff --git a/library.properties b/library.properties new file mode 100644 index 00000000..26420142 --- /dev/null +++ b/library.properties @@ -0,0 +1,10 @@ +name=ThingsBoard +version=0.1 +author=Max Payne +maintainer=Max Payne +sentence=ThingsBoard library for Arduino. +paragraph=A library for connecting to the ThingsBoard IoT platform. Thin wrapper on PubSubClient. +category=Communication +url=https://github.com/forGGe/ThingsBoardArduino +architectures=* +includes=ThingsBoard.h diff --git a/ThingsBoard.cpp b/src/ThingsBoard.cpp similarity index 98% rename from ThingsBoard.cpp rename to src/ThingsBoard.cpp index cea959d2..a634a71d 100644 --- a/ThingsBoard.cpp +++ b/src/ThingsBoard.cpp @@ -3,6 +3,7 @@ Based on PubSub MQTT library. Created by Olender M. Oct 2018. Released into the public domain. + https://thingsboard.io/ */ #include "ThingsBoard.h" diff --git a/ThingsBoard.h b/src/ThingsBoard.h similarity index 94% rename from ThingsBoard.h rename to src/ThingsBoard.h index 7d4d1752..2ed37479 100644 --- a/ThingsBoard.h +++ b/src/ThingsBoard.h @@ -12,20 +12,28 @@ class ThingsBoard { public: + // ThingsBoard(Client &client); + // bool connect(const String &host, const String &access_token, int port = 1883); + // bool connected(); + // bool sendInt(const String &key, int value); + // bool sendFloat(const String &key, float value); + // bool sendString(const String &key, const String &value); + // bool sendJson(const String &json); + // void loop(); private: