상세 컨텐츠

본문 제목

Raspberry Pi 라즈베리파이 - Anet A8 연결 4부:Octoprint add on AstroPrint Plugin

embedded/3D Printer

by ZelKun 2018. 9. 14. 10:30

본문

반응형


출처: https://octoprint.org

 

*octoprint plugin 메뉴를 사용하면 정신건강에 좋습니다 급하시면 중간부터 보시길.

 

참고한 Youtube 동영상을 보면 스마트폰 어플리케이션인 AstroPrint Octoprint 제어함

그러니 plugin 설치해보기로함 (동영상에는 plugin메뉴로 설치하지만 github source 이용해보기로함..)

 


출처: https://www.astroprint.com

AstroPrint 공식 홈페이지: https://www.astroprint.com

 

출처: https://www.astroprint.com

 

근데 공식 홈에 들어가보니 전용 이미지(AstroPrint cloud) 제공함.. 뭐지.. 게다가 패키지 판매까지...

일단 octopi에다가 플러그인으로 설치하려고 한거니 octoprint plugin 참고하기로함...

 

문서에보면 plugin github에서 다운받아서 설치하는것으로 보임

pip install "https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip"

 

근데 octopi pip 명령이 없음...

그래서 개발환경 패키지를 깔아줌

sudo apt-get install python-pip python-dev python-setuptools python-virtualenv

pi@octopi:~ $ sudo apt-get install python-pip python-dev python-setuptools python-virtualenv libyaml-dev build-essential -y

[sudo] password for pi: 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

build-essential is already the newest version (12.3).

python-dev is already the newest version (2.7.13-2).

python-virtualenv is already the newest version (15.1.0+ds-1).

The following additional packages will be installed:

  gir1.2-glib-2.0 libgirepository-1.0-1 libpython-all-dev libyaml-0-2

  python-all python-all-dev python-cffi-backend python-crypto

  python-cryptography python-dbus python-enum34 python-gi python-idna

  python-ipaddress python-keyring python-keyrings.alt python-pyasn1

  python-secretstorage python-six python-wheel

Suggested packages:

  libyaml-doc python-crypto-dbg python-crypto-doc python-cryptography-doc

  python-cryptography-vectors python-dbus-dbg python-dbus-doc

  python-enum34-doc python-gi-cairo libkf5wallet-bin gir1.2-gnomekeyring-1.0

  python-fs python-gdata python-kde4 python-keyczar doc-base

  python-secretstorage-doc python-setuptools-doc

The following NEW packages will be installed:

  gir1.2-glib-2.0 libgirepository-1.0-1 libpython-all-dev libyaml-0-2

  libyaml-dev python-all python-all-dev python-cffi-backend python-crypto

  python-cryptography python-dbus python-enum34 python-gi python-idna

  python-ipaddress python-keyring python-keyrings.alt python-pip python-pyasn1

  python-secretstorage python-setuptools python-six python-wheel

0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.

Need to get 2,222 kB of archives.

After this operation, 8,611 kB of additional disk space will be used.

Get:1 http://archive.raspberrypi.org/debian stretch/main armhf python-pip all 9.0.1-2+rpt2 [179 kB]

Get:2 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf libgirepository-1.0-1 armhf 1.50.0-1 [76.4 kB]

Get:3 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf gir1.2-glib-2.0 armhf 1.50.0-1 [139 kB]

Get:4 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libpython-all-dev armhf 2.7.13-2 [958 B]

Get:5 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf libyaml-0-2 armhf 0.1.7-2 [39.9 kB]

Get:6 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf libyaml-dev armhf 0.1.7-2 [48.9 kB]

Get:7 http://raspbian.raspberrypi.org/raspbian stretch/main armhf python-all armhf 2.7.13-2 [940 B]

Get:8 http://raspbian.raspberrypi.org/raspbian stretch/main armhf python-all-dev armhf 2.7.13-2 [962 B]

Get:9 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-cffi-backend armhf 1.9.1-2 [60.7 kB]

Get:10 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-crypto armhf 2.6.1-7 [253 kB]

Get:11 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-enum34 all 1.1.6-1 [35.0 kB]

Get:12 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-idna all 2.2-1 [32.6 kB]

Get:13 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-ipaddress all 1.0.17-1 [18.1 kB]

Get:14 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-pyasn1 all 0.1.9-2 [51.8 kB]

Get:15 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-setuptools all 33.1.1-1 [297 kB]

Get:16 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-six all 1.10.0-3 [14.4 kB]

Get:17 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-cryptography armhf 1.7.1-3+b2 [174 kB]

Get:18 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-dbus armhf 1.2.4-1 [178 kB]

Get:19 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-gi armhf 3.22.0-2 [499 kB]

Get:20 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-secretstorage all 2.3.1-2 [13.8 kB]

Get:21 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-keyring all 10.1-1 [40.7 kB]

Get:22 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-keyrings.alt all 1.3-1 [16.4 kB]

Get:23 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf python-wheel all 0.29.0-2 [51.7 kB]

Fetched 2,222 kB in 17s (128 kB/s)                                             

Selecting previously unselected package libgirepository-1.0-1:armhf.

(Reading database ... 77544 files and directories currently installed.)

Preparing to unpack .../00-libgirepository-1.0-1_1.50.0-1_armhf.deb ...

Unpacking libgirepository-1.0-1:armhf (1.50.0-1) ...

Selecting previously unselected package gir1.2-glib-2.0:armhf.

Preparing to unpack .../01-gir1.2-glib-2.0_1.50.0-1_armhf.deb ...

Unpacking gir1.2-glib-2.0:armhf (1.50.0-1) ...

Selecting previously unselected package libpython-all-dev:armhf.

Preparing to unpack .../02-libpython-all-dev_2.7.13-2_armhf.deb ...

Unpacking libpython-all-dev:armhf (2.7.13-2) ...

Selecting previously unselected package libyaml-0-2:armhf.

Preparing to unpack .../03-libyaml-0-2_0.1.7-2_armhf.deb ...

Unpacking libyaml-0-2:armhf (0.1.7-2) ...

Selecting previously unselected package libyaml-dev:armhf.

Preparing to unpack .../04-libyaml-dev_0.1.7-2_armhf.deb ...

Unpacking libyaml-dev:armhf (0.1.7-2) ...

Selecting previously unselected package python-all.

Preparing to unpack .../05-python-all_2.7.13-2_armhf.deb ...

Unpacking python-all (2.7.13-2) ...

Selecting previously unselected package python-all-dev.

Preparing to unpack .../06-python-all-dev_2.7.13-2_armhf.deb ...

Unpacking python-all-dev (2.7.13-2) ...

Selecting previously unselected package python-cffi-backend.

Preparing to unpack .../07-python-cffi-backend_1.9.1-2_armhf.deb ...

Unpacking python-cffi-backend (1.9.1-2) ...

Selecting previously unselected package python-crypto.

Preparing to unpack .../08-python-crypto_2.6.1-7_armhf.deb ...

Unpacking python-crypto (2.6.1-7) ...

Selecting previously unselected package python-enum34.

Preparing to unpack .../09-python-enum34_1.1.6-1_all.deb ...

Unpacking python-enum34 (1.1.6-1) ...

Selecting previously unselected package python-idna.

Preparing to unpack .../10-python-idna_2.2-1_all.deb ...

Unpacking python-idna (2.2-1) ...

Selecting previously unselected package python-ipaddress.

Preparing to unpack .../11-python-ipaddress_1.0.17-1_all.deb ...

Unpacking python-ipaddress (1.0.17-1) ...

Selecting previously unselected package python-pyasn1.

Preparing to unpack .../12-python-pyasn1_0.1.9-2_all.deb ...

Unpacking python-pyasn1 (0.1.9-2) ...

Selecting previously unselected package python-setuptools.

Preparing to unpack .../13-python-setuptools_33.1.1-1_all.deb ...

Unpacking python-setuptools (33.1.1-1) ...

Selecting previously unselected package python-six.

Preparing to unpack .../14-python-six_1.10.0-3_all.deb ...

Unpacking python-six (1.10.0-3) ...

Selecting previously unselected package python-cryptography.

Preparing to unpack .../15-python-cryptography_1.7.1-3+b2_armhf.deb ...

Unpacking python-cryptography (1.7.1-3+b2) ...

Selecting previously unselected package python-dbus.

Preparing to unpack .../16-python-dbus_1.2.4-1_armhf.deb ...

Unpacking python-dbus (1.2.4-1) ...

Selecting previously unselected package python-gi.

Preparing to unpack .../17-python-gi_3.22.0-2_armhf.deb ...

Unpacking python-gi (3.22.0-2) ...

Selecting previously unselected package python-secretstorage.

Preparing to unpack .../18-python-secretstorage_2.3.1-2_all.deb ...

Unpacking python-secretstorage (2.3.1-2) ...

Selecting previously unselected package python-keyring.

Preparing to unpack .../19-python-keyring_10.1-1_all.deb ...

Unpacking python-keyring (10.1-1) ...

Selecting previously unselected package python-keyrings.alt.

Preparing to unpack .../20-python-keyrings.alt_1.3-1_all.deb ...

Unpacking python-keyrings.alt (1.3-1) ...

Selecting previously unselected package python-pip.

Preparing to unpack .../21-python-pip_9.0.1-2+rpt2_all.deb ...

Unpacking python-pip (9.0.1-2+rpt2) ...

Selecting previously unselected package python-wheel.

Preparing to unpack .../22-python-wheel_0.29.0-2_all.deb ...

Unpacking python-wheel (0.29.0-2) ...

Setting up python-idna (2.2-1) ...

Setting up python-setuptools (33.1.1-1) ...

Setting up python-crypto (2.6.1-7) ...

Setting up python-pyasn1 (0.1.9-2) ...

Setting up python-wheel (0.29.0-2) ...

Setting up libpython-all-dev:armhf (2.7.13-2) ...

Setting up libgirepository-1.0-1:armhf (1.50.0-1) ...

Setting up python-keyrings.alt (1.3-1) ...

Setting up python-cffi-backend (1.9.1-2) ...

Setting up libyaml-0-2:armhf (0.1.7-2) ...

Setting up python-six (1.10.0-3) ...

Setting up gir1.2-glib-2.0:armhf (1.50.0-1) ...

Processing triggers for libc-bin (2.24-11+deb9u3) ...

Setting up python-enum34 (1.1.6-1) ...

Processing triggers for man-db (2.7.6.1-2) ...

Setting up python-dbus (1.2.4-1) ...

Remove stale byte-compiled files...

Setting up python-ipaddress (1.0.17-1) ...

Setting up python-pip (9.0.1-2+rpt2) ...

Setting up python-all (2.7.13-2) ...

Setting up libyaml-dev:armhf (0.1.7-2) ...

Setting up python-gi (3.22.0-2) ...

Setting up python-all-dev (2.7.13-2) ...

Setting up python-cryptography (1.7.1-3+b2) ...

Setting up python-secretstorage (2.3.1-2) ...

Setting up python-keyring (10.1-1) ...

pi@octopi:~ $

 

Astroprint Plugin 설치를 진행

pip install "https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip"

pi@octopi:~ $ pip install "https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip"

Collecting https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

  Downloading https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

     / 450kB 680kB/s

    Complete output from command python setup.py egg_info:

    Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?

    

    ----------------------------------------

Command "python setup.py egg_info" failed with error code 255 in /tmp/pip-CpWtCj-build/

pi@octopi:~ $

근데 에러남...

에러를 찾아보니 해결법으로 setuptools 업글하라는 등의 문서를 찾아 해봄

pi@octopi:~ $ pip install --upgrade setuptools

Collecting setuptools

  Downloading https://files.pythonhosted.org/packages/66/e8/570bb5ca88a8bcd2a1db9c6246bb66615750663ffaaeada95b04ffe74e12/setuptools-40.2.0-py2.py3-none-any.whl (568kB)

    100% |████████████████████████████████| 573kB 421kB/s 

Installing collected packages: setuptools

Successfully installed setuptools-40.2.0

pi@octopi:~ $ pip install https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

Collecting https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

  Downloading https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

     - 501kB 759kB/s

    Complete output from command python setup.py egg_info:

    Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?

    

    ----------------------------------------

Command "python setup.py egg_info" failed with error code 255 in /tmp/pip-FqhTeT-build/

pi@octopi:~ $ pip install ez_setup

Collecting ez_setup

  Downloading https://files.pythonhosted.org/packages/ba/2c/743df41bd6b3298706dfe91b0c7ecdc47f2dc1a3104abeb6e9aa4a45fa5d/ez_setup-0.9.tar.gz

Building wheels for collected packages: ez-setup

  Running setup.py bdist_wheel for ez-setup ... done

  Stored in directory: /home/pi/.cache/pip/wheels/dc/e8/6b/3d5ff5a3efd7b5338d1e173ac981771e2628ceb2f7866d49ad

Successfully built ez-setup

Installing collected packages: ez-setup

Successfully installed ez-setup-0.9

pi@octopi:~ $ pip install unroll

Collecting unroll

  Downloading https://files.pythonhosted.org/packages/fe/3c/124bdf4276e582c8e4e23ce27c4462a259f6608df8e550d30f003f2b4189/unroll-0.1.0.tar.gz

    Complete output from command python setup.py egg_info:

    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/tmp/pip-build-J6BngG/unroll/setup.py", line 2, in <module>

        ez_setup.use_setuptools()

      File "/home/pi/.local/lib/python2.7/site-packages/ez_setup.py", line 145, in use_setuptools

        return _do_download(version, download_base, to_dir, download_delay)

      File "/home/pi/.local/lib/python2.7/site-packages/ez_setup.py", line 124, in _do_download

        to_dir, download_delay)

      File "/home/pi/.local/lib/python2.7/site-packages/ez_setup.py", line 193, in download_setuptools

        src = urlopen(url)

      File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen

        return opener.open(url, data, timeout)

      File "/usr/lib/python2.7/urllib2.py", line 435, in open

        response = meth(req, response)

      File "/usr/lib/python2.7/urllib2.py", line 548, in http_response

        'http', request, response, code, msg, hdrs)

      File "/usr/lib/python2.7/urllib2.py", line 473, in error

        return self._call_chain(*args)

      File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain

        result = func(*args)

      File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default

        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

    urllib2.HTTPError: HTTP Error 403: SSL is required

    

    ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-J6BngG/unroll/

pi@octopi:~ $ pi

pic              pinentry         ping             pip

pico             pinentry-curses  ping4            pip2

piconv           pinentry-gnome3  ping6            pivot_root

pidof            pinentry-x11     pinky            

pi@octopi:~ $ pip install https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

Collecting https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

  Downloading https://github.com/AstroPrint/OctoPrint-AstroPrint/archive/master.zip

     / 491kB 764kB/s

    Complete output from command python setup.py egg_info:

    Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?

    

    ----------------------------------------

Command "python setup.py egg_info" failed with error code 255 in /tmp/pip-1Sz8Ds-build/

pi@octopi:~ $ 

 

뭘해도 안됨.. 부들부들

 

octoprint 설정에 있는 plugin 사용해 보기로 ..

 

 


도구모양을 눌러서 설정페이지를 열고

 


Plugin Manager 항목을 클릭 하고

하단에 Get More 클릭 하면 Search항목이 활성화

 


Astroprint 검색 Install 클릭

 


만약 프린트중이라면 경고창이 뜨고 설치가 안됨...

 



설치 진행상황을 보여주고, Done! 으로 설치

octopi 재시작 메시지가 뜨니 재시작 해주면

프로그램을 재시작 하면 되는거지 pi reboot 필요는 없음

 


재시작 중에 새로고침하면, 명령어로 octoprint 시작하라는 페이지가 나오는데 좀더 기다리면

 


 

AstroPrint 탭이 추가됨

 


탭을 보니 Access Key 입력하라는데 AstroPrint 가입해서 받으면

 

here 클릭하고 https://cloud.astroprint.com/account/login 접속


출처: https://cloud.astroprint.com/

 

이미 가입해서 로그인

 


출처: https://cloud.astroprint.com/

사용자정보 하단에 Advanced Settings Access Key 복사

 


복사한 key 붙여넣고 파란색 Link AstroPrint Account 클릭

 


출처: https://cloud.astroprint.com/

오른쪽 yes, i authorize this request 클릭하면


AstroPrint Login 메시지가

 


AstroPrint 탭에가보면 계정에 있는 파일이 나옴


AstroPrint에서 camera 사용하려면 설정에있는 API 허용해야하는데 AstroPrint탭에서 하는게 편함

노란색박스에 Cross Origin Resource Access is disabled 라고 파란글씨로 나와있는데

클릭하면 설정창으로 이동함

Allow Cross Origin Resource Sharing(CORS) 옵션을 켜고 Save


관련 포스팅

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 1부:octoprint install on Raspbian (Connect Anet A8 and Pi3 with octoprint)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 2부: octoprint setting (Connect Anet A8 and Pi3 with octoprint)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 3부:Camera setting (Connect Anet A8 and Pi3 with octoprint)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 4부:Octoprint add on AstroPrint Plugin

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 5부: 3.5인치 터치스크린 사용하기 (use for 3.5 inch TFT Touch Screen to octopi)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 6부: octopi 기본포트 변경 change octopi octoprint default port 80 to 81

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 7부: 12v to 5v 레귤레이터 모듈로 pi 전원사용(Use Power Supply Module 12v to 5v Regulator for pi)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 8부: Octoprint 웹캠 유튜브 스트리밍 (how to use Youtube streaming on Octoprint Webcam)

[embedded/raspberrypi] - 034. Raspberry Pi 라즈베리 파이 - RASBIAN 3.5인치 터치스크린 사용하기 (raspbian 3.5 inch touch TFT LCD use)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결:octopi (octoprint img) install (Connect Anet A8 and Pi3 with octopi)

[embedded/3D Printer] - Anet A8 핫엔드 노즐청소 (filament remove and hot end nozzle clean)



 

참고:


반응형

관련글 더보기

댓글 영역