WaresWichall / hass-anycubic_cloud

Anycubic Cloud component for Home Assistant
GNU General Public License v3.0
13 stars 2 forks source link

Camera support #4

Open WaresWichall opened 3 months ago

WaresWichall commented 3 months ago

Anycubic Cloud supports camera streams via Amazon Kinesis, which means that to view your camera, the stream is sent from the printer to an anycubic server on AWS Kinesis, then you stream from that to your app/slicer. This also means anycubic have access to the camera feed whenever they like.

I'm not comfortable with this and didn't see the need in yet more data sent back and forth to the cloud just for me to see it on my local network.

Personally I suggest using any raspberry pi with mjpeg streamer installed (or octoprint etc) and plug the camera straight into that.

This also allows you to control the LEDs on the camera via the gain camera control and more image settings.

This is also all natively supported in home assistant.

Coupled with this home assistant integration it would also be easy to trigger timelapse recordings on the raspberry pi cam feed when prints start

For anyone more adventurous, I did write the first function to get AWS tokens for the camera stream and open the printer stream, see here: https://github.com/WaresWichall/hass-anycubic_cloud/blob/0f0f87fc6dce486c5349d22ed35c0eff8824d525/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py#L817

I don't plan to work on it any more than that though.

WaresWichall commented 3 months ago

To add to this - AWS Kinesis streams are webRTC which is a very vague and not well supported format - there's only one integration I can see supporting webrtc feeds and it's not simple to set up https://github.com/AlexxIT/WebRTC with lots of external dependencies

ImhotepDE commented 3 months ago

But it would be great if that worked, then you wouldn't need any additional hardware and could use the integrated camera function.

WaresWichall commented 3 months ago

When they offer a local option I will support it :)

tymtymm commented 2 months ago

Hi, looks like anycubic enabled camera support in lan mode in latest update, maybe it can be pulled from printer now

WaresWichall commented 2 months ago

@tymtymm I will need to do a bunch of work to support LAN mode, and I'm very wary of any firmware upgrades for my kobra 3 at the moment with all the problems people keep having.

Unfortunately I've only got one printer and I can't risk it being out of action for the time being...

You're welcome to join the anycubic discord if you're up for helping me gather data to do it, will need a bunch of tinkering though