Open cdupont opened 4 years ago
@mojtaba-esk @j-forster Any comments?
In order to declare an actuator, the WaziDev needs to send LoRa frames with the IDs of the actuators it possesses. This will allow the gateway and the Cloud to "create" the actuator in the databases, and later to perform actuation. The LoRa frame for actuator declaration (upstream like sensors) could be something like: "#UID/MyDevice/Act1"
This is for discussing the actuation implementation at the WaziGate level. As a first approach, the User will create the actuator himself on the Cloud. This will create the following data structure in the Cloud (e.g. for a boolean actuator):
The gateway is subscribed on MQTT under the device topic, so it should receive the actuation updates:
Once triggering the Cloud actuator, an update should arrive on the Gateway MQTT subscription. The gateway will then broadcast a LoRa message with this form:
For instance:
\&UID/MyDevice/Act1/25
.From the WaziDev side, I think
receiveAll
function from the SX1272 library should work: https://github.com/CongducPham/LowCostLoRaGw/blob/master/Arduino/libraries/SX1272/src/SX1272.h#L892 Used for instance here: https://github.com/CongducPham/LowCostLoRaGw/blob/master/Arduino/Arduino_LoRa_Gateway_1_4/Arduino_LoRa_Gateway_1_4.ino#L954