WebIOPi 설치 > 라즈베리파이

본문 바로가기

회원로그인

회원가입

라즈베리파이

WebIOPi 설치

페이지 정보

profile_image
작성자 최고관리자
댓글 0건 조회 70회 작성일 20-10-12 10:10

본문

http://webiopi.trouch.com/INSTALL.html


https://github.com/doublebind/raspi



$ sudo raspi-config -> Interfacing Options -> Remote GPIO


$ wget http://sourceforge.net/projects/webiopi/files/WebIOPi-0.7.1.tar.gz
$ tar xvzf WebIOPi-0.7.1.tar.gz
$ cd WebIOPi-0.7.1


패치1

$ wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch
$ patch -p1 -i webiopi-pi2bplus.patch


$ cd python/native/gpio.c

#include <unistd.h> 추가


$ cpuinfo.c

fgets(buffer, sizeof(buffer) , fp)

위부분을 아래와 같이 수정

if ( fgets(buffer, sizeof(buffer) , fp) == NULL)
  return 0;
 



$ sudo ./setup.sh

$ reboot

$ /etc/init.d/webiopi start

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

시작과 실행

/etc/init.d/webiopi start

/etc/init.d/webiopi stop


디버그 모드 실행

$ sudo webiopi -c /etc/webiopi/config -d


부팅시 자동실행

sudo update -rc.d webiopi defaults

sudo update -rc.d webiopi remove


How to Start WebIOPi (서비스로 등록하기)

Follow the steps below if Raspbian is installed by NOOBS later than 1.4.2.

$ cd /etc/systemd/system/
$ sudo wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi.service
$ sudo systemctl start webiopi
$ sudo systemctl enable webiopi

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


$ netstat -na | more <- 포트확인


======================================================


브라우저 : http://IP:8000 접속하여 확인


webiopi / raspberry 로 로그인


설정파일 : /etc/webiopi/config

기본주소 : /usr/share/webiopi/htdocs/


자신의 파이썬 스크립트 작성시

/etc/webiopi/config : 스크립트 경로 지정

myscript = /home/pi/webiopi/myscript.py


접속암호변경하기

$ sudo webiopi-passwd




댓글목록

등록된 댓글이 없습니다.