aerosense-ai / data-gateway

Data influx for Aerosense.
https://www.aerosense.ai/
Other
3 stars 1 forks source link

Add support for multiple sensor nodes #36

Closed WeikangKong closed 2 years ago

WeikangKong commented 2 years ago

Feature request

Add possibility to operate multiple sensor nodes with the single base base station,

Open questions:

Command in multi-device context

@JuliusPlindastus @tommasopolonelli @hmllr @time-trader Since we are extending the firmware to support multiple peripheral devices, it is a good time to discuss how you would like to issue commands in the multi-device context. To finalize the format of the command, the following questions need to be answered:

  1. Is it desired to send commands to either one of the peripheral devices or all of them, or actually it is better if the destination can be any subset of the available devices.
  2. Is it better to first declare the peripheral devices we want to communicate to with a separate command, and then issue commands like we used to: -selConn 3 (this means we want to communicate to device 1 and 2) -startMics -stopMics or add an extra argument to specify: -startMics 3 -stopMics 3

Configuration file

Configuration file contains sensor properties as well installation metadata. We should probably allow for possibility to have different sampling frequencies on different nodes. Should we keep a single configuration file?

cortadocodes commented 2 years ago

If we choose option 2, how about e.g. 3.startMics where 3 is the device number?

WeikangKong commented 2 years ago

If we choose option 2, how about e.g. 3.startMics where 3 is the device number?

I think it is also a good option

tommasopolonelli commented 2 years ago

Who define the define number? Do we need a command or should be hardcoded?

time-trader commented 2 years ago

Who define the define number? Do we need a command or should be hardcoded?

How does BT protocol identify different nodes? I guess we can have a dictionary in the configuration file. Something like: {"Senor nodes": {"1":bt_id1, "2":bt_id2, "3":bt_id3}, to connect the number to actual device?

time-trader commented 2 years ago

In terms of configuration file I would keep a single configuration fie, but add another top layer with keys as sensor nodes something like { "node_1":{, "node_2":{...}

thclark commented 2 years ago

I'm closing this, the latest releases are stabilising this nicely.