Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Virtual Analog I/O Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 26 2007 at 19:50 | IP Logged Quote TonyNo

I think this feature will fill a need of mine...

How do I go about defining these? Noting found in the docs.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 26 2007 at 22:51 | IP Logged Quote dhoward

Tony,

Real easy...just make sure that you declare a controller in Setup as type PowerHome Virtual. Next create whatever X10, IR, Analog, or Digital points that you like and set their controller to be the PowerHome Virtual controller you defined. You can then use any of the standard PowerHome control mechanisms (Device Status screen, ph_setanalogout, ph_ir, etc.) to control the virtual points. The great thing is that it will appear to be controlled as if it was a real controller complete with trigger firing.

Let me know if you need any help.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 26 2007 at 23:04 | IP Logged Quote TonyNo

Nice! Thanks!

What's the deal with the formulas (raw to whatever)?

Edited by TonyNo - November 26 2007 at 23:10
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: November 27 2007 at 08:29 | IP Logged Quote cmhardwick

Ok, possibly dumb question, but what's the use of something like this? I just can't see where you'd want a virtual device, other than for testing so you don't drive the wife crazy

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: November 27 2007 at 08:38 | IP Logged Quote BeachBum

Good question Cicero... I was thinking testing.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 27 2007 at 11:01 | IP Logged Quote dhoward

Testing is definately one good aspect. Another reason to use the virtual analog and digital are to get flags and the like on the Device Status screen (as opposed to global variables). Say you've got a flag for whether you're in vacation mode or not, you can set a virtual digital out to either on or off straight from the control center. Another use would be to implement functionality that doesnt current exist such as the Arm status of the Elk (this will be available automatically in .13). Currently, I have a trigger on the ELK for Command 5 that updates a virtual Analog Input to let me see right on the Device Status screen what the current Arm state for the Elk is.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 27 2007 at 13:18 | IP Logged Quote TonyNo

I think you missed this bit...

Quote:
What's the deal with the formulas (raw to whatever)?

Scaling, I'm guessing?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: November 27 2007 at 16:03 | IP Logged Quote bhlonewolf

dhoward wrote:
Testing is definately one good aspect. Another reason to use the virtual analog and digital are to get flags and the like on the Device Status screen (as opposed to global variables). Say you've got a flag for whether you're in vacation mode or not, you can set a virtual digital out to either on or off straight from the control center. Another use would be to implement functionality that doesnt current exist such as the Arm status of the Elk (this will be available automatically in .13). Currently, I have a trigger on the ELK for Command 5 that updates a virtual Analog Input to let me see right on the Device Status screen what the current Arm state for the Elk is.

Dave.


Dave --

I haven't spent more than 10 minutes on this but I something on this clicked. I intend to have an "away" state that does various things when I'm away vs home. Currently I have this set up as a global variable, though I'm not really using it yet.

I don't use the Control Center for much, but in briefly looking at it to figure out how I'd implement the status, it kind of seemed like it would be a lot of work to get some buttons to reflect the state of global variable.   

Am I correct in assuming this is what you mean by using a virtual device -- being easier to integrate on Control Center screens, etc?
Back to Top View bhlonewolf's Profile Search for other posts by bhlonewolf
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 29 2007 at 09:31 | IP Logged Quote dhoward

Tony,

Whoops, I did miss that. The formulas are to help in the presentation of the analog data. All analog "raw" data is stored as an integer and can be typically 0 to 255 or 0 to 32767, etc. depending upong the resolution. In the case of the Elk, an analog input will send the current voltage as an integer number, say 136 for 13.6 volts. The rawtocalc formula (all analog points have this) will take a raw value and convert it to a value suitable for display. The formulas are standard PowerHome formulas and the raw data can be referenced within the formula with the [DATA] system variable. So, in the case of an Elk Analog input that we just want to display in volts, we would use a rawtocalc formula of: [DATA] / 10. We could then put the text "Volts" in the message column and we'll now have a nice "13.6 Volts" displayed in the Device Status screen.

If a point is an analog output, you'll also have the calctoraw formula available. This is typically a reciprocal formula and will take a "calculated" value and convert it to a raw value. If the Elk had an analog voltage output and we wanted to set the voltage to 10.8 volts, we'd want to just enter 10.8 instead of 108. The calctoraw formula for this would be: [DATA] * 10. If you leave the formula fields blank, no translation will take place and it will assume that both formula fields has an implied formula of just: [DATA].

Lonewolf,

Kind of. It really wouldnt be any easier to integrate a global variable on the Control Center as opposed to a virtual device point, but...if you're dealing with the Device Status screen, then yes, the virtual point will just show up and be able to be viewed/controlled directly.

The next version will have global variables and Device points on the CC. Globals will be for display only, but you should be able to have a status button for the virtual device to control it's state. Then it would truly be easier to control a virtual rather than a global from the CC.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 29 2007 at 09:46 | IP Logged Quote TonyNo

Thanks Dave!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: January 10 2009 at 14:44 | IP Logged Quote krommetje

OK, got it...

some questions:

What to do with the Message value?
What can be done withe the raw to Calculated Value?
Give me some examples of e.g. giving a value to a V.A.I/O e.g. GV's, X10status etc.

Peter



Edited by krommetje - January 10 2009 at 14:58
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 10 2009 at 18:25 | IP Logged Quote TonyNo

Quote:
What to do with the Message value?

I don't know.

Quote:
What can be done withe the raw to Calculated Value?

Usually, analog inputs need to be scaled to a real-world value. I believe this is for that.

Quote:
Give me some examples of e.g. giving a value to a V.A.I/O e.g. GV's, X10status etc.

ph_setanalogout( id, value )

You can also use ph_getanalog( id ) to retrieve a value.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: January 14 2009 at 01:46 | IP Logged Quote krommetje

That did the trick:

ph_setanalogout( "INSIDETEMP" , "{S0}" )

Next I am going to add 3 more Virtual Analog i/o to PH for my other temperatures.

I am about to add 4 extra temperature gauges for e.g. my deepfreeze, fridge etc.
There will be 8 temperaturegauges is total then...

Peter



Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum