Jump to content

Pushing property values to IoX variables?


Vwas
Go to solution Solved by bpwwer,

Recommended Posts

Posted

 Long time ISY user here who recently migrated to EISY. I’m currently running 5.8.4 and trying to take advantage of some of the added capabilities that EISY brings to the table. Thanks in advance to all for your insights and assistance.

Is there any way that one can set variables in an IoX program to the property values returned by PG3 plugins?

I’d like to calculate the running average of the solar radiation level measurements obtained from my Ambient weather station plugin. I’d be using this calculated value to determine whether or not to turn on supplemental indoor lighting on cloudy days.

The running average is intended to smooth out the effects of passing clouds on measurement data, to reduce or prevent unnecessary turn on and turn offs.

It would be a simple matter to calculate a running average of the last N measurement values returned by the plugin, if these values could somehow be directly stored into program variables. 

After poking around in the administrative console and the program content editor for a while, I couldn’t find a way to do this. It seems that any returned property values are only available for use in decision making as part of an if/then/else clause, rather than as part of any mathematical analysis/evaluation.

Is this a fundamental limitation of how IoX interfaces with plugins? Can anyone provide any insight or ideas as to how I might be able to pass these returned values directly into a variable? 

Thanks again

 

  • Solution
Posted

Yes, you should be able to do that, assuming the plug-in doesn't have a bug that's preventing it from working.   Since you mentioned Ambient and solar radiation, I tested that and it seems to work as I'd expect.

image.thumb.png.459871c20d3c85312bce4e0b55c679c3.png

I'm not sure if this actually works, but the ideas was to set the variable to the solar radiation value, wait 1 minute and then add the new solar radiation value, then divide by 2 to get the average solar radiation over that 1 minute interval.

Posted

Hi Bob: 

Well, since you're the guy who wrote the plugin, I trust that it works exactly as intended. If not, I'll let you know otherwise... 😉

Thanks for providing the keys that finally unlocked this puzzle for me. 

While poking around in that "action" tab previously, I've only clicked on that arrow button once, to toggle between the option to assign numbers or my predefined TRUE and FALSE constants to the variables. 

I never realized until now that a few additional clicks would reveal additional dropdowns. Sure enough, the list of properties provided by my weather station plugin is hidden back there. And I'm also able to freely select any of them and assign them to the variable of my choice!

image.png.9ca2f3cec3891709b8fd65f94b53d610.png

image.png.4ab6d7434f7cbdebf1d723902237998d.png

Also for the record, here's the reason behind my wanting to create a running average filter for this data.

Here's the solar radiation data that was logged on AWN for two consecutive days last week. Unless you're willing to tolerate lighting randomly turning on and off at one minute intervals, you really need something to smooth this data to make sense of it.

Thankfully, your guidance will make short work of taming this beast!

Thanks again! 

image.thumb.jpeg.1442084633b48f7a0d623d27b5b60b4d.jpeg

image.thumb.jpeg.8f2bd76e6cf244336ac023637abd41aa.jpeg

Thanks 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...