Sample MetaHub Config file?

Hi! I just purchased the MetaHub, and am trying to understand how to configure the sensors in the config file. Problem is, the sample file provided only activates a single board and two sensors on it, and the README file isn't clear (at least, to me!) about the overall structure of a more complicated config file. Specifically, I'm not certain how the "sensors" key works; do the settings apply to ALL connected boards, or can you specify different sensors/settings for different boards? A more comprehensive sample file would be a big help! Or perhaps someone could just clarify the syntax of the "devices" and "sensors" keys for me with respect to multiple devices. Thanks.


  • Did you look at the README?

  • @Laura said:
    Did you look at the README?

    Yes of course. But it doesn't describe - at least, to me - whether or not the "sensors" key arguments affect individual devices, or all such sensors on all devices e.g. if I set "Accelerometer": { "odr": 100.0, "range": 4.0 }, am I affecting the accelerometer on a _specific _board, or the accelerometers on _all _boards? And if the former, what is the proper syntax for using "device" and "sensor" to accomplish settings for individual sensors? Thanks.

  • edited June 2020

    It's just JSON syntax:

        "command": "stream",
        "devices": [        
        "sensors": {
                "Accelerometer": {"odr" : 100.0, "range": 4.0, "threshold": 2.0},
                "Temperature": {"period" : 1800.0 },
                "Pressure": {"odr" : 0.99, "delta": 10.0}
  • With apologies - you're missing my point. My question is: Can sensors of a type be set up INDEPENDENTLY for multiple boards, or do ALL, for example accelerometers, end up sampling at the same rate and with the same range, regardless of how many boards (devices) are connected? Thanks.

  • edited June 2020

    I think with the Metahub app it's all the same.
    If you want to set up sensors independently, you will have to modify the metahub app or write your own app (it would be easy to write a quick setup app in python).

  • Many thanks!

Sign In or Register to comment.