joseffallman / hass_flashforge

FlashForge 3D printer integration for Home Assistant
MIT License
5 stars 2 forks source link

Add support for different camera urls #45

Closed scruffyOrc closed 2 months ago

scruffyOrc commented 2 months ago

Checklist

Is your feature request related to a problem? Please describe.

Flashforge has pushed out a new firmware for the 5M/5MPro and the camera now streams on http://{IP}:8080/?action=stream instead of http://{IP}:8080/stream_simple.html

Describe the solution you'd like

Since it is firmware dependent, you can't just base it on whether it's a 5M/Pro or not so, can you have it be either a text box for entering the camera url or have radio button for which it should be?

Describe alternatives you've considered

I could fork the code and do it but I figured it would make sense keep it in one place instead.

Additional context

Let me know what you think.

joseffallman commented 2 months ago

Did you mean that in the new firmware the url is http://{IP}:8080/stream_simple.html ??

I have a AD4 and can't confirm. Right now the /?action=stream url is used.

scruffyOrc commented 2 months ago

The 5M was streaming the camera at http://{IP}:8080/stream_simple.html and the plugin was working. They pushed new firmware to the 5M series which moves the camera to the what I guess is the same URL as the AD4 now...let me try removing and re-adding the printer in the plugin to see if it gets the camera URL right.

EDITED: Nope it still doesn't show the camera stream. Any logging I can enable to see what URL it's trying to show me?

scruffyOrc commented 2 months ago

Since I still had the code from the last time I was tinkering with this I looked...that's really weird that it was working...the camera was not exposed on the action=stream url in the past so the fact that it was working makes no sense unless it was and just wasn't told to anyone that it was actually working that way. I guess there's something else going on with this, and you don't need to deal with this now, so I'll just close this.

I did see you just pushed a new version that has control and a whole lot more status details. Great job! This is the best plugin I've found for the flashforge printers, and you keep making it better!!!