Hello,
First I want to thank you for writing this module. I think the UniPi is great and deserves further development... ;)
I tried your code but I ran into 2 issues:
your function relays() in client.js returns a sorted list of the relays. But the relay_type does not work for me. Only when i remove && device.relay_type === 'physical' from the return-statement, the list comes back.
Everytime when I run the code, I get the error "TypeError: message.forEach is not a function" in the parse-function in api.js. Only when I remove this.on('message', this.parse.bind(this)) in the constructor of the evok-class it works.
Hello, First I want to thank you for writing this module. I think the UniPi is great and deserves further development... ;) I tried your code but I ran into 2 issues:
&& device.relay_type === 'physical'
from the return-statement, the list comes back.this.on('message', this.parse.bind(this))
in the constructor of the evok-class it works.Can you give me a hint what is wrong there?
Many thanks!
kr Andy