nberktumer / ha-bambu-lab-p1-spaghetti-detection

Bambu Lab Home Assistant Spaghetti Detection Integration.
GNU General Public License v3.0
145 stars 10 forks source link

Silly question - Does it work on the A1 with an external cam #11

Closed aslabsalbeh closed 1 week ago

aslabsalbeh commented 6 months ago

Hey, sorry for the noobie question.

I have the Bambu A1 connected to Home Assistant which is running on a Synology NAS.

The A1 is also connected to Octoprint, running on an OrangePi and using Obico through an external camera (Logitech 920). Octoprint is also integrated into HA to view the camera feed from the Logitech 910.

Given the above, would it be possible to follow the installation steps and get the whole thing working, or is this specifically developed for the P1?

nberktumer commented 6 months ago

The automation logic will work, but it may require some modification in the blueprint. P1 camera is a 0.5FPS camera and in home assistant the camera preview is a image sensor rather than a camera sensor. Also, with the current approach, the automation is triggered for each frame. So, my guess is:

  1. You probably have a camera entity and getting the image code won't work with a camera entity (I haven't tried it though).
  2. Even if the 1. part works, the automation will be triggered for each frame, which is probably 30FPS in your case. The automation runs on "single" mode, so this may not cause a problem but may result in high CPU usage.
boehser-enkel commented 5 months ago

The automation logic will work, but it may require some modification in the blueprint. P1 camera is a 0.5FPS camera and in home assistant the camera preview is a image sensor rather than a camera sensor. Also, with the current approach, the automation is triggered for each frame. So, my guess is:

1. You probably have a camera entity and getting the image code won't work with a camera entity (I haven't tried it though).

2. Even if the 1. part works, the automation will be triggered for each frame, which is probably 30FPS in your case. The automation runs on "[single](https://www.home-assistant.io/docs/automation/modes/)" mode, so this may not cause a problem but may result in high CPU usage.

I tried to run the service bambu_lab_p1_spaghetti_detection.predict with the ip camera image but i get an empty response. Both URLs give me a camera image. Any idea whats wrong?

http://192.168.88.202:8123/api/camera_proxy/camera.192_168_88_45?token=aaece96fd4623448635708bc85d7e8c7d854ce6c5e678d7e6501584631571c0e -> empty response

http://192.168.88.202:8123/api/image_proxy/image.a1mini_0309da3a2000673_kamera?token=71b6ba546e8f455e1051dae86683d3ad010d370aeafa315500178ba59aff8677 -> works

Perchycs commented 1 month ago

Did you ever get anywhere with this?

nberktumer commented 1 week ago

v1.1.0 supports all Bambu Lab printers and 3rd party camera support. You can select any camera entity while setting up the automation.