Unfortunately I am currently not up to that task, but I still want to discuss a certain feature-Idea.
It would be super-nice to to have a Homeassistant-Integration for the OFM. Certain API-Features need to be there anyways, to e.G. use openflexure-connect. I’d think of an integration similar to the prusa-link-integration (featurewise). openflexure-connect can already read exposed informations like
- is available/online
- live preview cam image
even pre-connect.
when connected/authenticated, there’d be more to monitor. what I’d think of is for example
sensors:
- current state [idle/scanning/stitching/errorCondition]
- percent done
- name of current scan
- preview of current scan (image entity)
- motor positions/current coordinates
- CameraStream (HA already has a native method to integrate things like camera-streams efficiently)
- isOnline [bool]
- uptime
- state/ip/mac for wifi and eth
- firmware version
- motor-board type (and it’s fw-revision)
- error states
- illumination state
- self-defined sensors for modifications
triggers/switches:
- start scan [args]
- goTo [x,y,z]
- focus
- take snapshot
- toggle illumination
- set background-values
- self-defined switches/toggles for modifications
additional sensors and actors (maybe hidden by default)
- calibration data (sensor)
- calibrate (switch)
- motor-board total step count [x,y,z] (maybe useful for deciding, if new motors and assoc. printed parts may be need to replaced somewhen as maintenance measure)
- system load
- mem usage
- available space on sdcard
- temperatures
- updates available [count] (system)
- trigger fw-update (e.G. for sangaboard or RPI Bootloader)
…and most likely countless others i didn’t even think of…
I think such an integration would be supercool, and most likely many (if not all) things are already there in one form or another. Even without any modifications, with API-access and ssh together basically all of the above would already be possible, even tough only one of which should be used (and OFM should maybe consider certificate handling to not blow passwords in plain over the network. even optional selfsigned certs with 10y validity are much better than none at all…).
Beside me finding it desirable to stare at wiggly graphs, i think it would also greatly benefit anyone hosting more than one or two OFMs to quickly get an overview for classrooms and such. Having a Homeassistant-Integration would also serve as some kind of default-example-implementation on how to implement an API-client to get all the valuable metrics in realtime, and therefore would enable easy transitions to other smart-home-platforms like FHEM or monitoring-Platforms like Grafana in the long run.
What do you all think?
-zeus