rcoodey / Pilarm

Integrate existing door or window contact sensors with SmartThings using a Raspberry Pi or C.H.I.P.
Apache License 2.0
7 stars 5 forks source link

Incorrect state showing in SmartThings #4

Closed the-sambot closed 7 years ago

the-sambot commented 7 years ago

I decided to split a zone I had with two contacts into two different zones. GPIO readall is showing the two zones as closed. When I test the actual zones in SmartThings, the preexisting zone shows correctly and opens/closes with the door. The new zone, however, is showing an active/open state, even though the GPIO readall is showing a 0 state. I've tried pin 37 (GPIO 26) and pin 36 (GPO 16). Pin is added to rc.local and to .conf file.

rcoodey commented 7 years ago

Did you make another device entry for it in graph.api.smartthings.com with the correct name (PilarmZone37)?

the-sambot commented 7 years ago

I did. Currently PilarmZone 16. Tonight I'll swap the contacts for that zone with another one to see if the problem stays or moves.

On Feb 26, 2017 11:05 PM, "rcoodey" notifications@github.com wrote:

Did you make another device entry for it in graph.api.smartthings.com with the correct name (PilarmZone37)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rcoodey/Pilarm/issues/4#issuecomment-282623342, or mute the thread https://github.com/notifications/unsubscribe-auth/AWXnDwScrWzqKE9NyJglyHGmeFmrghCOks5rgktxgaJpZM4MMk7F .

the-sambot commented 7 years ago

Okay. PilarmServer.py is working fine when I run it manually. However, it is no longer communicating any states to SmartThings. I formatted my Raspberry Pi and reconfigured it (I had tried Domoticz and HomeAssistant prior to Pilarm), and redid my circuit. I double checked all circuit connections.

I kept all of the information I had gathered from before (application id, access code, etc.) but to rule out that something had changed. I went through that entire process again with the same results. I had also kept my PilarmServer.py and PilarmServer.conf, so I verified that those changes came over (specified shard). Reboot. Still nothing communicating to SmartThings.

When looking at Live Logging in SmartThings, there is nothing coming in from Pilarm. I just rebooted and am watching PilarmServer on the pi; getting All zones event about every 30 seconds. An occasional Zone 22 closed, Zone 4 closed. When I open or close contacts, PilarmServer.py is showing event correctly.

Last night I was getting the following errors in the log: 02-28-17 20:56:30 ERROR Error in alarm loop: [Errno 5] Input/output error Traceback (most recent call last): File "./Pilarm/PilarmServer.py", line 114, in print("All zones event") OSError: [Errno 5] Input/output error

Since reboot and running again, no errors. Just: 03-01-17 09:30:01 INFO Initializing Pilarm 03-01-17 09:30:01 INFO Beginning Pilarm loop 03-01-17 09:31:38 INFO Zone 22 closed 03-01-17 09:31:38 INFO Zone 22 closed 03-01-17 09:32:23 INFO Zone 4 closed 03-01-17 09:36:56 INFO Zone 4 closed

No events in my SmartThings Device Event list for PilarmZone4 or PilarmZone22.

Also, I did just update the server and conf, since I saw it was updated to include the shard information. No change.

the-sambot commented 7 years ago

Well, I don't know what I did but now it's all of a sudden working.

d990e992-5901-41e6-8323-27bf659bd554 10:13:04 AM: debug All zones event: [4:0, 22:0, 23:0, 18:0, 24:0, 25:0, 16:0, 27:1]