Below you will find a few examples of off-the-shelf devices and how to use the Payload converter to connect them with AllThingsTalk Maker. For each of them, the needed assets in Maker and Payload definition are supplied.
Always make sure the assets names you use in Maker match the corresponding asset names in your Payload definition.
“SMOVE is a ready to use LoRaWAN accelerometer for remote sensing of motions, vibrations and tilt. The compact enclosure holds all electronics including batteries and embedded antenna. The design has been optimized for Long range, Long battery life, and reliability. The device can be used in harsh indoor and outdoor environments since it has an extended temperature range and furthermore is dust and water proof. Pre-programmed user requested Lora-keys, and sensitivity settings make this device Plug and Play.”
Name | Profile |
---|---|
force | {"type": "integer"} |
battery | {"type": "integer"} |
1 | { |
1B 5D | ||
Byte | Hex | |
---|---|---|
0 | 1B | Set force to 27 |
1 | 5D | Set battery to 93 |
“The MCS1608 Full ITalks end sensor node designed to start quickly with (Private) Lora applications. This complete Lora modem in an IP67 enclosure, so it can also be used outside, already has numerous sensors, so it can be rapidly deployed to test the desired IoT application. On the basis of the successful testing can after that the appropriate sensor can be chosen for u. The nodes are programmed by us at cost or you can do this yourself if you MCS1608 programming cable ordering it. The device is supplied as standard ABP.”
The MCS1608 has a large set of operating states. Below we have implemented the payload definition for the General Sensing setting. The state the device is operating in, is provided by the first byte of the payload, hence the switch/case on byte 0 in our payload definition.
Name | Profile |
---|---|
msgid | {"type": "string"} |
BaromBar | {"type": "number", "unit": " mBar"} |
Temperature | {"type": "number", "unit": " °C"} |
Humidity | {"type": "integer", "unit": " %"} |
Angle | {"type": "object", "properties": {"x": {"type": "integer"}, "y": {"type": "integer"}, "z": {"type": "integer"}}} |
Vibration | {"type": "object", "properties": {"amplitude": {"type": "integer"}, "frequency": {"type": "integer"}}} |
1 | { |
02 00 02 37 07 FF 2B 00 00 FC 00 00 00 00 00 00 | ||
Byte | Hex | |
---|---|---|
0 | 02 | Enter the corresponding switch/case. Case 02 is fully implemented and sets the String value for the msgid asset. The other cases only update the message id asset showing the current device setting |
2-3 | 02 37 | Given the calculation (val+100000)/100, the BaromBar asset gets set to 1005.67 |
4-5 | 07 FF | Given the calculation val/100, the Temperature asset gets set to 22.37 |
6 | 2B | Set the Humidity asset to 43 |
7, 8, 9 | 00, 00, FC | Set the x, y and z fields of the Angle asset to 0, 0 and -4 respectively. Since we want our values between [-128, 127] rather than [0, 255], we add the selector "signed": true |
10, 11 | 00, 00 | Set the amplitude and frequency fields of the Vibration asset to 0 and 0 respectively |
No timestamp is sent in the message so the _at_ field is always empty. The timestamp will be set in the cloud when the message arrives.
1 | 'msgid': {'value': 'GenSens', 'at': None} |
“Push, a low-power, long range, wireless push sensor is the ideal product to let customers interact with you. With a simple push on the button you know when the coffee machine needs a refilling, the copier is out paper or support is required at a certain location inside your store.”
Name | Profile |
---|---|
push | {"type": "string"} |
count | {"type": "integer"} |
length | {"type": "integer"} |
1 | { |
04 02 0A 00 08 | ||
Byte | Hex | |
---|---|---|
0 | 04 | Message length. We set the length asset to 4 |
2 | 0A | We enter switch/case 10 (0A in Hex) We set the push asset to "Short" |
3-4 | 00 08 | Set the count asset to 8 |