Skip to content
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] Camera stream only while printing or on request #423

Closed
crosserSniper opened this issue Jan 10, 2024 · 19 comments
Closed

[Feature] Camera stream only while printing or on request #423

crosserSniper opened this issue Jan 10, 2024 · 19 comments
Labels

Comments

@crosserSniper
Copy link

Describe the feature

My Homeassistant-Logfile is full with camera P1S has changed.
It would be great, if the image is only refreshing while printing, or on request - for example when the picture was pressed.

grafik

What device is this for?

P1S

Other Information

No response

@crosserSniper crosserSniper added the feature request New feature or request label Jan 10, 2024
@niklerus
Copy link

I second that, the camera never stops unless you power cycle the printer (and then you need to restart HA to get camera to start)
Logfile gets an updated entry every second as it is now.

@kiwiholmberg
Copy link

kiwiholmberg commented Jan 14, 2024

I added configuration to exclude events from the camera since they were extremely spammy. Goes in your global HA configuration.yaml:

logbook:
  exclude:
    entities:
      - image.p1s_01pxxxxxxxx_camera
      

@cahdero
Copy link

cahdero commented Jan 14, 2024

I added configuration to exclude events from the camera since they were extremely spammy. Goes in your global HA configuration.yaml:

logbook:
  exclude:
    entities:
      - image.p1s_01pxxxxxxxx_camera
      

I've tried this using the "recorder" integration ...continues to record camera updates..

@niklerus
Copy link

I disabled the entity for now, hoping it will be fixed in the near future.

@miabilabs
Copy link

Adding a vote here. I've unfortunately disabled the entity as well.

@AdrianGarside
Copy link
Collaborator

I second that, the camera never stops unless you power cycle the printer (and then you need to restart HA to get camera to start) Logfile gets an updated entry every second as it is now.

It’s a bug if you have to restart the printer to get the camera working again. I fixed a bug recently that led to that if you were connecting via the Bambu cloud Mqtt service instead of direct to the printer.

@AdrianGarside
Copy link
Collaborator

I added configuration to exclude events from the camera since they were extremely spammy. Goes in your global HA configuration.yaml:

logbook:
  exclude:
    entities:
      - image.p1s_01pxxxxxxxx_camera
      

Is that working for you? It doesn’t for me. What version of home assistant are you running?

@kiwiholmberg
Copy link

I added configuration to exclude events from the camera since they were extremely spammy. Goes in your global HA configuration.yaml:

logbook:
  exclude:
    entities:
      - image.p1s_01pxxxxxxxx_camera
      

Is that working for you? It doesn’t for me. What version of home assistant are you running?

Yes it works. I no longer see the events for the camera in the logbook. Running HAOS 11.2, the printer is in LAN mode. To be extra clear, you'll have to change the entity name in the filter to match whatever your camera entity name is 🙂

@cahdero
Copy link

cahdero commented Jan 16, 2024

I added configuration to exclude events from the camera since they were extremely spammy. Goes in your global HA configuration.yaml:

logbook:
  exclude:
    entities:
      - image.p1s_01pxxxxxxxx_camera
      

Is that working for you? It doesn’t for me. What version of home assistant are you running?

Yes it works. I no longer see the events for the camera in the logbook. Running HAOS 11.2, the printer is in LAN mode. To be extra clear, you'll have to change the entity name in the filter to match whatever your camera entity name is 🙂

You’ll want to utilize the “record” function and not the “logbook” function. It still get recorded just doesn’t show on the logbook. Also if using the record function it doesn’t show on the logbook bag but only when you filter for the actual camera entity for some reason

@niklerus
Copy link

I second that, the camera never stops unless you power cycle the printer (and then you need to restart HA to get camera to start) Logfile gets an updated entry every second as it is now.

It’s a bug if you have to restart the printer to get the camera working again. I fixed a bug recently that led to that if you were connecting via the Bambu cloud Mqtt service instead of direct to the printer.

You've misread a bit, I said that I need to restart HA to get the camera to work again if I stop the logflow from the printer by restarting the printer.

@AdrianGarside
Copy link
Collaborator

I spent some time over the weekend trying to get recorder and logbook exclusions to work with no success - they’re still spamming the system. So I wonder what’s different for folk that have gotten it to behave as advertised.

@AdrianGarside
Copy link
Collaborator

I second that, the camera never stops unless you power cycle the printer (and then you need to restart HA to get camera to start) Logfile gets an updated entry every second as it is now.

It’s a bug if you have to restart the printer to get the camera working again. I fixed a bug recently that led to that if you were connecting via the Bambu cloud Mqtt service instead of direct to the printer.

You've misread a bit, I said that I need to restart HA to get the camera to work again if I stop the logflow from the printer by restarting the printer.

Sorry I mistyped. I mean it’s a bug if you have to restart home assistant after you restarted the printer to get the camera working again. It should automatically reconnect without any intervention.

@AdrianGarside
Copy link
Collaborator

I added configuration to exclude events from the camera since they were extremely spammy. Goes in your global HA configuration.yaml:

logbook:
  exclude:
    entities:
      - image.p1s_01pxxxxxxxx_camera
      

Is that working for you? It doesn’t for me. What version of home assistant are you running?

Yes it works. I no longer see the events for the camera in the logbook. Running HAOS 11.2, the printer is in LAN mode. To be extra clear, you'll have to change the entity name in the filter to match whatever your camera entity name is 🙂

You’ll want to utilize the “record” function and not the “logbook” function. It still get recorded just doesn’t show on the logbook. Also if using the record function it doesn’t show on the logbook bag but only when you filter for the actual camera entity for some reason

I can't get recorder exclusion to work for these images by any means:
recorder:
exclude:
domains:
- image
entity_globs:
- image.p1p*
entities:
- image.p1p_SERIAL_camera

None of domains, entity_globs or entities work to stop the state change being recorded and present in the logbook every 1-2 seconds. Were you able to get this to work?

@AdrianGarside
Copy link
Collaborator

AdrianGarside commented Jan 27, 2024

My testing was flawed. The logbook pane in the device view shows pre-filtered changes and I have found no way to prevent that showing live changes even when they are correctly filtered from the logbook and backing database. The actual logbook was properly excluding.

You can suppress the logging by adding either of these to your configuration.yaml file:

recorder:
  exclude:
    entity_globs:
      - image.p1*_camera
      - sensor.p1*_wi_fi_signal

or

logbook:
  exclude:
    entity_globs:
      - image.p1*_camera
      - sensor.p1*_wi_fi_signal

I recommend suppressing recording as that'll reduce the database churn.

Copy link

Stale issue message

@sabaatworld
Copy link

Is it possible to expose camera as a camera entity? It would be easier to work with and also avoid the above issues.

Copy link

github-actions bot commented Jun 9, 2024

Stale issue message

@jawilson
Copy link
Contributor

Is it possible to expose camera as a camera entity? It would be easier to work with and also avoid the above issues.

I've added PR #595 to implement this.

@AdrianGarside
Copy link
Collaborator

Resolving as completed with #595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants