Jump to content

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


madcodger

Recommended Posts

@markv58

My Polyglot version is 2.2.9-5  running on Polisy

ISY is 5.0.16C


 
2020-07-24 08:10:31,668 MQTT polyinterface INFO polyinterface:_subscribe: MQTT Subscribed Succesfully for Message ID: 2 - QoS: (0,)
2020-07-24 08:10:31,777 NodeServer polyinterface INFO Virtual:start: Started Virtual Device NodeServer v1.0.17
2020-07-24 08:10:31,783 NodeServer polyinterface INFO polyinterface:addNode: Adding node temperaturec 155(155)
 
 
 
 
If I click "Reset Statistics," Previous, Highest, Lowest and Average are all = 0 degrees C and Current is showing the correct temperature.
I am using a temperaturec node.
Link to comment

@markv58 

I've attached the current log since upgrading to 1.0.17 and this has corrected the server from crashing. The only item not resolved is the system refuses to convert the raw to precision value. I've played around with every known option to no avail. ? Some things I have tried in no specific order of relevance or importance:

ISY Precision: Changing this from 0 -1

Variable: Selected both Action 2 from State Var vs State Init

Stop / Start, Restart. Update Profile, Rebooted both Polisy / ISY Series Controller, etc. I have also just selected Pull and populated those fields to see what would happen - no dice!

On a more positive note having the ability to add a 5 second delay is great. I can't say if adding more or less has any impact on the Raw vs Prec but the system didn't crash or fail to populate the new values when they arrived. On a related tangent with respect to the Energy portion of this endeavor. I would strongly encourage you to make this a stand alone Node Server so  any changes don't impact what already is a great Virtual Node Server for many.

This would allow everyone who wants to focus on one or the other and not have it impact their switch, temperature, generic, causing untold grief and technical support requests.  

Raw Value - No Precision.PNG

Virtual_2020-7-24_125913.txt

Link to comment
1 hour ago, gviliunas said:

@markv58

My Polyglot version is 2.2.9-5  running on Polisy

ISY is 5.0.16C



 
2020-07-24 08:10:31,668 MQTT polyinterface INFO polyinterface:_subscribe: MQTT Subscribed Succesfully for Message ID: 2 - QoS: (0,)
2020-07-24 08:10:31,777 NodeServer polyinterface INFO Virtual:start: Started Virtual Device NodeServer v1.0.17
2020-07-24 08:10:31,783 NodeServer polyinterface INFO polyinterface:addNode: Adding node temperaturec 155(155)
 
 
 
 
If I click "Reset Statistics," Previous, Highest, Lowest and Average are all = 0 degrees C and Current is showing the correct temperature.
I am using a temperaturec node.

@markv58

I am running the same versions as @gviliunas  ? All of us Beaver's stick together! ?

Link to comment

@Teken It looks like Raw to Prec is doing what it's supposed to do. Setting the variable causes the raw data to be 4 digits and the raw to prec divides by 10. Looking at your log, it appears that setting prec to 1 doesn't do anything other that add the extra digit which is always 0. Set your variable prec to 0, reset your statistics and you should be good to go.

Link to comment
42 minutes ago, markv58 said:

@Teken It looks like Raw to Prec is doing what it's supposed to do. Setting the variable causes the raw data to be 4 digits and the raw to prec divides by 10. Looking at your log, it appears that setting prec to 1 doesn't do anything other that add the extra digit which is always 0. Set your variable prec to 0, reset your statistics and you should be good to go.

@markv58

Houston we have lift off and the first epic flight of VNS-1 (Virtual Node Server 1) is in the air! ?? Now, show me how to resolve the negative values not showing up? I have to gather because the code doesn't take into account negative values?? ? 

Negative Value - No Data.PNG

Link to comment

@Teken It looks like the parser does not like negative numbers, I finally got an error. Must dig in and wrestle that bug out! After some design work, I had decided to stand the energy node solo, it's the right call.

 

Link to comment
1 minute ago, markv58 said:

@Teken It looks like the parser does not like negative numbers, I finally got an error. Must dig in and wrestle that bug out! After some design work, I had decided to stand the energy node solo, it's the right call.

 

@markv58

While your in there could you add in State / Integers variables up to say 800? 

Link to comment

Virtual v1.0.18: Negative values are parsed correctly without error. Increased Variable IDs to 1000 for @Teken however the drop down is gone so scrolling to or direct input (recommended) then hitting Enter or the button to the left is required to register the change.

Variable 71 has a value of -155, Converted from Raw and Converted from F to C.

Update Profile on this one.

Screen Shot 2020-07-24 at 6.52.31 PM.png

Link to comment
Just now, Teken said:

@markv58

Updated to v1.0.18 - Success! ? Just to clarify how does the delay work in the node server?

I just added another delay to the long poll of .1 seconds v1.0.19. The delay you can set is a parseDelay in custom config params. It is set to .1 as default but you can increase it if you want.

It adds a delay between the pull and the parse of the data to offset any latency there may be in the network. Virtual uses the rest interface to get the value from ISY and while that is very quick it could be delayed.

Screen Shot 2020-07-24 at 8.59.06 PM.png

Link to comment
31 minutes ago, gviliunas said:

Thanks for your hard work in bring this fantastic NS to life. ? ? ?

Amen to that! I cannot thank @markv58 enough, and I still haven't had a chance to play with the toy (heck of a stretch of activity lately). Thanks to you other fine folks for testing and providing needed feedback, as well.

Link to comment

As a data point for @Teken and @markv58, my freezer monitor appears to be working correctly but I am setup differently. In my case:

1. I accept degrees F data from CAO sensors (They don't reliably stay in degrees C mode when the CAO NS restarts) and store this in a State Variable.

2. Precision  for all of my temperature State Variables is 1

3. This NS pulls from one State Variable and pushes to another. All of my nodes are "tempuraturec"

4. I do the degrees F to degrees C in this NS. ParseDelay is at default value

 

Frezer Variables.jpg

Freezer Node.jpg

Link to comment
34 minutes ago, gviliunas said:

As a data point for @Teken and @markv58, my freezer monitor appears to be working correctly but I am setup differently. In my case:

1. I accept degrees F data from CAO sensors (They don't reliably stay in degrees C mode when the CAO NS restarts) and store this in a State Variable.

2. Precision  for all of my temperature State Variables is 1

3. This NS pulls from one State Variable and pushes to another. All of my nodes are "tempuraturec"

4. I do the degrees F to degrees C in this NS. ParseDelay is at default value

 

Frezer Variables.jpg

Freezer Node.jpg

That seems odd. The KumoApp injections never switch out of C to F.

Link to comment
15 minutes ago, gviliunas said:

@larryllix, not to hijack this thread but I reported this issue awhile back. I don't know if it has been fixed but it was easy enough for me to keep CAO in degrees F and do the conversion in ISY. I have one leg on each side of the border...

 

  

Sounds like @Jimbo had to make a choice of F or C to be transported, and then convert it in the NS which powers up more slowly. May need to include a "heartbeat valid" flag into every program making usage.

Link to comment

I am seeing some very strange errors in logs. It seems that parsing negative numbers may or may not work and kicks up an error, when that happens it skips the update and moves on.

I guess I'll work on the regex and try to find something that works consistently. Makes no sense at all what is happening.

Link to comment

@Teken Once again I think you can pull negative numbers, trial and error with dozens of parsing regex and methods I believe I've landed on one that will reliably and consistently do the job.

Watch for the update, I think it's 1.0.20, and I think you owe me a beer.

Link to comment

Now that it looks like the Virtual Temp nodes are finally doing what they're suppose to do, I am working on the final tweaks.

1. Stop the node from updating the temp panel and storing data if there is no change in the value from the previous pull. This will take a load off of the polyglot and reduce writes to the sd card or drive. This is in progress and is working well, the Since Last Update will continue to count up until there is a change to the Current value.

2. Add a time stamp to the lower right area beside the Convert F to C or C to F  where it is blank and indicate of the last time the value updated.

3. Stripping out un-needed logger items and dressing up the code.

This will hopefully be the last update on those nodes, it's pretty simple stuff so there should be no bugs, stay tuned.

Link to comment

Virtual 1.2.0 (stable) - Temperature Nodes - Code cleaned, timestamp added to log when a variable is changed, there is no driver to add to the node display at present so that did not happen.

The values will only update now if a variable has changed since the last check and the counter will increase until that change happens. Data storage only happens when there is a change.

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...