How to handle a long integer?
Closed this issue · 2 comments
I am converting Camera IP addresses to long int's so I can store them in a single value on the ISY using uom=56. This shows properly in the Polyglot manifest shown here for GV2:
ihcam.log.2016-04-15:2016-04-15 10:58:10,852 DEBUG ihcam CameraServer:add_manifest_cams: address=000c5ddc9d6c data={u'drivers': {u'GV8': 8, u'GV9': 1, u'GV2': 3232235886L, u'GV3': 8080, u'GV1': 0.1, u'GV6': 1, u'GV7': 0, u'GV4': 1, u'GV5': 1}, u'node_def_id': u'FoscamMJPEG', u'name': u'CameraFrontDoor', u'added': False}
and querying the node shows
DEBUG [04-16-2016 15:26:35] requests.packages.urllib3.connectionpool: "GET /rest/ns/3/nodes/n003_000c5ddc9d6c/report/status/GV2/3232235886/56 HTTP/1.1" 200 0
INFO [04-16-2016 15:26:35] polyglot.element_manager.isy: ISY: ( 0.03) 200 OK: http://192.168.1.64:80/rest/ns/3/nodes/n003_000c5ddc9d6c/report/status/GV2/3232235886/56
But the ISY admin console show it as 2147483647 which is the max signed int value. Is there a way we can define this so it will show up properly as a long int? and maybe in the future this could be a standard uom and the admin console can show the real ip address? 😃
When string support is added for options, there will also be a 'style' that can be specified in the definition of the option (such as 'text', 'date', 'datetime', 'ip address', 'password', etc.) so that the ISY GUI will present the value appropriately to the user.
As for long integers, there is no plan yet to allow for integers greater than 4 bytes.