Closed lawik closed 3 days ago
I think the next bit of code needed is in
Socket
which would reply to this information when asked for it.
I've added this stuff now. I think this implementation is "complete" for now. If completely untested :D I could add the other end too unless you feel extra keen @joshk
We should add tests. This is still a draft :)
I think we might want to bump https://github.com/nerves-hub/nerves_hub_link/blob/main/lib/nerves_hub_link/configurator.ex#L6 when this is merged in, and we can use this information in hub to decide to display information or a message to upgrade.
I think we might want to bump https://github.com/nerves-hub/nerves_hub_link/blob/main/lib/nerves_hub_link/configurator.ex#L6 when this is merged in, and we can use this information in hub to decide to display information or a message to upgrade.
But I think we've just added stuff? Or did we change any of the API surface already in use?
we added support for requesting health data. by matching this to the api version we can display in the UI that Link needs to be updated for this information to become available.
@amclain @joshk This is my thinking on how to structure things.
Essentially you get an opinionated default report for much of what NervesMOTD does and such (not fully built out but sketched in code).
You can add custom metrics, metadata and such with minimal config changes.
Or you can write a custom report by implementing a behaviour and one line of config.
This should encode to JSON. I'm not convering scheduling here, I'm not talking storage, querying or anything.
The peripherals field probably requires most explanation but is also the one with the most structure and I'm happy for input on that. The idea is that you can do health checks on sensors, cameras, hardware, indicate what bus they are on and so on. The default would probably just have network info?