Skip to content

add a powerboard climate monitoring tool

Zhicai Zhang requested to merge zhicaiz/powertools:zz_pb_climate into activeTB

Add a tool (seperate from pbv3_monitopr tool) to monitor the powerboards and active temperature/humidity in real-time.

The tool can output the temperature/humidity in three ways:

  1. teminal output (can be parsed by GUI for example), this is by default enabled.
  2. Save to a .csv file. This is by default not enabled, and to enable it, one needs to pass -o outDir option in the command.
  3. Push the data to influx db. This is by default not enabled, and to enable it, one needs to config the stream in the equip config file, and pass -s streamName option in the command.

Example config file to make the influx db work:

   "datasinks": [
        {
            "name": "Console",
            "sinktype": "ConsoleSink"
        },
    {
        "name": "DB",
            "sinktype": "InfluxDBSink",
            "host": "128.3.50.38",
            "port": 8086,
            "database": "pbv3",
            "username": "strips_powerboard_rw",
            "password": "your_password_here"
        }
    ],
    "datastreams": [
        {
            "name": "powersupplies",
            "sinks": ["Console"]
        },
        {
            "name": "temperatures",
            "sinks": ["Console", "DB"]
        },
        {
            "name": "voltages",
            "sinks": ["Console", "DB"]
        }
    ],
    "streamChannels": [
        {
            "name": "temperatures",
            "DB_MeasurementName": "rack0_crate1_env",
            "DB_ChannelName": "PowerboardTemp_P0"
        }
    ],

And to enable all 3 output methods, one can do:

../build/bin/pbv3_powerboard_climate -e ../../config/equip_testbench_noah_updated.json -b 4,5 -s temperatures -o envMon

The tool can monitor multiple powerboards at the same time.

Merge request reports