Unable to create a property in a RFXCOM Unit
Hendrik van Eeden
hvaneeden at comcast.net
Thu Oct 10 09:10:36 EDT 2013
Hi James,
This is the script that I am using. It is the ON script for the temperature sensor.
if (future value of (thisUnit)) < 6 then
Set Unit Property "timer" to 0 in unit (thisUnit)
else
if (Get Unit Property "timer" from unit (thisUnit)) is equal to 0 then
Set Unit Property "timer" to (current date) in unit (thisUnit)
else
if (current date) - (Get Unit Property "timer" from unit (thisUnit)) > 50 * minutes then
set description of the "Reporting Unit" to thisUnit
turnon "Reporting Unit"
end if
end if
end if
The reporting unit sends SMS's for this condition and others.
It seems to work OK. Why do you suggest a pseudo unit over a property? Are there advantage/disadvantages pseudo over property?
Henk
On Oct 6, 2013, at 7:14 PM, James Sentman wrote:
>
> On Oct 6, 2013, at 5:21 PM, Hendrik van Eeden <hvaneeden at comcast.net> wrote:
>
>> I have a RFXCOM temperature unit that monitors my freezer temperature. I want it to send me a SMS when the temperature goes above 6°F. However the freezer goes into a defrost mode for about 45 minute at which time the temperature reaches about 36 °F, the temperature then returns to normal. So, I only want an SMS when the temperature stays above 6 °F for longer than 45 minutes.
>> I attempted to use a unit property to help me with the logic, but I can not create one.
>> I am on a mac mini running version 10.8.5 and XTension version 7 build 847.
>> It doesn't even have a "lasteditunit" property.
>> Am I missing something?
>>
>
> I would use a pseudo instead of a property, but it's just personal preference for being able to see exactly what is happening.
>
> in the temp sensor ON script I would check the state of the "alert condition for fridge" pseudo. if it's not on I would turn it on, and if the temp is below the alert point I would check to see if it's off, and if not I would turn it off.
>
> I would create a global script that checks the state of the alert condition pseudo, and if it's on send the message.
>
> in the ON script of the alert condition pseudo I would do an execute script "the global script from above" in 6 minutes
> and in the off script I would remove unit events for that same script name.
>
> So if you're above the temp it turns on the alert pseudo and creates the event to run that script. If the temp goes right back down again then the alert pseudo will be off when the script runs and nothing happens, but if the script finds the pseudo still on after whatever the time is then send the alert.
>
> Thanks,
> James
>
>
> James Sentman http://sentman.com http://MacHomeAutomation.com
>
>
>
> _______________________________________________
> XTensionList mailing list
> XTensionList at shed.com
> http://shed.com/mailman/listinfo/xtensionlist
More information about the XTensionList
mailing list