Giter Site home page Giter Site logo

matthewcroughan / octobalena Goto Github PK

View Code? Open in Web Editor NEW

This project forked from balena-io-experimental/balena-octoprint

49.0 7.0 23.0 152 KB

Control your 3d-printer with octoprint + octoscreen via balena!

License: GNU General Public License v2.0

Shell 80.16% Python 19.84%

octobalena's Introduction

Octobalena




Remotely control your 3d-printer with octoprint + octodash via balena.io !

octoprint can be exposed on port 80 which can be remotely accessible via balena.io public URL feature

By default, the device can be reached at octobalena.local if mDNS is working on your device.

Getting started

Via Balena Deploy

You can deploy this project to a new balenaCloud application in one click using the button below:

balena deploy button

Via Balena-Cli

  • Sign up on balena.io
  • go through the getting started guide and create a new application
  • clone this repository to your local workspace
  • Using Balena CLI, push the code with balena push <application-name>
  • See the magic happening, your device is getting updated 🌟Over-The-Air🌟!

Via Git

  • Sign up on balena.io
  • go through the getting started guide and create a new application
  • clone this repository to your local workspace
  • add the balena remote to your local workspace using the useful shortcut in the dashboard UI
  • git push balena master
  • see the magic happening, your device is getting updated Over-The-Air!

Configure via environment variables

Octoprint Service Variables

Variable Name Value Description Default
CAMERA_DEV STRING The camera device node /dev/video0
MJPEG_STREAMER_AUTOSTART BOOLEAN Start the camera automatically true
MJPEG_STREAMER_INPUT STRING Flags to pass to mjpg_streamer -y -n -r 640x480
MQTT_BROKER STRING Ip address of mqtt broker to use
MQTT_BROKER_PORT STRING Port the mqtt broker is running on
ESPURNA_RELAY_NAME STRING Relay name (hostname) used by espurna at the root of topic. E.G ESPURNA-123456, see documentation

Octodash Service Variables

Variable Name Value Description Default
OCTOPRINT_APIKEY STRING Needed for OctoDash to interact with Octoprint
PRINTER_NAME STRING Name of the printer, as shows up in the bottom left of OctoDash Octobalena

mdns-publisher Service Variables

Variable Name Value Description Default
OCTOPRINT_HOSTNAME STRING Adds CNAME for mDNS so device is reachable at string.local octobalena

Octoprint Version

v1.5.3

Plugin versions

Plugin Name Version
OctoPrint Preheat v0.6.0
OctoPrint-DisplayLayerProgress v1.25.4
OctoPrint-PSUControl v0.1.11
OctoPrint-MQTT v0.8.7
OctoPrint-FilamentManager v1.7.2
OctoPrint-PrintTimeGenius v2.2.7
OctoPrint-UltimakerFormatPackage v0.2.2
OctoPrint-BLTouch v0.3.4
OctoPrint-BedLevelVisualizer v1.0.0
Octolapse v0.4.1
OctoPrint-OctoVox v0.1.6
MarlinGcodeDocumentation v0.12.0
OctoPrint-FirmwareUpdater-1.11.0 v1.11.0

Attribution

Octoprint by Foosel

https://github.com/OctoPrint/OctoPrint

GNU Affero General Public License V3

OctoPrint provides a snappy web interface for controlling consumer 3D printers.

OctoDash by UnchartedBull

https://github.com/UnchartedBull/OctoDash

Apache 2.0

OctoDash is a User Interface for OctoPrint, it utilizes the OctoPrint API but tries to use modern design principles in order to fully enable the power of your Raspberry Pi attached to your 3D Printer. OctoDash works best with a Touchscreen and will support almost all functions that OctoPrint offers just in a nicer format. Give it a try!

Balena-io-playground

This project is in part based on excellent work done by the Balena.io team

https://github.com/balena-io-playground/balena-octoprint

octobalena's People

Contributors

ajlennon avatar andrewnhem avatar bucknalla avatar curcuz avatar matthewcroughan avatar sameureka avatar shawaj avatar thzinc avatar tmigone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

octobalena's Issues

Memory footprint is high

Given the memory use it could be why it seems to run slow quite a lot.

During container download

image

During runtime, idling

image

Figure out a way to communicate OCTOPRINT_APIKEY securely and automatically

The setup process could be made automatic if I could securely negotiate the octoprint apikey between the Octodash and Octoprint container, to set the environment variable. Whatever method I end up coming up with could be used for all sorts of other things in the future. One idea I have is sending it via gpg.

Connecting RPi Cam Module

Hi, thanks for your great work on this project. I set it up a couple of days ago and have tested it out with my first few prints.

I'm now trying to connect the camera module, but I can't seem to get it working. I have connected it to my pi and changed the fleet settings as documented here: https://www.balena.io/docs/learn/develop/hardware/i2c-and-spi/#raspberry-pi-camera-module

But I still cannot get it to show up. I can't work out how to check if the Host OS is "seeing" the camera.

Are there any other settings involved in getting the camera to work?

As this isn't discussed in the README I thought it may be worthwhile to ask the question here so other people can see it if they have the same issue.

Thanks,
Gregor

Octoprint volumes are problematic

I can't fully articulate the issue at hand right now, but I'm making a note of it for when I get around to it. Simply put, the fact that Octoprint has a volume that links to /data is problematic, since the included plugins are also in this directory, which means that the state of these plugins and absolutely everything else cannot be modified by updating the Dockerfile. I should fix this.

RPI4 octodash Failed to connect to the bus

Hey everybody, unfortunately, I'm not able to get octodash running...
I'm using a 3,5 touch screen with a RPI 4.

octodash [83:0424/170030.645110:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

Already changed the docker to get the dbus recognized

octodash:
    restart: always
    build: ./octodash
    privileged: true
    environment:
     - UDEV=1
     - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
    depends_on:
     - octoprint
    labels:
      io.balena.features.dbus: '1'

Anybody else has expierenced this issue and any suggestion for an solution?

Thank you in advance!

Multiple printers

Thanks for sharing this project. Is there a way to make it work with multiple printers? I managed it to do it on a regular system with modifications to udev rules to makes sure that each octoprint instance connects to the right printer but trying to make it with balena for easier management.
Thanks for suggestions.

Build Error: Unable to locate package libraspberrypi-bin

I'm trying to deploy this on a Raspberry Pi 4b and I get the following build error when deploying via Balena

[octoprint]       Step 2/20 : RUN apt-get update && install_packages libavahi-compat-libdnssd1                                        zlib1g-dev libjpeg-dev                                        python3-dev                                        python3-wheel                                         python3-pip                                        python3-setuptools                                        fontconfig                                        libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libswresample-dev                                        libsrtp2-dev libsrtp2-1 libopus-dev libvpx-dev                                        ffmpeg                                        pkg-config                                        python-dev python3-dev                                        gcc g++ wget dosfstools                                        imagemagick libv4l-dev                                        git make cmake                                        haproxy dbus                                        libatlas-base-dev                                        avrdude                                        libssl-dev libffi-dev                                        libraspberrypi-bin                                        curl jq psmisc
[octoprint]        ---> Running in 2601166a6f4c
[octoprint]       Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): 
[octoprint]       Architecture: ARM v8 
[octoprint]       OS: Debian Buster 
[octoprint]       Variant: run variant 
[octoprint]       Default variable(s): UDEV=off 
[octoprint]       Extra features: 
[octoprint]       - Easy way to install packages with `install_packages <package-name>` command 
[octoprint]       - Run anywhere with cross-build feature  (for ARM only) 
[octoprint]       - Keep the container idling with `balena-idle` command 
[octoprint]       - Show base image details with `balena-info` command
[octoprint]       Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
[octoprint]       Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
[octoprint]       Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
[octoprint]       Get:4 http://security.debian.org/debian-security buster/updates/main arm64 Packages [297 kB]
[octoprint]       Get:5 http://deb.debian.org/debian buster/main arm64 Packages [7735 kB]
[octoprint]       Get:6 http://deb.debian.org/debian buster-updates/main arm64 Packages [14.5 kB]
[octoprint]       Fetched 8287 kB in 2s (4447 kB/s)
[octoprint]       Reading package lists...
[octoprint]       Reading package lists...
[octoprint]       Building dependency tree...
[octoprint]       Reading state information...
[octoprint]       E: Unable to locate package libraspberrypi-bin
[octoprint]       
[octoprint]       apt failed, retrying
[octoprint]       Reading package lists...
[octoprint]       E: Unable to locate package libraspberrypi-bin
[octoprint]       
[octoprint]       Building dependency tree...
[octoprint]       Reading state information...
[octoprint]       apt failed, retrying
[octoprint]       Reading package lists...
[octoprint]       Building dependency tree...
[octoprint]       Reading state information...
[octoprint]       E: Unable to locate package libraspberrypi-bin
[octoprint]       
[octoprint]       Removing intermediate container 2601166a6f4c
[octoprint]       The command '/bin/sh -c apt-get update && install_packages libavahi-compat-libdnssd1                                        zlib1g-dev libjpeg-dev                                        python3-dev                                        python3-wheel                                         python3-pip                                        python3-setuptools                                        fontconfig                                        libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libswresample-dev                                        libsrtp2-dev libsrtp2-1 libopus-dev libvpx-dev                                        ffmpeg                                        pkg-config                                        python-dev python3-dev                                        gcc g++ wget dosfstools                                        imagemagick libv4l-dev                                        git make cmake                                        haproxy dbus                                        libatlas-base-dev                                        avrdude                                        libssl-dev libffi-dev                                        libraspberrypi-bin                                        curl jq psmisc' returned a non-zero code: 100

Container footprint is quite large

There seem to be a lot of dependencies installed, particularly for OctoDash.

Container size is pretty large as a result

[Info]            β”‚ Service        β”‚ Image Size β”‚ Delta Size β”‚ Build Time            β”‚
[Info]            β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
[Info]            β”‚ octoprint      β”‚ 524.69 MB  β”‚ 54.13 MB   β”‚ 5 minutes, 54 seconds β”‚
[Info]            β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
[Info]            β”‚ octodash       β”‚ 763.66 MB  β”‚ 2.06 MB    β”‚ 2 minutes, 42 seconds β”‚
[Info]            β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
[Info]            β”‚ traefik        β”‚ 62.16 MB   β”‚ 0 bytes    β”‚ 2 seconds             β”‚
[Info]            β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
[Info]            β”‚ mdns-publisher β”‚ 103.76 MB  β”‚ 430.82 KB  β”‚ 1 minute, 3 seconds   β”‚
[Info]            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

We should be able to reduce this I would think. In particular OctoDash

Octoscreen is buggy, moving to Octodash

I see that the project has a few stars right now, it must be stressed that the graphical component of this project is in no way ready for usage and there are plenty of bugs that I'm personally aware of that I can't document entirely. So, I'm moving to https://github.com/UnchartedBull/OctoDash

Anyone who has experience with NPM and NodeJS generally would able to help, as I am poorly managing to package it, I am probably doing it inefficiently.

https://github.com/balena-io/resin-electronjs I am using this as a reference. I'll submit the results of what I get working tonight to Master.

Build Error

Getting the following build error using the balena deploy:

ERROR: The command '/bin/sh -c pip3 install aiohttp aiortc numpy opencv-python' returned a non-zero code: 1

The build fails due to this error.

Regards,
Gregor

Vanilla install fails on balenaFin

I deployed this application to a balenaFin, and the app crashlooped with the following error:

30.01.21 17:04:21 (+0000)  octoprint  standard_init_linux.go:211: exec user process caused "no such file or directory"
30.01.21 17:05:26 (+0000)  octoprint  standard_init_linux.go:211: exec user process caused "no such file or directory"
30.01.21 17:05:29 (+0000) Service exited 'octoprint sha256:a2b62865f85fcfaf8cac7f39286947a727a60cf2abe9bf14de9546b96038c2d7'
30.01.21 17:06:30 (+0000) Restarting service 'octoprint sha256:a2b62865f85fcfaf8cac7f39286947a727a60cf2abe9bf14de9546b96038c2d7'
30.01.21 17:05:26 (+0000)  octoprint  standard_init_linux.go:211: exec user process caused "no such file or directory"
30.01.21 17:06:30 (+0000)  octoprint  standard_init_linux.go:211: exec user process caused "no such file or directory"

This was on balenaOS 2.58.3+rev1 with supervisor version 11.14.0

Need to move to Python3

Python2 is deprecated. OctoPrint supports both 3 and 2 (apparently) although I had trouble with the build for Python3

Octoprint ver is 1.4 and (web) upgrade to 1.4.2 fails

Guess stuff are missing, errors from plugin_softwareupdate_console.log follow bellow.

2020-09-30 09:31:06,609 ! psutil/_psutil_posix.c:29:14: fatal error: linux/types.h: No such file or directory
2020-09-30 09:31:06,609 ! #include <linux/types.h>
2020-09-30 09:31:06,610 ! ^~~~~~~~~~~~~~~
2020-09-30 09:31:06,610 ! compilation terminated.
2020-09-30 09:31:06,611 ! error: command 'gcc' failed with exit status 1

2020-09-30 09:31:06,584 ! ERROR: Command errored out with exit status 1:
2020-09-30 09:31:06,585 ! command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qw0oIM/psutil/setup.py'"'"'; file='"'"'/tmp/pip-install-qw0oIM/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-AW_xUd
2020-09-30 09:31:06,586 ! cwd: /tmp/pip-install-qw0oIM/psutil/
2020-09-30 09:31:06,587 ! Complete output (50 lines):
2020-09-30 09:31:06,588 ! /tmp/tmp6EJBar.c:1:10: fatal error: linux/ethtool.h: No such file or directory

Can't finish initial setup - Error 500

When I finish last initial setup step and I click Finish, nothing append in the UI. Using FF dev tools I see an error 500 on /api/settings [POST]. In Balena logs there is a python stacktrace :

15.01.21 15:15:55 (+0100) octoprint File "/usr/local/lib/python3.7/dist-packages/octoprint/server/api/settings.py", line 936, in _saveSettings 15.01.21 15:15:55 (+0100) octoprint "gcode", name, script.replace("\r\n", "\n").replace("\r", "\n") 15.01.21 15:15:55 (+0100) octoprint AttributeError: 'NoneType' object has no attribute 'replace' 15.01.21 15:15:55 (+0100) octoprint 2021-01-15 14:15:55,422 - tornado.access - ERROR - 500 POST /api/settings (::ffff:192.168.1.106) 24.98ms

I'm running octoprint with balenaOS 2.58.3+rev1 on a raspberry 3 B+.

DoES Public IP

Good morning!

Let me know when you get in to DoES.

Can we try out the remote webcam?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.