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

Bambu Lab P1 Home Assistant Spaghetti Detection Integration.
GNU General Public License v3.0
114 stars 7 forks source link

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

Open aslabsalbeh opened 5 months ago

aslabsalbeh commented 5 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 4 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 3 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 6 days ago

Did you ever get anywhere with this?