UniversalDevicesInc / Polyglot

Polyglot Open Source
MIT License
24 stars 2 forks source link

Node class should check address length #5

Closed jimboca closed 8 years ago

jimboca commented 8 years ago

The maximum node address length is 19, so after the n000_ prefix, a node server node address length can only be 14. So I think we should check this when a node is created since we don't see any meaningful error message from the ISY, besides just that the node could not be created.

Einstein42 commented 8 years ago

So what do you recommend here, should we truncate the node name to 14 characters or return a catch value to fail?

jimboca commented 8 years ago

Not sure, I was thinking at least print an error to the log file and return false.

On Sun, Mar 13, 2016, 8:06 PM James notifications@github.com wrote:

So what do you recommend here, should we truncate the node name to 14 characters or return a catch value to fail?

— Reply to this email directly or view it on GitHub https://github.com/UniversalDevicesInc/Polyglot/issues/5#issuecomment-196118209 .

Einstein42 commented 8 years ago

I'm having a hell of a time finding where the profile_number + address is even generated. I thought I found it the other day, but can't seem to find it tonight.

Nevermind I found it elemenet_manager/isy/init

Einstein42 commented 8 years ago

There is currently no error handling to return null on this, and it fails anyway, so I just added an error message to the log so at least the user knows. I don't know that more is necessary. Thoughts?

jimboca commented 8 years ago

Yes that will help. Not sure if it should throw an exception.

On Tue, Mar 15, 2016, 7:41 PM James notifications@github.com wrote:

There is currently no error handling to return null on this, and it fails anyway, so I just added an error message to the log so at least the user knows. I don't know that more is necessary. Thoughts?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/UniversalDevicesInc/Polyglot/issues/5#issuecomment-197121124