Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

v0.2.0 crash with contact #3

Closed
Yves911 opened this issue Nov 8, 2015 · 5 comments
Closed

v0.2.0 crash with contact #3

Yves911 opened this issue Nov 8, 2015 · 5 comments

Comments

@Yves911
Copy link

Yves911 commented Nov 8, 2015

v0.2.0 issue with contact.
When a contact is triggered pimatic crash with the following error message.

08:29:08.759 [pimatic-hap] debug: contact sensor state changed. Notifying iOS devices.
08:29:09.422 [pimatic] error: A uncaught exception occured: ReferenceError: getHomekitState is not defined
08:29:09.422 [pimatic] error:>    at HomeduinoRFContactSensor.<anonymous> (/root/pimatic-git/node_modules/pimatic-hap/hap.coffee:264:65)
08:29:09.422 [pimatic] error:>    at HomeduinoRFContactSensor.EventEmitter.emit (events.js:117:20)
08:29:09.422 [pimatic] error:>    at HomeduinoRFContactSensor.ContactSensor._setContact (/root/pimatic-git/node_modules/pimatic/lib/devices.coffee:428:8)
08:29:09.422 [pimatic] error:>    at Board.<anonymous> (/root/pimatic-git/node_modules/pimatic-homeduino/homeduino.coffee:520:14)
08:29:09.422 [pimatic] error:>    at Board.EventEmitter.emit (events.js:117:20)
08:29:09.422 [pimatic] error:>    at Board._emitReceive (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:352:12)
08:29:09.422 [pimatic] error:>    at Board._handleRFControl (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:337:10)
08:29:09.422 [pimatic] error:>    at Board._onLine (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:142:21)
08:29:09.422 [pimatic] error:>    at SerialPortDriver.<anonymous> (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/board.js:83:22)
08:29:09.422 [pimatic] error:>    at SerialPortDriver.EventEmitter.emit (events.js:95:17)
08:29:09.422 [pimatic] error:>    at SerialPort.<anonymous> (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/lib/driver/serialport.js:60:24)
08:29:09.422 [pimatic] error:>    at SerialPort.EventEmitter.emit (events.js:95:17)
08:29:09.422 [pimatic] error:>    at /root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/parsers.js:25:17
08:29:09.422 [pimatic] error:>    at Array.forEach (native)
08:29:09.422 [pimatic] error:>    at Object.parser (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/parsers.js:24:13)
08:29:09.422 [pimatic] error:>    at Object.SerialPort.options.dataCallback (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:168:15)
08:29:09.422 [pimatic] error:>    at SerialPortFactory.SerialPort._emitData (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:350:20)
08:29:09.422 [pimatic] error:>    at afterRead (/root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:326:20)
08:29:09.422 [pimatic] error:>    at /root/pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/serialport/serialport.js:342:9
08:29:09.422 [pimatic] error:>    at Object.wrapper [as oncomplete] (fs.js:454:17)
08:29:09.422 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
08:29:09.428 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic so soon as possible!
@michbeck100
Copy link
Owner

a41030e should fix this

@Yves911
Copy link
Author

Yves911 commented Nov 9, 2015

I confirm this issue is solved, no crash anymore.
Btw, when a contact is "closed" in pimatic, Eve reports "Yes"
when a contact is "opened" in pimatic, Eve reports "No"
i find this a bit strange...

@michbeck100
Copy link
Owner

I wasn't sure what the "default" state of a contact sensor might be. As I didn't have a device to test I couldn't test it with eve. I will switch the output if that makes more sense.

@michbeck100
Copy link
Owner

After testing the contact sensor, i would say if eve says the contact value is "yes" then this means the sensor has contact, which in turn means that it is closed. I would say this behavior is correct.

@Yves911
Copy link
Author

Yves911 commented Nov 11, 2015

make sense, thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants