Jump to content

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


madcodger

Recommended Posts

Posted
33 minutes ago, Teken said:

@markv58

What is the secret sauce you're using to calculate the average temperature? I know this is from the highest vs lowest but is that over what time frame / period? An hour, minute, day?

Of course it's the high and low, averaging starts after 2 updates after the statistics have been reset. That happens on the very first run and after manually resetting via the button at the bottom. So the time period is between resets, forever if nothing crashes or errors out.

Posted

V1.0.13 has been running for 6 hours with no errors, has survived several AC restarts and finally seems to be functioning correctly. Shouldn't have rushed yesterdays updates!

Triggering the update now, which will require a restart, an Update Profile and AC restart. The screens are quite different for feedback verification so don't be shocked.

If you get an error shortly after the restart you may need to delete the .db files in the Virtual folder.

Also, once you set the Push / Pull parameters, let the node go through and update before doing anything else. The data updates during the node update process, I will work on making that happen whenever any parameters are changed.

@Teken Maybe you could post a screen shot after the update as I'm working remotely with an antique laptop, I miss my desk.

  • Like 1
Posted

@markv58

Looking really great here too!

Once this gets locked down where more generic things can be incorporated with custom names like energy to display watts, amps, volts, KWH, liters / gallons. it would be nice to see a heart beat state in that last empty box for the Virtual Node Server! ? ? ?

A simple 1 / 0 flip flop, True / False, or better yet Active - Not Active state?!? ?

Virtual Node Server 1.0.13.PNG

Posted
2 hours ago, Teken said:

A simple 1 / 0 flip flop, True / False, or better yet Active - Not Active state?!? ?

 

the always increasing time in seconds value is a simple method that never fails.

Posted
16 minutes ago, MrBill said:

the always increasing time in seconds value is a simple method that never fails.

I agree but would it reset back to zero if the Node Server failed or would it simply remain at the last value? I would gather that @markv58 would code it in a way to insure the counter would reset if and when the Node Server was restarted. Ideally both the Polyisy up time and the Virtual Node Server heart beat would be reflected in one place.

  

Posted

@markv58

Just a couple of bug reports to relay to you as seen in v1.0.13. I have several 1 wire nodes that have no sensors in place but the system inserts rogue values. Not a big deal on the face of it since we have the all mighty *Reset Statistics* button. ?

Pressing on this button does nothing. ?

The next bug is the reverse of the raw value where the system appears to shrink the raw to precision to two decimal places over to the left? That value should have been 20.6 instead of 2.06 as seen in red. 

Thank You!

 

Low Value - Precision Error.PNG

Reset Fail Process.PNG

Posted

@Teken I took the liberty of having the raw to prec trigger automatically but after some thought I should probably stop that as certain circumstances could cause the false trigger or produce weird results. I'll pull out that code and let you do it manually. There are a few things to tidy up and I'm going to add a delete .db button for the nodes because that needs to be done on rare occasions. It's like starting up a new node, everything is wiped out and the db rebuilds.

Reset statistics should take everything to 0 but only if there is a db for the node and it doesn't actually store the reset values until the next update cycle runs. Storing data in that instance, right after the reset,  is one of the tidy ups I will do this evening.

Now as for the Energy Node, formerly know as the Generic Node, it's going to make the Temperature Nodes look like the Switch Node when that's done.

I only have an Aeotec device to monitor whole house so I need to know what it is you want it to do specifically so I can design and code the thing and send it as a single update. I was thinking multiple panels with multiple pulls from state vars to those panels or pushed from programs if you choose. Do you need Volt Amp Watt Kwh calculations? where you could pull a couple of values and determine another?

Posted
2 hours ago, Teken said:

I agree but would it reset back to zero if the Node Server failed or would it simply remain at the last value? I would gather that @markv58 would code it in a way to insure the counter would reset if and when the Node Server was restarted. Ideally both the Polyisy up time and the Virtual Node Server heart beat would be reflected in one place.

  

Ideally you would use seconds from the epoch which is easy to obtain in python, thus it stops when the node server stops, but never resets.  the Wireless (CAO) tags node server is a shining example:

image.png.f80dc40399fdbf016fc8f53fe73cfc95.png

Posted
16 minutes ago, markv58 said:

@Teken I took the liberty of having the raw to prec trigger automatically but after some thought I should probably stop that as certain circumstances could cause the false trigger or produce weird results. I'll pull out that code and let you do it manually. There are a few things to tidy up and I'm going to add a delete .db button for the nodes because that needs to be done on rare occasions. It's like starting up a new node, everything is wiped out and the db rebuilds.

Reset statistics should take everything to 0 but only if there is a db for the node and it doesn't actually store the reset values until the next update cycle runs. Storing data in that instance, right after the reset,  is one of the tidy ups I will do this evening.

Now as for the Energy Node, formerly know as the Generic Node, it's going to make the Temperature Nodes look like the Switch Node when that's done.

I only have an Aeotec device to monitor whole house so I need to know what it is you want it to do specifically so I can design and code the thing and send it as a single update. I was thinking multiple panels with multiple pulls from state vars to those panels or pushed from programs if you choose. Do you need Volt Amp Watt Kwh calculations? where you could pull a couple of values and determine another?

@markv58

RE: Temperature is there any specific reason this needs to move over to using a switch node? How will this impact how its displayed in the AC?

RE: Energy, if we could follow the same path as the temperature where no programs are needed would be ideal - less setup, work, and user error. If you're offering the brass ring I would really like to see everything any energy monitor can provide such as: volts, volt amps, PF, watts, current, peak watts, etc. The Brultech Green Eye Monitor (GEM) and Dash Box (DB) also supports 1 wire temperatures, pulse, which I use to monitor gas and water.

Would it be possible at some point to enter a custom name and have the same displayed for each node in the AC?  

Posted
3 minutes ago, MrBill said:

Ideally you would use seconds from the epoch which is easy to obtain in python, thus it stops when the node server stops, but never resets.  the Wireless (CAO) tags node server is a shining example:

image.png.f80dc40399fdbf016fc8f53fe73cfc95.png

I use that for the Since Update timing but it needs to send the HB to ISY. Devices send a HB and ISY is expecting that to happen but I don't think ISY expects a HB from nodeservers. I thought I saw something a while back but don't recall where, I'll think up something, dig around.

Posted
2 minutes ago, Teken said:

Would it be possible at some point to enter a custom name and have the same displayed for each node in the AC?  

You can change that in ISY, right click and rename, having random names in custom config params can cause problems with ghost nodes being created and those are a pain to get rid of. Having digits as the key and a preset list of values to direct the node creation is the best way to go on this one.

The Temp nodes are not going to change, a twist of a movie line in Back to the Future.

With the Energy node, I agree that setting parameters like the Temp nodes is the way to go and you can always use a program if you want or need to. I am giving you a shot at the brass ring on this one @Teken. I learned so much doing the Temp nodes that it is no problem, I just need info about how those things work. I've looked at the Brultech / Dashbox stuff and might just invest in that and the one wire has uses for me as well but I can do most of it without the actual devices. I am going to work on the overall design and capabilities and play with it for a while.

Posted
15 hours ago, markv58 said:

I use that for the Since Update timing but it needs to send the HB to ISY. Devices send a HB and ISY is expecting that to happen but I don't think ISY expects a HB from nodeservers. I thought I saw something a while back but don't recall where, I'll think up something, dig around.

I use that value from the wireless tags nodeserver like this:

 

(run at startup)

If
        '#1704 / Freezer' Last Update Time > '$freezer.tag.hb Raw'
 
Then
        $freezer.tag.hb  = '#1704 / Freezer' Last Update Time
        Wait  11 minutes
        Send Notification to 'Bill' content 'Freezer HB'
 
Else
   - No Actions - (To add one, press 'Action')

Normally the wait is interrupted because of an update, so the then body only finishes when an update is missed. 

I've considered adding one more statement to the end of IF:  Run Program 'Freezer HB' (else body) and then making

Else

    Wait 24 hours

    Run Program 'Freezer HB' (if)

to make sure it gets restarted... and to nag with another notification in case I forgot to deal with it... but I haven't tested that but I don't see a problem where it wouldn't work... except if maybe the nodeserver wasn't running with the ISY restarted.

 

 

 

Posted (edited)

Hi, Today when I checked my temps I noticed that the Since Last Update was stuck at 2 minutes.  I checked the log and it looks like an error occurred, see below.  A restart of the node server and Polyglot did not help.  Thanks for your help.


 
2020-07-22 13:25:55,704 Controller polyinterface ERROR polyinterface:write: Exception in thread Controller:
2020-07-22 13:25:55,704 Controller polyinterface ERROR polyinterface:write: Exception in thread Controller:
Traceback (most recent call last):
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
self._target(*self._args, **self._kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/polyinterface/polyinterface.py", line 846, in _parseInput
File "/home/pi/.local/lib/python3.7/site-packages/polyinterface/polyinterface.py", line 846, in _parseInput
self.longPoll()
self.longPoll()
File "./Virtual.py", line 56, in longPoll
File "./Virtual.py", line 56, in longPoll
self.nodes[node].getDataFromID()
self.nodes[node].getDataFromID()
File "./Virtual.py", line 387, in getDataFromID
File "./Virtual.py", line 387, in getDataFromID
self.pullFromID(_type, self.action1id)
self.pullFromID(_type, self.action1id)
File "./Virtual.py", line 401, in pullFromID
File "./Virtual.py", line 401, in pullFromID
LOGGER.info('Init = %s Prec = %s Value = %s',_value[1], _value[2], _value[3])
LOGGER.info('Init = %s Prec = %s Value = %s',_value[1], _value[2], _value[3])
IndexError: list index out of range
IndexError: list index out of range
Edited by tmorse305
Posted

@tmorse305 That can happen on very rare occasions, I believe that is fixed solid in the next update which will show up shortly. The .db files need to be deleted to clear the error. You can do that manually or use the button in each node to do that after the update.

v1.0.14 is pushed.

Posted

Virtual 1.0.14 - You may need to set Raw to Prec on to correct data. Update Profile and restart AC please.

Posted

The latest 1.0.14 seems to have introduced some problems. I am seeing where the AC will not allow the drop down items to be selected they simply flip back instantly. The AC has stopped populating the display with any of the options and as listed up above there were some crazy values showing up.

Had to pull out my super nuclear SPF 9000000000000000 lotion & shades - Hotter Than Balls ?

Error Log.PNG

Posted
2 minutes ago, markv58 said:

And set your Raw to Prec

I've tried both with no positive results  . . . The AC seems to populate the raw values (when present) but never converts for some reason. Pressing the Delete Node DB / Reset Statistics doesn't invoke a response from the ISY Series Controller.

Normally, I would see the system busy message and the AC zero's out the node in question - nothing happens. For the sake of doing it I restarted the Virtual Node Server, Update Profile, Rebooted the ISY / Polisy, in different orders just to see what would happen - nothing. ?

My toy is now broken and must use SPF 9000000000000000 because its 2000000'C. ?

Posted
1 hour ago, markv58 said:

I have joy joy at my place.

@markv58

I don't know boss man no joy joy here . . . ? I've even tried using a program and nothing seems to work as it did in the previous release. Kicking it off via the run THEN does absolutely nothing to make the values display in the AC.

Really wish there was a quick way to roll back - Thank God this isn't in production . . . 

Posted

@Teken Maybe something glitched during the update. Do a git pull in the virtual folder and restart. 

Guest
This topic is now closed to further replies.

×
×
  • Create New...