lagunacomputer / homebridge-MotionSensor

HomeBridge HomeKit Plugin for arduino based PIR motion sensors
23 stars 14 forks source link

Value not detected from homebridge #7

Closed sorriso93 closed 6 years ago

sorriso93 commented 6 years ago

Hello I don't understand why homebridge doesn't detect the pir status... Below homebridge log:


[4/1/2018, 9:14:22 PM] [PIRBALC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:26 PM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16", method GET, timeout 3000 [4/1/2018, 9:14:26 PM] [PIRTERRCAM] HTTP bad response (http://192.168.0.16): read ECONNRESET [4/1/2018, 9:14:26 PM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15", method GET, timeout 3000 [4/1/2018, 9:14:26 PM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:26 PM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:26 PM] [PIRBALC] Requesting motion on "http://192.168.0.17", method GET, timeout 3000 [4/1/2018, 9:14:26 PM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:26 PM] [PIRBALC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:30 PM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16", method GET, timeout 3000 [4/1/2018, 9:14:30 PM] [PIRTERRCAM] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:30 PM] [PIRTERRCAM] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:30 PM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15", method GET, timeout 3000 [4/1/2018, 9:14:30 PM] [PIRBALC] Requesting motion on "http://192.168.0.17", method GET, timeout 3000 [4/1/2018, 9:14:30 PM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:30 PM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:30 PM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:30 PM] [PIRBALC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:34 PM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16", method GET, timeout 3000 [4/1/2018, 9:14:34 PM] [PIRTERRCAM] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:34 PM] [PIRTERRCAM] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:34 PM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15", method GET, timeout 3000 [4/1/2018, 9:14:34 PM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:34 PM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:34 PM] [PIRBALC] Requesting motion on "http://192.168.0.17", method GET, timeout 3000 [4/1/2018, 9:14:34 PM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:34 PM] [PIRBALC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:38 PM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16", method GET, timeout 3000 [4/1/2018, 9:14:38 PM] [PIRTERRCAM] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:38 PM] [PIRTERRCAM] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:38 PM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15", method GET, timeout 3000 [4/1/2018, 9:14:38 PM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/1/2018, 9:14:38 PM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/1/2018, 9:14:38 PM] [PIRBALC] Requesting motion on "http://192.168.0.17", method GET, timeout 3000 [4/1/2018, 9:14:38 PM] [PIRBALC] HTTP bad response (http://192.168.0.17): read ECONNRESET

below config json:


{ "accessory": "Motion", "name": "PIRTERRCAM", "url": "http://192.168.0.16", "http_method": "GET", "update_interval": 4000 }, { "accessory": "Motion", "name": "PIRTERRCUC", "url": "http://192.168.0.15", "http_method": "GET", "update_interval": 4000 }, { "accessory": "Motion", "name": "PIRBALC", "url": "http://192.168.0.17", "http_method": "GET", "update_interval": 4000 }

lagunacomputer commented 6 years ago

check out line 17 and line 22 https://github.com/lagunacomputer/homebridge-MotionSensor/blob/master/sample-config.json

check out line 40 https://github.com/lagunacomputer/homebridge-MotionSensor/commit/2c43c4c267a367e70072d80f0773791bacc2d5c8

sorriso93 commented 6 years ago

Hello, I tried both configuration you pointed me to in the config.json with no succes...

config.json

{ "accessory": "Motion", "name": "PIRTERRCAM", "url": "http://192.168.0.16/motionEndpoint", "http_method": "GET", "update_interval": 4000 }, { "accessory": "Motion", "name": "PIRTERRCUC", "url": "http://192.168.0.15/motionEndpoint?json=true", "http_method": "GET", "json_response": "value", "update_interval": 4000 }, { "accessory": "Motion", "name": "PIRBALC", "url": "http://192.168.0.17/motionEndpoint?json=true", "http_method": "GET", "json_response": "value", "update_interval": 4000 }


log

[4/2/2018, 10:04:27 AM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:27 AM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:27 AM] [PIRBALC] Requesting motion on "http://192.168.0.17/motionEndpoint?json=true", method GET, timeout3000 [4/2/2018, 10:04:27 AM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:27 AM] [PIRBALC] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:31 AM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16/motionEndpoint", method GET, timeout 3000 [4/2/2018, 10:04:31 AM] [PIRTERRCAM] HTTP bad response (http://192.168.0.16/motionEndpoint): read ECONNRESET [4/2/2018, 10:04:31 AM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15/motionEndpoint?json=true", method GET, timeout 3000 [4/2/2018, 10:04:31 AM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:31 AM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:31 AM] [PIRBALC] Requesting motion on "http://192.168.0.17/motionEndpoint?json=true", method GET, timeout3000 [4/2/2018, 10:04:31 AM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:31 AM] [PIRBALC] Received value is not valid. Keeping last_state: "false" root : TTY=pts/0 ; PWD=/var/homebridge ; USER=root ; COMMAND=/bin/journalctl -o cat -n 500 -f -u homebridge pam_unix(sudo:session): session opened for user root by (uid=0) [4/2/2018, 10:04:35 AM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16/motionEndpoint", method GET, timeout 3000 [4/2/2018, 10:04:35 AM] [PIRTERRCAM] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:35 AM] [PIRTERRCAM] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:35 AM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15/motionEndpoint?json=true", method GET, timeout 3000 [4/2/2018, 10:04:35 AM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:35 AM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:35 AM] [PIRBALC] Requesting motion on "http://192.168.0.17/motionEndpoint?json=true", method GET, timeout3000 [4/2/2018, 10:04:35 AM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:35 AM] [PIRBALC] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:39 AM] [PIRTERRCAM] Requesting motion on "http://192.168.0.16/motionEndpoint", method GET, timeout 3000 [4/2/2018, 10:04:39 AM] [PIRTERRCAM] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:39 AM] [PIRTERRCAM] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:39 AM] [PIRTERRCUC] Requesting motion on "http://192.168.0.15/motionEndpoint?json=true", method GET, timeout 3000 [4/2/2018, 10:04:39 AM] [PIRTERRCUC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:39 AM] [PIRTERRCUC] Received value is not valid. Keeping last_state: "false" [4/2/2018, 10:04:39 AM] [PIRBALC] Requesting motion on "http://192.168.0.17/motionEndpoint?json=true", method GET, timeout3000 [4/2/2018, 10:04:39 AM] [PIRBALC] HTTP successful response: {"pirval":0}

[4/2/2018, 10:04:39 AM] [PIRBALC] Received value is not valid. Keeping last_state: "false"

lagunacomputer commented 6 years ago

go back to the original november code, index.js and config.json (readme.md) https://github.com/lagunacomputer/homebridge-MotionSensor/commits/master