Author Topic: Air conditioner fan  (Read 2713 times)

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Air conditioner fan
« on: September 05, 2011, 05:18:20 pm »
Is there a way to define with code when the A/C fan is running or not?

I'm trying to use this as a trigger to turn UV duct lamps On when the fan runs, and Off when the A/C is off.

JOD.

I'm sorry, my responses are limited. You must ask the right questions.

Offline guessed

  • Master Member
  • *******
  • Posts: 5300
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Air conditioner fan
« Reply #1 on: September 05, 2011, 06:43:56 pm »
It's not spec'd as an event (at the moment), but there is:

Code: [Select]
<serviceType>urn:micasaverde-com:serviceId:HVAC_OperatingState:1</serviceType>
<serviceId>urn:micasaverde-com:serviceId:HVAC_OperatingState1</serviceId>
<SCPDURL>S_HVAC_OperatingState1.xml</SCPDURL>
which defines whether the system is currently Heating, Cooling, Idle, FanOnly, etc, ete  (See S_HVAC_OperatingState1.xml)

It's what the newer CP UI's do in order to show what your HVAC is currently doing.

I suspect you could poll this periodically and act on that.  I'd also bet that you could add a section to the JSON file for the HVAC itself, and then you could event off it (and if that works, you'd want to file a bug to get it implemented formally, so it doesn't drop out on upgrades)

Is there a way to define with code when the A/C fan is running or not?

I'm trying to use this as a trigger to turn UV duct lamps On when the fan runs, and Off when the A/C is off.

JOD.



Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Air conditioner fan
« Reply #2 on: September 05, 2011, 07:29:56 pm »
Perfect.
Thank you.

JOD.
I'm sorry, my responses are limited. You must ask the right questions.

Offline Kristopher

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +0/-0
Re: Air conditioner fan
« Reply #3 on: September 07, 2011, 02:39:43 am »
JOD:

You're supposed to run those UV lights on with your fan on 24/7 and your windows/doors sealed.  That being said, I don't do that either but I have an identical setup as you.  Here is the code I used for my Trane + Z-wave outlet connected to the UV lamps:

Code: [Select]
if( luup.variable_get("urn:micasaverde-com:serviceId:HVAC_OperatingState1","ModeState",3) == "Idle" and luup.variable_get("urn:upnp-org:serviceId:HVAC_FanOperatingMode1","Mode",3) ~= "ContinuousOn") then
   if( luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",26) == "1" ) then
      luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },26)
   end
elseif(luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",26) == "0") then
   luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },26)
end

Offline JOD

  • Hero Member
  • *****
  • Posts: 1973
  • Karma: +4/-0
Re: Air conditioner fan
« Reply #4 on: September 10, 2011, 10:23:57 am »
My lamps have been running 24/7 since I installed them over two years ago (I think they still work ;D) but the fan only runs on Auto. Seems like such a waste to run them 24/7, especially when you consider the cost of lamp replacement.

Thank you for the code, I don't have a Vera online at the moment to actually try it but the fan, heat and cool really should be part of the drop down T-Stat event / trigger selection as a standard. I'll drop a few hints to MCV and try to get them added as a feature request.

JOD.

*Edit. Finally, I'm up and running again and the code works great.
« Last Edit: September 25, 2011, 06:22:16 pm by JOD »
I'm sorry, my responses are limited. You must ask the right questions.

Offline Kristopher

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +0/-0
Re: Air conditioner fan
« Reply #5 on: October 04, 2011, 01:07:14 am »
Quote
Seems like such a waste to run them 24/7, especially when you consider the cost of lamp replacement.

Yeah I know what you mean.  I got a couple 260nm LEDs (very expensive) and some TiO2 mesh... going to try to build my own TCO.  LED should run practically forever :)   Will post pictures when I get a chance

Kristopher