• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Image 1
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Image 2
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Image 3
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Image 4
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Thumbnail 1
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Thumbnail 2
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Thumbnail 3
TP-Link Tapo C100 / C110 Base & Wallmount 3D Printer File Thumbnail 4

TP-Link Tapo C100 / C110 Base & Wallmount

MrNeedlemouse avatarMrNeedlemouse

September 8, 2023

printables-icon
DescriptionCommentsTags

Description

As I wanted the base in a different color than white, I made this from the original model. This model use the same distance for the screw holes as the TP-Link original mount. I made 2 versions with different tolerances, as the original model was not tight enough to hold the camera in place.

I use this as a camera for PrusaConnect, following this guide: https://gist.github.com/nunofgs/84861ee453254823be6b069ebbce9ad2

 

It requires a Linux based computer of some sort to capture and upload images using ffmpeg and curl. I used my Raspberry Pi running Home-Assistant Core. I did not use Docker, but set up the bash script to run as a service instead.

 

Adjust the paths, filenames, camera IP, camera credentials, token and fingerprint to your needs.

/lib/systemd/system/mk4-camera.service

[Unit]
Description=Prusa-Connect MK4 Camera feed

[Service]
ExecStart=/home/pi/mk4-camera/upload.sh
StandardOutput=null

[Install]
WantedBy=multi-user.target

 

/home/pi/mk4-camera/upload.sh

#!/bin/bash

# Set default values for environment variables
: "${HTTP_URL:=https://webcam.connect.prusa3d.com/c/snapshot}"
: "${DELAY_SECONDS:=10}"
: "${LONG_DELAY_SECONDS:=60}"
: "${RTSP_URL:=rtsp://username:password@cameraip:554/stream1}"
: "${FINGERPRINT:=yourfingerprint}"
: "${TOKEN:=yourtoken}"

while true; do
    # Grab a frame from the RTSP stream using FFmpeg (timeout at 5s)
    ffmpeg \
        -stats \
        -y \
        -rtsp_transport tcp \
        -i "$RTSP_URL" \
        -vframes 1 \
        output.jpg

    # If no error, upload it.
    if [ $? -eq 0 ]; then
        # POST the image to the HTTP URL using curl
        curl -X PUT "$HTTP_URL" \
            -H "accept: */*" \
            -H "content-type: image/jpg" \
            -H "fingerprint: $FINGERPRINT" \
            -H "token: $TOKEN" \
            --data-binary "@output.jpg" \
            --no-progress-meter \
            --compressed

        # Reset delay to the normal value
        DELAY=$DELAY_SECONDS
    else
        echo "FFmpeg returned an error. Retrying after ${LONG_DELAY_SECONDS}s..."

        # Set delay to the longer value
        DELAY=$LONG_DELAY_SECONDS
    fi

    sleep "$DELAY"
done

 

Enable service:

pi@hass-pi:~/mk4-camera $ sudo systemctl enable mk4-camera.service
Created symlink /etc/systemd/system/multi-user.target.wants/mk4-camera.service → /lib/systemd/system/mk4-camera.service.
pi@hass-pi:~/mk4-camera $ sudo systemctl start mk4-camera.service
pi@hass-pi:~/mk4-camera $ sudo systemctl status mk4-camera.service
● mk4-camera.service - Prusa-Connect MK4 Camera feed
     Loaded: loaded (/lib/systemd/system/mk4-camera.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-09-03 01:50:46 CEST; 5s ago
   Main PID: 3926795 (upload.sh)
      Tasks: 2 (limit: 4163)
        CPU: 913ms
     CGroup: /system.slice/mk4-camera.service
             ├─3926795 /bin/bash /home/pi/mk4-camera/upload.sh
             └─3926808 sleep 10

 

In my case, printed in 0.2 Prusament PLA Galaxy Black, 4 perimeters, 15% infill.

License:

Creative Commons — Attribution — Noncommercial

Related Models

Thor Mjolnir Hammer Bic Pen preview image

Thor Mjolnir Hammer Bic Pen

effektz profile image

effektz

9,086

Diverse Schilder / various labels  for hobby & makers preview image

Diverse Schilder / various labels for hobby & makers

RPK profile image

RPK

2

Customizable EU License Plate Keychain preview image

Customizable EU License Plate Keychain

John_M profile image

John_M

36

Vorpal The Hexapod Walking Robot preview image

Vorpal The Hexapod Walking Robot

vorpal profile image

vorpal

4,984

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi preview image

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi

Fails&Makes profile image

Fails&Makes

Cacciavite Portachiavi - Scewdriver keychain preview image

Cacciavite Portachiavi - Scewdriver keychain

Butti Maker Studio profile image

Butti Maker Studio

22

Snap-Together Mini Minecraft Jack-O-Lantern with integrated LED preview image

Snap-Together Mini Minecraft Jack-O-Lantern with integrated LED

scottrlindsey profile image

scottrlindsey

4,449

Small Parts Storage Drawers - Organizer preview image

Small Parts Storage Drawers - Organizer

GT 3D Makers profile image

GT 3D Makers

29

9