Ultimaker Buildplate Camera: verschil tussen versies

Uit MakerSpace Leiden
Ga naar: navigatie, zoeken
(Use)
(Setup)
Regel 9: Regel 9:
 
= Setup =
 
= Setup =
  
The ultimaker buildplate camera relies on a SSH tunnel provided by the [[MTA-Setup_kWh]]. There is an extra tunnel tot port 8080 on the (statich-sh) IP address of the printer; and a 'permit' line for this has been added to the .ssh/authorized keys file on the space-side.
+
The ultimaker buildplate camera relies on a SSH tunnel provided by the [[MTA-Setup_kWh]].  
  
This is then reverse proxied by the ultimaker module in https://github.com/MakerSpaceLeiden/makerspaceleiden-crm; with the updating done by a few lines of javascript.
+
There is an extra tunnel tot port 8080 on the (statich-sh) IP address of the printer; and a 'permit' line for this has been added to the .ssh/authorized keys file on the space-side.
  
The key config is in views.py:
+
At this port on the Ultimaker; there is a webcam module that accepts two rest calls (AFAIK): '''?action=stream''' en '''?action=snapshot'''. We take the latter to not overload things (and not having to deal with async streaming, etc).
 +
 
 +
The connection is then reverse proxied by the ultimaker module in our CRM https://github.com/MakerSpaceLeiden/makerspaceleiden-crm. The key config is in views.py:
  
 
     def snapshot(request):
 
     def snapshot(request):
 
       img = requests.get("http://127.0.0.1:9998/?action=snapshot").content
 
       img = requests.get("http://127.0.0.1:9998/?action=snapshot").content
 
       return HttpResponse(img, content_type="image/jpeg")
 
       return HttpResponse(img, content_type="image/jpeg")
 +
 +
With the updating done by a few lines of javascript - see https://github.com/MakerSpaceLeiden/makerspaceleiden-crm -> '''ultimaker/templates''' and then index.html

Versie van 18 jan 2022 om 12:05

Use

Login to the CRM (https://makerspaceleiden.nl/crm) and select the 3rd menu option.

Buildplate1.png

Buildplate2.png

Setup

The ultimaker buildplate camera relies on a SSH tunnel provided by the MTA-Setup_kWh.

There is an extra tunnel tot port 8080 on the (statich-sh) IP address of the printer; and a 'permit' line for this has been added to the .ssh/authorized keys file on the space-side.

At this port on the Ultimaker; there is a webcam module that accepts two rest calls (AFAIK): ?action=stream en ?action=snapshot. We take the latter to not overload things (and not having to deal with async streaming, etc).

The connection is then reverse proxied by the ultimaker module in our CRM https://github.com/MakerSpaceLeiden/makerspaceleiden-crm. The key config is in views.py:

   def snapshot(request):
      img = requests.get("http://127.0.0.1:9998/?action=snapshot").content
      return HttpResponse(img, content_type="image/jpeg")

With the updating done by a few lines of javascript - see https://github.com/MakerSpaceLeiden/makerspaceleiden-crm -> ultimaker/templates and then index.html