-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
[Feature] Running Obico server as a Home Assistant add-on #759
Comments
The obico-server isn't supported on Raspberry Pi hardware, as it needs more resources than a Pi can offer for doing the detection, and many HomeAssistant installs are done on a Pi. The obico plugins for Octoprint or Moonraker/Klipper run on whatever device you are running those on typically and wouldn't be applicable to HA as far as I can tell. |
A lot of people run HA on x86 hardware like Intel NUC or older server/thin client PC. However, by briefly looking into the dependencies I can see it wouldn't be as easy as wrapping the obico-server docker image in HA addon. |
So by looking more into it, I will go with the cleanest way - HA addon with REST ML API and HA integration implementing camera feed scanning service and providing camera entity with detected failures and maybe some additional sensors with info about detected failures. |
Any updates on this? I would like this as an option. |
We haven't been able to get around to it. Hope someone in the community can pitch in to implement it using our API, or even send a PR to our main repo. |
@kennethjiang Ok assuming one has a self-hosted obico server already running. Can someone give me the high level primer on which API's would be used to send data to obico? As a start, I would assume you would create a dummy printer in obico web-app, and then HASS-plugin would send print/image data periodically, and also receive data. The API's listed at https://www.obico.io/docs/api/ seem to only be a way to receive data from obico and not send data. |
@ForceConstant Our API follows the RESTful convention. We don't allow printer creation using APIs for security reason. But other mutating operations are supported. |
@kennethjiang can you specifically tell me how to tell obico server there is a new image url to process? |
@kennethjiang So looking more at this, it seems that this addon would be in the same mold as the current octoprint/klipper addons. Which seem to all talk to obico-server using undocumented API's. Such as '/api/v1/octo/pic/', etc. Or do I have that wrong? |
Ah yes we haven't got a chance to document the agent side's of the APIs. You will need to reverse-engine them but hopefuly they are not difficult to understand. |
That sounds like something suitable for Kubernetes |
|
So cool. Is your code available on github? If so, can you post the link here so that other community members can use it too? |
Not yet, I'll publish a basic integration within a few days (right now it's just a PoC with a lot of hardcoded stuff that works only in my setup), but the HA addon would require a lot more work since HA addons are Docker images based on the specific base layer with S6 process supervisor and other additional stuff. |
Can you explain what this means? There are plenty of integrations in the main HA branch, but also stuff in HACS https://hacs.xyz/ , and I don't think any of them require docker at all. What do you mean? I understand for Obico we would most likely need to run obico server separately from HA, but the integration itself would not need to be a container. |
HA integration = Python code that implements HA entities and handles communication with Obico ML REST API. This is not a part of the Docker container. HA addon = Basically a Docker container. In this context it's a Docker container with Obico ML REST API server. |
So PoC of the addon is here: Some minor things and HA integration should be published over the weekend. |
So the integration is here - https://github.com/nobodyguy/obico_ml_ha_integration |
Is your feature request related to a problem? Please describe.
Home Assistant is a powerful platform to integrate all sorts of hardware and software at once. Many people use it to run auxiliary software such as DNS servers, or grocery shopping lists. Since the format of the addon is very well-defined and based on docker images, it would be nice if you can distribute one.
Describe the solution you'd like
Obico-supported HA addon
Describe alternatives you've considered
Creating my own hacked addon.
Additional context
https://developers.home-assistant.io/docs/add-ons
The text was updated successfully, but these errors were encountered: