Jump to content

Displaying individual variables "as devices" (sort of like virtual devices)


madcodger

Recommended Posts

After toying with Virtual for a while I am rethinking how it should work. The reason for the tie to variables is a way to store information about the device state and retrieve it from the init value should the ISY bounce. This is now becoming more difficult with the added data points in the TempC node. There may be a better way and with that a way to choose the variable in the node rather than something hard coded, if you need a variable at all.

I may push what I have as an update but I am going to investigate this other path for a few days and see where it goes. If it all works out it should cut down on the number of programs need to manipulate values and retrieve them. I will tinker.

Link to comment

Going to push v1.0.7, no one should have any trouble with the update. Make sure to Update Profile and restart the AC.

If you want to kick start everything then run the Then part of your programs twice and all of the values will populate and make sense or just let it be and after the second update all will be well.

This just updates the TempC node and I'm going to dig into node and see if I can trick it out.

Link to comment
2 hours ago, markv58 said:

Going to push v1.0.7, no one should have any trouble with the update. Make sure to Update Profile and restart the AC.

If you want to kick start everything then run the Then part of your programs twice and all of the values will populate and make sense or just let it be and after the second update all will be well.

This just updates the TempC node <- What does this mean and where is this??

@markv58

I'm not have any luck getting this to work unless the second THEN in the program is set to use a State Variable. Can you provide an image capture of how you have this set up so it displays a precision decimal??  

State Variable - Working Program.PNG

Link to comment
12 minutes ago, Teken said:

I'm not have any luck getting this to work unless the second THEN in the program is set to use a State Variable. Can you provide an image capture of how you have this set up so it displays a precision decimal??

The value display is set to prec 1 if you send prec 1 or convert F to C.

Screen Shot 2020-07-13 at 8.33.17 PM.png

Screen Shot 2020-07-13 at 8.36.19 PM.png

Link to comment

If I have an external device setting a variable via the REST API - how can I set this poly up to interpret the variable as a temperature and display it?

In my case - variables 141 and 142 are set via the ISY API - and constantly updated. I have set this up:

image.png.0973bd6f0a8965d238bb580ed8c906e9.png

I see the nodes - but the value seems to stay at zero:

image.thumb.png.aaa046cae0a763acf11f689f363cd560.png

State variables 141 and 142 are as follows:

image.png.f033669ac741d42dce0fb27b678aa968.png

72.5 degrees and 60.5 degrees. 

Am I missing the intent of the poly?

 

Link to comment

@MWareman You need a program to monitor a change to the variable then have the program set the Virtual Device value. Or you could use the Rest API to set the Virtual Device directly.

/rest/nodes/n016_142/cmd/setTemp/<temp>

Link to comment
@MWareman You need a program to monitor a change to the variable then have the program set the Virtual Device value. Or you could use the Rest API to set the Virtual Device directly.
/rest/nodes/n016_142/cmd/setTemp/

So, I need two variables? The external device sets a state variable - and I then have to have a program to respond to that and set a second variable to populate the poly?

I’ll probably run out of variable space doing that. Is it not possible to have it directly monitor the current value since that’s functionality provided in the Polyglot library?
Link to comment

The purpose of the Temperature nodes is to pull temp data from various devices to the nodes and have the ability to sort the nodes together, in folders, etc. for easier viewing rather than having to search through a bunch of variables or tabs.

Link to comment
12 minutes ago, MWareman said:


So, I need two variables? The external device sets a state variable - and I then have to have a program to respond to that and set a second variable to populate the poly?

I’ll probably run out of variable space doing that. Is it not possible to have it directly monitor the current value since that’s functionality provided in the Polyglot library?

The external device can simply set the Virtual Temperature node using the REST API - /rest/nodes/n016_142/cmd/setTemp/<temp> - will set the temperature same as setting the state variable.

And setting the V Temp will push the <temp> to the state variable as well.

Link to comment

When time permits another feature request is having the ability to reset the low & high counters. Ideally, each counter could be independently reset in case the user really needs to keep track of either. Rebooting the ISY Series Controller / Polisy Node Server isn't ideal to solve this problem.

Reset - Lowest & Highest Values.PNG

Link to comment
1 hour ago, markv58 said:

The external device can simply set the Virtual Temperature node using the REST API - /rest/nodes/n016_142/cmd/setTemp/<temp> - will set the temperature same as setting the state variable.

And setting the V Temp will push the <temp> to the state variable as well.

The external device is a Brultech Dashbox - I cannot change it's URL. It sets the variable via the ISY REST API. Why is it setting the variable by a program sends it's value to the poly - but setting the value via REST API does not?

Link to comment

Virtual v1.0.8 Update: Temperature node mirrors Temperaturec node with Highest and Lowest, Since Last Update and a function to Convert Raw to Prec, it appears that Brultech is sending raw data to state variable, so that can be converted.

The short poll, set to 30 seconds, updates the Since Last Update value and can be changed in the Custom Configuration Parameters.

Also changed the restart code as to not effect the Highest and Lowest values in the AC.

Update Profile and restart the AC after the update.

The Highest and Lowest values update when the next temperature update happens to accommodate data conversions, this is the normal procedure. There is currently no archiving of these values, so if ISY reboots, those values are lost. A future update will archive data.

Link to comment
Is there something else I need to do to see the additional fields?  I'm running 1.0.7,  I updated the profile and restarted the AC, ran the 'then' part of the program twice but I still see this.  Thanks for all the work you have done on this nodeserver!
 
307790883_Annotation2020-07-14091809(Small).png.4b04fb75da02bd0cdbfca03631e0b0b9.png

Once the new software has been upgraded the Node Server needs to be restarted. Once done select update profile in the AC for the parent virtual Node. Close the AC and log back in and everything should appear.

Sometimes both the Polyglot & ISY Series Controller need to be rebooted one at a time.


Sent from my iPhone using Tapatalk
Link to comment
8 minutes ago, tmorse305 said:

Is there something else I need to do to see the additional fields?  I'm running 1.0.7,  I updated the profile and restarted the AC, ran the 'then' part of the program twice but I still see this.  Thanks for all the work you have done on this nodeserver!

1.0.7 only effected the temperaturec node, 1.0.8 will do the same to the temperature node and should show up within the hour.

Link to comment
21 minutes ago, markv58 said:

Virtual v1.0.8 Update: Temperature node mirrors Temperaturec node with Highest and Lowest, Since Last Update and a function to Convert Raw to Prec, it appears that Brultech is sending raw data to state variable, so that can be converted.

The short poll, set to 30 seconds, updates the Since Last Update value and can be changed in the Custom Configuration Parameters.

Also changed the restart code as to not effect the Highest and Lowest values in the AC.

Update Profile and restart the AC after the update.

The Highest and Lowest values update when the next temperature update happens to accommodate data conversions, this is the normal procedure. There is currently no archiving of these values, so if ISY reboots, those values are lost. A future update will archive data.

@markv58

Will 1.08 address rebooting the node server and it defaulting to the values you see below? I had a few moments to check the system before starting my day. I was curious to see what the impact was by rebooting the Virtual Node Server.

The results are all of the nodes default to -60 / 129'C. 

Low & High - Default Values.PNG

Link to comment
Just now, Teken said:

Will 1.08 address rebooting the node server and it defaulting to the values you see below? I had a few moments to check the system before starting my day. I was curious to see what the impact was by rebooting the Virtual Node Server.

The results are all of the nodes default to -60 / 129'C.

The values should not change with a nodeserver restart, I haven't tested to see what happens with an ISY reboot but the values will probably blank until populated by any program.

A future version will archive all values so that they will be retrieved at the nodeserver restart and thus, not lost.

Link to comment
1 minute ago, markv58 said:

The values should not change with a nodeserver restart, I haven't tested to see what happens with an ISY reboot but the values will probably blank until populated by any program.

A future version will archive all values so that they will be retrieved at the nodeserver restart and thus, not lost.

Will it be possible in later release to reset the individual high / low counters? Love the idea of archiving the old data but if its possible to edit the same in case of an erroneous stored value?  

Link to comment
10 minutes ago, Teken said:

Will it be possible in later release to reset the individual high / low counters? Love the idea of archiving the old data but if its possible to edit the same in case of an erroneous stored value?  

Yes, I will get that worked in. I'm out in the field today so I'll need you to answer questions for a while, just don't get me in too much trouble.

Link to comment
3 hours ago, Teken said:


Once the new software has been upgraded the Node Server needs to be restarted. Once done select update profile in the AC for the parent virtual Node. Close the AC and log back in and everything should appear.

Sometimes both the Polyglot & ISY Series Controller need to be rebooted one at a time.


Sent from my iPhone using Tapatalk

Thanks Teken, I had already tried everything in your first paragraph before reaching out for help.  I rebooted Polyglot first, then ISY.  Tried another Profile Update and AC restart but still no joy.

Link to comment
7 minutes ago, tmorse305 said:

Thanks Teken, I had already tried everything in your first paragraph before reaching out for help.  I rebooted Polyglot first, then ISY.  Tried another Profile Update and AC restart but still no joy.

I'm not sure if this applies but try to set your State Variable to Precision 1 if not already enabled. Also, instead of just restarting Polyglot I would reboot the entire Polisy / RPI.

Link to comment
31 minutes ago, Teken said:

I'm not sure if this applies but try to set your State Variable to Precision 1 if not already enabled. Also, instead of just restarting Polyglot I would reboot the entire Polisy / RPI.

Set precision to 1 on the temp state variable, rebooted RPI, Updated Profile again, restarted AC, but no luck.  Interesting that when the Polyglot restarted all of the nodeservers came up running except VIrtual.  I had to restart it manually.  Not sure if that offers anyone a clue.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...