Unique Device Error


(Curt Rowe) #1

I’ve built a device handler and web service to control keypads on my Lutron lighting system. It works fine with the first device, but I get the error below when I added a second device. From what I’ve read here, ST won’t allow it. Is just a matter of the IP or the port? Could I set the second device to a different port and then use a switch to redirect the port or create a bunch of servers that listen on different ports? If that worked, would ST have a problem witht the response? I’ve read here about needing unique MAC addresses.

grails.validation.ValidationException: Validation Error(s) occurred during save():

  • Field error in object ‘physicalgraph.device.Device’ on field ‘deviceNetworkId’: rejected value [0A0000BB:1F91]; codes [physicalgraph.device.Device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique.error,device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.error.deviceNetworkId,device.deviceNetworkId.unique.error.java.lang.String,device.deviceNetworkId.unique.error,physicalgraph.device.Device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique,device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.deviceNetworkId,device.deviceNetworkId.unique.java.lang.String,device.deviceNetworkId.unique,unique.physicalgraph.device.Device.deviceNetworkId,unique.deviceNetworkId,unique.java.lang.String,unique]; arguments [deviceNetworkId,class physicalgraph.device.Device,0A0000BB:1F91]; default message [{0} must be unique]

(Stuart Buchanan) #2

Are you using the network id anywhere in your code? If so think of maybe adding a parameter with the ip and port details and the just have the network Id as a random string?

(Curt Rowe) #3

I already have the ip and port as parms. I’ll try changing the network I’d. I got the error when it went to send the message to the server.


Changing the network id didn’t have any effect. Not surprising as I don’t use it. I tried changing the port of the second device. ST sent the message. Since I don’t have a server on that port so I don’t know what will happen with a response.


I multi-threaded my web service to listen on multiple ports and now two switches work. It’s not the cleanest way to do it, but it may be the only way. I would prefer it if ST would allow me to use a single IP:port for multiple devices. Maybe ST does and I just don’t know about it.