알뜰살뜰 정보 61

유효전력, 무효전력, 피상전력 공식

1. 유효전력(W) 무효전력(VAR) 피상전력(VA) 공식 유효전력[Active Power] = 전압[Voltage] x 전류[Current] x 역률[Cosθ] 무효전력[Reactive Power] = 전압[Voltage] x 전류[Current] x 무효율[Sinθ] 피상전력[Apparent Power] = √ 유효전력[Active Power]^2+ 무효전력[Reactive Power]^2 삼상일 경우 유효전력 무효전력 피상전력에 x √3을 추가합니다. 2. 삼상유효전력(W) 무효전력(VAR) 피상전력(VA) 공식 유효전력[Active Power] = 전압[Voltage] x 전류[Current] x 역률[Cosθ] x √3 무효전력[Reactive Power] = 전압[Voltage] x 전류[Cu..

알뜰살뜰 정보 2021.01.29

files list file for package 'raspberrypi-kernel' is missing final newline 에러 발생 시

apt-get upgrade error 에러files list file for package 'raspberrypi-kernel' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2) dpkg: unrecoverable fatal error, aborting: files list file for package 'raspberrypi-kernel' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2) 해결방법sudo rm /var/lib/dpkg/info/raspberrypi-kernel* sudo rm /var/lib/dpk..

https request 통신

에러발생Got a response: Bad RequestThis combination of host and port requires TLS. const http = require('http') // http 모듈을 https 모듈로 바꿔줘야합니다. const https = require('https') 에러발생Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34) at TLSSocket.emit (events.js:198:13) at TLSSocket.EventEmitter.emit (domain.js:448:20) at TLSSocket._finishInit (_tls_wrap.js:636:8) 해결방법 fun..

WebIOPi not working index.html && WebIOPi 설치 방법

WebIOPi not working index.htmlyou should first patch file install done and install setup.sh file 패치파일을 실행 안시키고 설치 시 기본 index.html이 적용되지 않음 실패 시 화면 WebIOPi 설치 방법 1. WebIOPi 설치http://goo.gl/kV4pFy 클릭 후 WebIOPi-0.7.1.tar.gz 다운로드 합니다.그 후 압축을 풀어줍니다. 2. Patch File 설치sudo wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch 3. Patch File 적용WebIOPi 압축 푼 폴더에 Patch File을 넣..

Node-RED를 이용한 Mqtt(Mosquitto) 통신 예제

1. Mosquitto 설치 확인 mosquitto를 입력 후 tab을 눌러 아래의 사진과 같이 나오지 않는다면 설치를 먼저 진행하도록 합시다. 2. Mosquitto 통신 Send위에 해당 사항이 없다면 Mosquitto Broker를 실행시켜 줍니다. 그리고 또 다른 터미널 창을 열어 Mosquitto subscriber 를 실행시켜 줍니다. mqtt out 버튼을 가져와 서버와 토픽을 넣어줍시다. 그 후 버튼을 누르면 통신이 되고 있는 것을 확인 할 수 있습니다. 3. Mosquitto 통신 Recieve Mosquitto subscriber를 Node-RED로 구현해봅시다. mqtt in 버튼을 가져와 서버와 토픽을 넣어줍시다. 그 후 디버그 메시지를 열어서 버튼을 누르면 통신이 올라오는 것을 확..

Error: listen EADDRNOTAVAIL: address not available 뜨면서 Node-RED 시작 안될 때

Node-RED 팔레드 모듈 꼬였을 때 해결 방법 ModbusTcp 통신을 테스트하려고 server쪽을 만지고 Node-RED가 박살.... Error: listen EADDRNOTAVAIL: address not available 127.0.0.1:502 아래의 에러 뜨면서 Node-RED가 시작되지 않는 Not Started 현상이 발생했다. 14 Aug 09:18:55 - [info] Starting flows14 Aug 09:18:55 - [info] Started flows14 Aug 09:18:55 - [red] Uncaught Exception:14 Aug 09:18:55 - Error: listen EADDRNOTAVAIL: address not available 127.0.0.1:502 ..

Node-red와 mysql 연동 기본 예제

위의 사진은 응용 입니다.팔렛트에서 node-red-node-mysql 을 사용하였습니다. 쿼리문은 function 블럭에 삽입하여 사용합니다. Host에는 DB의 IP를 입력합니다. 1."Error: ER_NO_SUCH_TABLE: Table 'mysql.first_table' doesn't exist" 2."Error: ER_TABLEACCESS_DENIED_ERROR: INSERT command denied to user 'root'@'192.168.0.19' for table 'first_table'"host를 지정 안해준 문제 가능성이 큽니다. 해당 에러 발생 시 이곳 을 확인합시다. 혹은 계정 권한문제 입니다. 빨간 네모박스 친 부분이 N으로 등록되어 있을 가능성이 큽니다. 모두 Y로 바꿔주세..