Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO #10

Open
akielaries opened this issue May 25, 2024 · 0 comments
Open

TODO #10

akielaries opened this issue May 25, 2024 · 0 comments

Comments

@akielaries
Copy link
Owner

akielaries commented May 25, 2024

Lab devices will all publish the same base telemetry:

  • CPU Info
  • Processor Count
  • CPU Usage
  • Process Count
  • CPU Load
  • VRAM Total
  • VRAM Used
  • VRAM Free
  • PRAM Total
  • PRAM Used
  • PRAM Free

Devices:

  • Raspberry Pi 1 : PUBLISHER

  • Raspberry Pi 2 : SUBSCRIBER

  • Raspberry Pi 2 : PUBLISHER

  • Raspberry Pi 3 : PUBLISHER

  • Raspberry Pi 4 : PUBLISHER

  • BeagleBone Black : PUBLISHER - Will publish environment telemetry (BME280) and onboard temp via TMP36

  • BeagleBone Black : PUBLISHER - Will publish enclosure environment telemetry (BME280) and onboard temp via TMP36

  • Jetson Nano : PUBLISHER - Will publish GPU info

  • Jetson Orin Nano : PUBLISHER - Will publish GPU info

  • RPi2 will be the main subscriber collecting telemetry from all of the publishers. Ideally in a multithreaded, low-resource usage way.

    • RPi2 will take in data from each subscriber in some data structure and write it to an instance of InfluxDB
      • The InfluxDB will be a single database likely all with different tables
      • Each table for each device by their device name (specified in a .conf file)
    • The RPi2 will also host an instance of grafana that will plugin to the InfluxDB instance
    • Start with sending data from RPi4 -> Jetson Nano just to verify structure.
    • Implement transport protocol. Something centered around hex values, commands as hex values, TLV etc.....
      • Should be fairly beefy and general purpose. want to transmit 64-bit integers and 32-bit floating point values
    • Next start cleaning up code. Structs, logic, make sure LCD is OPTIONAL, etc.
    • Include BME280 driver as a dependency for beaglebone devices, maybe using CMake?
  • The rest of the publisher devices should be sending telemetry to the RPi2 (subscriber) every 5-10 seconds.

    • MAYBE a more creative way could be to only publish data that is different from the previous reading and within a given tolerance/range

should fan control sit on a separate circuit with an MCU or directly on RPi GPIO... might be valuable for a standalone MCU to control this without a daemon on 1 RPi for sysd + fan control especially since the 2 fans are for 4 RPis. there could also be two input signals/triggers for the control circuit where MCU is the main handler and the RPi is able to send interrupts/blocks to inject its own behavior...

For the above:
Targeting the stm32f103x blue pill I have laying around. So far it's easy to configure pins and do simple pull up/down to trigger the relay-fan circuit...

  • anything more complex will result in some more effort and time digging in the datasheet
  • Ideally I would like to do the following with this MCU->relay circuit setup in the Pi enclosure
  • STM32 drive the circuit
  • STM32 is able to hard turn OFF fan around 8-10PM and back ON around 7-8AM
  • STM32 is able to monitor the temperature, humidity, etc. within the enclosure using the BME280 sensor
    • IDEALLY I'd like to send this captured data to the core InfluxDB I got running using the ESP8266. This will be a pain without some sort of HAL which may be worth it but doing it from the ground up will be useful learning...
    • This data being sent should be able to be captured using the main subscriber loop on the main subscriber device meaning the ESP will need to open a socket and ack from the RPi 2?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant