UniversalDevicesInc/Polyglot

Node class should check address length

Closed this issue · 5 comments

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.

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

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
#5 (comment)
.

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

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?

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
#5 (comment)