INSTALLATION
Install using the NodeRED palette manager
smithtek.cloud
Before using the smithtek nodes you must have a registered account with the service. If you do not have an account go to www.smithtek.com.au
Or contact smithtek directly at info@smithtek.com.au
Usage
There are two different nodes: One for reading information from Smithtek smithtek in
and another one for sending information to Smithtek smithtek out
.
There is also a sequencer node which will send a true
value to each of its outputs automatically. The sequencer node is useful for round robbin polling, its similar to the inject node when its properties are set to interval trigger.
SmithTek In Node
This node is used to subscribe to one 1 Smithtek Variable from smithtek.cloud. It will listen to new values and pass it to further nodes in the msg.payload
. It will output the value only as a number. No context data or time stamp will be outputted.
These are the properties you should configure, by double clicking the node:
-
Token: (Required) This is your account token.
-
Device label: The Device Label containing the Variables to subscribe to. remember to use a "hyphen" or "minus sign," if your name is 2 words. for example
"my device"
would be"my-device"
-
Variable label: The Variable Label to which the node will subscribe. You dont need to use "hyphen" or "minus sign, the cloud will add this for you if you variable name has 2 words.
-
TLS: By default, all data is sent encrypted via TLS. Uncheck if data should be sent unencrypted.
Copy the details from the cloud to your nodeRED Smithtek
nodes like the image below
SmithTek Out Node
This node is used to publish to one or multiple variables in Smithtek,cloud
These are the properties you should configure, by double clicking the node:
-
Token: (Required) This is your account token.
-
Device label: The Device Label containing the Variables to subscribe to.
-
Variable label: The Variable Label to which the node will publish
(only required in Simple Node mode)
. -
TLS: By default all data is sent encrypted via TLS. Uncheck if data will be sent unencrypted.
-
Simple Node: If selected, you need to also enter a variable label name. In simple node mode, you can only publish (send) values to a single variable in smithtek.cloud. If the simple node is not selected. you only need to enter the device name and you can send sensor data to multiple variables.
The data must be in Json format wired to the smithtek out node. If it is not in valid json the data wont send. the below examples can be copied into a inject node and tested.
Example sending data with no gps
{
"sensor1": 123,
"sensor2": 3456,
}
Example sending data with gps
{
"sensor1": 123,
"sensor2": 3456,
"position": {
"lat": "6.5423",
"lng": "-70.5783"
}
}
## Authentication
The authentication is made by using the Token
field in your nodes.
SmithTek Sequencer
This node is used to trigger other nodes with true
values in the msg.payload
.
The sequence node is used to control polling by its outputs. the user can select 1 or multiple outputs, these can be wired to trigger other event.
-
step time
: This is the sequenced step time between each output. if set to 10 seconds, each output will trigger 10 seconds after the last. -
pause
: if you inject any value into the sequence node it will pause the sequence for the pause time amount. if you chose 1 minute, it will pause for 1 minute -
start up delay
: this is the timeout time before the sequence starts. the start up delay will commence after every reboot, or flow deploy. -
outputs
: 1 or more outputs for your sequencer.
License
Copyright (c) 2020 www.smithtek.com.au Licenced under the terms of the GPLv3
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAMIEN CLARK BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Acknowledgements
We would like to thank the following people for their hard word, time and effort.
- Nick O'Leary and Dave Conway-Jones for creating Node-Red Contact info@smithtek.com.au www.smithtek.com.au