#How can I configure mjpeg camera for K1 in GuppyFLO

97 messages · Page 1 of 1 (latest)

peak igloo
old lynxBOT
#

Ahoi @peak igloo!
Welcome to the Mainsail support-forum!
There is a problem with the tags you selected for this post. Please fix them to fit your question.
For further information on tags please check the readme: #readme message

To change the tags of this post:

  1. Open the ... menu on the top right corner of this post.
  2. Find Edit tags
  3. Select the checkbox of the correct tags.

Usually you just need to select one tag!
If you still have no idea which one to choose, feel free to ask here.

Note: This is an automated message

Thanks for your cooperation!

#

Ahoi @peak igloo!
It looks like you did not provide all the necessary information we need to help you.
Please upload your logfiles and a detailed description of your problem.
For further information see: https://docs.mainsail.xyz/faq/getting-help/discord#provide-information
Note: We only accept .log and .txt files as log files.
This is an automated message

We are glad to help and chat with you on our Community Discord, but if you need help and want the best support possible you should, follow a few simple rules:

drifting ravine
#

If you already have your printer added, you can remove it and readd with the above camera configuration

#

Do you know the api path and port to your camera service for mjpeg? If you use the helper script to setup moonraker/fluidd/mainsail, the service is mjpeg-streamer, camera port should be 4408 for fluidd and 4409 for mainsail. Give the above picture setting a try, ip should be 127.0.0.1 in this case too.

peak igloo
#

I know the details, but I can't get anything else than go2rtc to show up

#

I've installed it on a separate lxc container on a different host on the same network

#

how can I update it?

--2024-03-29 22:50:38--  https://raw.githubusercontent.com/ballaswag/guppyflo/main/installer.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 2606:50c0:8000::154, 2606:50c0:8001::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2354 (2.3K) [text/plain]
Saving to: 'STDOUT'

-                               100%[=====================================================>]   2.30K  --.-KB/s    in 0s

2024-03-29 22:50:39 (56.8 MB/s) - written to stdout [2354/2354]

Installing GuppyFLO
Archive:  /tmp/guppyflo.zip
replace /root/guppyflo/fluidd/.version? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
(EOF or read error, treating as "[N]one" ...)
Configuring GuppyFLO services
Restarting GuppyFLO service
Successfully installed GuppyFLO```
#

I already installed/configured it a few days ago

#

I guess that's because I have an old version and need to update?

drifting ravine
#

You need to stop the service delete guppyflo dir and reinstall

#

sorry the installer doesn’t handle update yet, will fix that soon

peak igloo
#

can I keep the config somehow, to not have to reenter API keys, etc. ?

drifting ravine
#

yeah

#

save guppytunnel.json before you delete

#

And move it back into the dir after you reinstall

#

If you’re using ngrok for mjpeg streamer I suggest you not because your 1gb bandwidth from ngrok will get use up in like 5 minute of streaming

peak igloo
#

ok, so should I just remove ngrok settings?

drifting ravine
#

you can keep it, both tailscale and ngrok can be enable at the same time

#

Just make sure when you access via ngrok you don’t click on the cameras to start the streams

#

Unless it’s webrtc

peak igloo
#

Cam doesn't work for me. I've checked the url in the browser (http://<printer's ip>:4409/webcam/?action=stream) and it works

#

I've put /webcam/?action=stream in endpoint, ip adddress in IP address, selected mjpeg, but it shows broken image icon

#

also file-> remaining time

drifting ravine
#

Can you share the printer config in guppytunnel.json

drifting ravine
#

make sure you don’t share your ngrok tokens

peak igloo
#

for some reason the json has ONLY tokens, no printer config

#

I'll just nuke it and restart the service I guess

drifting ravine
#

I have some new changes committed but not release to better handle editing printer and camera and stuff

#

will release once I wrap up some other stuff

peak igloo
#
{"printers":[{"printer_name":"K1","moonraker_ip":"192.168.101.178","moonraker_port":7125,"cameras":[{"id":"camera-1405468725","path":"/webcam/?action=stream","camera_ip":"192.168.101.178","camera_port":4409,"type":"mjpeg-stream"}]}],"guppyflo_local_port":9873}```
#

and that url works

peak igloo
drifting ravine
#

hmm any backtrace in guppyflo.log? Do you see a message along the line of “Creating routes for camera”

peak igloo
#

2024/03/29 23:41:44 error coding pstats json: cannot unmarshal number into Go struct field .result.Status.print_stats.info.total_layer of type string keeps repeating

#

every 3 seconds

#

ok, that was browser's fault

#

Doesn't work in Edge, does in Safari

#

¯_(ツ)_/¯

drifting ravine
#

camera still not working?

peak igloo
#

It is working in safari but not edge on macOS

drifting ravine
#

cool I tested on chrome so that’s basically ms edge, will give edge a try later

drifting ravine
peak igloo
drifting ravine
#

I have no idea, guppy screen doesn’t install anything kamp related. Not sure what the conflict might be.

quiet belfry
drifting ravine
#

@peak igloo got something cool for you. Auto mjpeg streamer camera detection if you every need to setup more cameras in GuppyFLO

peak igloo
peak igloo
#

it's a shame no one is willing to work on the adjustments for the new revision of Creality K! camera

#

as for me I don't think I really need to use GuppyFLO - I already have a Tailscale tunnel connected to my home subnet (at the router level), and my phone already used VPN on demand when I disconnect from home Wi-Fi

#

I don't think GuppyFLO really offers anything I'm not getting with that, does it?

peak igloo
peak igloo
drifting ravine
drifting ravine
#

Maybe you can also explore other options outside of what GuppyFLO current offers. I know of cloudflared tunnel and tailscale funnels which are similar to ngrok. Cloudflared tunnel has OAuth before you need to setup a domain with them. Funnel doesn’t have built in auth so you’re relying on an obscured URL for access discovery.

There are ton actually, but my guess is anything that’s free and not p2p will not like you streaming video over their network.

peak igloo
#

I am using cloudflared for a few things, that might be a good idea. But I would need to up my authentication to expose it that way

#

I wanted to do it using obico tunnel (cause I'm already self hosting it), but the documentation for it (setting up the tunnel) is rather poor

#

and tailscale is fine, just hoped I could do it in a more seamless way.

drifting ravine
#

will take a look at what obico tunneling does

drifting ravine
#

So from my understanding of how self hosted obico works, you’ll still need to expose that server to the world. Obico does it for you in their hosted solution. But if you’re are self hosting you need to expose the self hosted obico-server (so you end up with the same situation of how you want to securely expose it)

#

To briefly summarize how obico works:

  1. you install the obico client for moonraker/octoprint and register your printer.
  2. This talks to the obico cloud, some auth exchanges and assigning a unique printer identifier
  3. This registration enables your printer to talk over websocket/http to the obico server (this connection is initialized from your printer to obico and kept alive)
  4. When you add your printer in obico apps, they can now tunnel data, printer <-> obico cloud <-> your clients
  5. If you replace obico cloud with self hosted obico server, you need to figure out how your client will talk to that self hosted server (back to tailscale, ngrok, cloudflared, open port and etc.)
peak igloo
#

I have been able to install the self hosted one, and access it both remotely and locally, but couldn't get the tunnel to work

#

for additional security I could try putting it behind cloudflared instead of Nginx Proxy Manager. But I need to figure out how to do NPM first

drifting ravine
# peak igloo I have been able to install the self hosted one, and access it both remotely and...

What do you mean it works locally and remotely if you can’t get the tunnel to work? If the tunnel doesn’t work then what works remotely and locally? Your auth is basic auth, your server is handling it, so any attempt to DOS or exploit, it will be handled by your server instead of a third party like in oauth before allow access. I’m not fond of exposing a self hosted server which handles its own authentication and is part of my local network.

peak igloo
#

I'm not fond of exposing it either. So once I get the basics working I'm planning on moving it to a cloudflare tunnel for some additional protection against attacks like DOS. I know it won't protect it from all exploits.

peak igloo
drifting ravine
#

why not just expose your reverse proxy that’s hosting your moonraker/mainsail through cloudflared then? Is obico mainly for ai detection in your use case?

peak igloo
#

I thought about exposing moonraker via NPM, but that's something that might be less secure than Obico itself?

#

I don't know how much is moonraker being tested against being exposed to the internet

#

that's a solution designed to be used in that way

#

if someone tries to abuse moonraker that's on my printer it may actually affect my prints (performance of k1 isn't greatest) whereas doing the same to the server where I have obico probably won't do much

drifting ravine
peak igloo
#

tailscale is probably the most secure option. Cloudflare tunnel is definitely more secure than just exposing a site via NPM with HTTPS, but doesn't avoid possible flaws in the service you're exposing. I feel like (and this might be unfounded) that obico is designed for this use case (being exposed to the web) and being patched with that in mind. I don't thing developers of moonraker put that much effort into supporting this use case. Yes, you can limit by addresses, use an API key (that shouldn't be able to be intercepted via HTTPS), but I think that's not the use case theyre actively taking interest in, if you know hwat I mean.

#

They have this feature, I'd like to try it out with mobileraker, so I don't have to rely on running tailscale all the time to access stuff remotely

peak igloo
#

Hey, since yesterday I've stared having problems with guppyscreen. It stopped refreshing/responding to touch. Restarting it sometimes helps.
This is what I'm seeing in the logs:

terminate called after throwing an instance of 'nlohmann::detail::type_error'
  what():  [json.exception.type_error.302] type must be string, but is null```
#

the only thing I remember doing since then is...adding filament to spoolman

#

I found that the filament I've added had no filament type (PLA, PETG, etc.) added could it be that?

peak igloo
#

It seems like that was the issue. That field is not mandatory in Spoolman, so I guess guppyscreen could do some validation? I’m not a developer, so can’t really help with it though:/

drifting ravine
#

Yeah I just committed a fix yesterday

#

Will make a release when ready

peak igloo
#

Thanks!

#

It’s not like I will hit it again, but hopefully someone else won’t:)

peak igloo
#

Hay, I'm getting klipper shutdown, when running Guppy shapers gcode macro:

{"code": "", "msg":"MCU 'mcu' shutdown: Move queue overflow", "values": []}
21:40
{"code":"key60", "msg":"Internal error on command:GUPPY_SHAPERS", "values": ["GUPPY_SHAPERS"]}
21:40
{"code":"key60", "msg":"Internal error on command:TEST_RESONANCES", "values": ["TEST_RESONANCES"]}
21:40
Klipper state: Shutdown
21:40
Testing frequency 58 Hz
21:40
Testing frequency 57 Hz
#

sometimes on the forst pass, sometimes on the second.

primal meadow
#

@peak igloo please fix your tags as the bot mentioned. this is a webcam related issue so please remove the wrong tags...

peak igloo
primal meadow
#

fixed it for you. its a bit tricky on mobile and i don't know if there are any differences between android and ios

quiet belfry
#

Mostly related to guppyflo

drifting ravine