#12843 - 09/12/05 06:55 AM
How can I read a Variable in Homeseer!!
|
Gazou
newbie
Registered: 07/04/04
Posts: 20
Loc: Laval
|
Hi
I have been able to set a variable in homeseer with a script... fine, but how can I read the value of it...
I'd like to read the value of variable 60 in the ocelot, and if value comes above 20, speak ( with homeseer ) that the system is empty.
Thanks
|
|
Top
|
|
|
|
#12845 - 09/12/05 01:32 PM
Re: How can I read a Variable in Homeseer!!
|
Gazou
newbie
Registered: 07/04/04
Posts: 20
Loc: Laval
|
Yeah... But I can find an easy way to read it from the Ocelot.
I do change the value of variable when needed... using
&hs.SetDeviceValueByName "Ocelot Variable 59",123
but I would like to READ it and make an IF command INTO homeseer with it...
Should I use hs.getdevicevaluebyname ect... but there is notting into the doc that show that.
Thanks
Bye the way Guy, Thanks again for the help.... it is working now ( for the part 0.1a of my alarm ), you found out that I need a THEN instead of an ELSE in my script is now working.... au grand malheure de ma femme..... Ca fait 3 fois qu'elle déclanche le système d'alarme la nuit... hahahaha...
Thanks again
|
|
Top
|
|
|
|
#12847 - 09/13/05 10:13 AM
Re: How can I read a Variable in Homeseer!!
|
CFGuy
newbie
Registered: 01/09/03
Posts: 8
Loc: Lawrence, KS
|
To read the value of a device in HomeSeer to use in a script you can use:
someVariable = hs.DeviceValueByName ("Ocelot Variable 59")
_________________________
Jeff Farmer
|
|
Top
|
|
|
|
#12848 - 04/05/06 01:37 PM
Re: How can I read a Variable in Homeseer!!
[Re: CFGuy]
|
Gazou
newbie
Registered: 07/04/04
Posts: 20
Loc: Laval
|
OK, but I would like that script to run like every 1/2 second or close to it.
How In homeseer Can I Do that....
Exemple :
Door Bell : when Circuit Closed, then play Wesminster.wav Door Contact : When Open, Play Dog Bark.wav.
My event check for the door change state.... if change, then....
For the variable, I would like to check the variable and If Var 5 = 100 ( what ever ) then play Good Night.wav....
The Variable dosen'.t change in homeseer.... it stays at 0 for ever... I dont see the change ( even in the Log )
Can I ask Homeseer to check every 1/2 or else what is the state of the variable????
Thanks
|
|
Top
|
|
|
|
#12849 - 04/05/06 05:14 PM
Re: How can I read a Variable in Homeseer!!
[Re: Gazou]
|
John Warner
old hand
   
Registered: 01/09/03
Posts: 817
Loc: Port Perry, Ontario, Canada
|
Sounds like an application best-suited for the Speakeasy!
Mine says 45 different things based on dates, times or events - and no PC to crash leaving those poor JW's pushing your doorbell button in frustration!
|
|
Top
|
|
|
|
#12850 - 04/06/06 02:19 AM
Re: How can I read a Variable in Homeseer!!
[Re: Gazou]
|
Barry Parr
journeyman
Registered: 02/15/04
Posts: 98
Loc: NZ
|
What is the Value of the 'Polling Rate' that you have set in the ocelot Plugin ?
|
|
Top
|
|
|
|
#12851 - 04/06/06 03:01 PM
Re: How can I read a Variable in Homeseer!!
[Re: Barry Parr]
|
jrfuda
junior
Registered: 08/10/03
Posts: 45
Loc: San Antonio, TX
|
Gazou, you need an event not a script. Use the ADIOcelot plugin and have it create a device for the variables and/or module points (like an SECU16 input) you want to track. Then create an event that will trigger based on a value change of that variable or point. You can then have the event launch a script or execute the appropriate actions. There are several ways to do this.
You can create seperate events for each possible state.. This is really only practical for things with only open/close or 1/0 values, like a door. I use this for tracking the status of my garage door.
You can create a single event that uses a script with a bunch of conditions. This is good for things with more than two values, like an analog input or other variable. In this case you'd have the even trigger on change to any value, then your script would have conditions on all the possible variable values and/or ranges.
What's really neat about having the plugin create a device instead of referencing a variable directly, is that it can be more useful to you. HomeSeer lets every device have both a string and a value. So, let's say I had a soil moisture sensor connected to an analog input on my SECU16. The numbers that the Ocelot read from the sensor probably won't make sense right away. You could create a script that turns the output into something meaningful (to put in the device string)like percents or "moist," "needs watering soon," "needs watering now," and "needs water badly," or something to that effect (or both). So you now have the raw variable/point value and something easy to read.
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
1 registered
(kuro)
and 21 anonymous users online.
|
|
2747 Members
19 Forums
3837 Topics
22714 Posts
Max Online: 67 @ 08/16/11 03:08 PM
|
|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
|
|
|
|
|