Jump to content

Table/Node Status Property/Variable Question


KPiehl

Recommended Posts

Posted (edited)

I have a question regarding the State Property returned by a node.  I have always wanted to be able to convert a numeric Status returned by a device as easy human readable text. For example, a Lock may return a State of "Locked" by "User 1". Is there any way to format the User value to that it is returned as "Mike" instead of 1? As a database developer by profession, I imagine some sort of look up table stored somewhere that I could grab the value from that could be related to the Node and that Status that would translate the User into a text value to be used in notifications. Perhaps something like this is possible with PG3? Any advice would be appreciated.

Edited by KPiehl
Posted

No, I don't believe this is currently possible.

If you use something like the Notification node server you can a text box key at the bottom of your notification. This is also possible using the builtin email notification system.

Posted

That's not yet generically possible.

The IoX is capable of having a value -> text lookup table, but it's a pre-defined table.  The node server has to supply that table at startup to the IoX.   So it's what's probably happening now is that the node server has a pre-defined table that maps lock state codes to text:

0 = locked by key

1 = locked by user 1

2 = locked by user 2

10 = unlocked by key

and so forth.  If the node server provided a way for you to define the user's, it could build that table with your user's names instead of just 1, 2, ...  

Right now, there is on-going work to provide a more dynamic way to associate the numeric values to a string. But again, this will require the node server author to update the node server so that you can configure it with your own strings.  This may be something the notification node server takes advantage of in the future so that you can do pretty much what you describe.

Guest
This topic is now closed to further replies.

×
×
  • Create New...