xPL HVAC schema module

View: New views
5 Messages — Rating Filter:   Alert me  

xPL HVAC schema module

by Greg Satz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I put together an xPL HVAC module that supports the HVAC Schema. If  
you define the following:

xPL_HVACGATEWAY,iranger-aprilair.0a000004013x0l7,hvac_gateway,Gateways
xPL_HVACZONE,5,xpl_mstr_tstat,hvac_gateway,ALL_TSTATS
xPL_HVACZONESETPOINT,5,xpl_mstr_tstat_coolsp,hvac_gateway,ALL_SPS,cool

You can use the following code to scan for changes:

if ($xpl_mstr_tstat->state_now) {
     my $data = state $xpl_mstr_tstat;
     if ($data =~ /hvac\.zone : zone/) {
         print_log "Master Thermostat " . $xpl_mstr_tstat-
 >hvac_state . " Temperature " . $xpl_mstr_tstat->temperature . "\n";
     }
}

if ($xpl_mstr_tstat_coolsp->state_now) {
     print_log "Master Thermostat Setpoint cool state " . state  
$xpl_mstr_tstat_coolsp . "\n";
}

Due to the hvac.zone message containing many different state  
variables, I didn't monitor a single variable. I discovered that when  
nothing is monitored, the entire xPL message is returned as the state  
when the state/message changes. The test for the hvac.zone string  
confirms we only handle the state changes for that particular xPL  
message. Otherwise we can try to deal with state changes for  
hvac.zoneinfo messages. There might be a better way to do this.

The hvac setpoint data is set up as a child object of the hvac zone  
object. This lets you track setpoint changes per setpoint per zone.

Settable items are the setpoints, hvac mode and fan mode.

Let me know if anyone is interested.

Thanks,
Greg


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: xPL HVAC schema module

by Andy McCallum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Greg,

  I am currently finishing off an xPL gateway to my DIY HVAC Zone controller. The zone controller controls individual aircon zones aiming to measure and maintain the individual setpoints while the main reverse cycle aircon (Daikin) does it own thing.

  I have compatibility with Misterhouse via straight xPL Items.

  I would be very interested to see what tack you have taken, and leverage off your work! In particular to ensure my gateway (which is HVAC xPL compliant) is compatible with your MH interface.

Andy.

Greg Satz wrote:
I put together an xPL HVAC module that supports the HVAC Schema. If  
you define the following:

xPL_HVACGATEWAY,iranger-aprilair.0a000004013x0l7,hvac_gateway,Gateways
xPL_HVACZONE,5,xpl_mstr_tstat,hvac_gateway,ALL_TSTATS
xPL_HVACZONESETPOINT,5,xpl_mstr_tstat_coolsp,hvac_gateway,ALL_SPS,cool

You can use the following code to scan for changes:

if ($xpl_mstr_tstat->state_now) {
     my $data = state $xpl_mstr_tstat;
     if ($data =~ /hvac\.zone : zone/) {
         print_log "Master Thermostat " . $xpl_mstr_tstat- 
 >hvac_state . " Temperature " . $xpl_mstr_tstat->temperature . "\n";
     }
}

if ($xpl_mstr_tstat_coolsp->state_now) {
     print_log "Master Thermostat Setpoint cool state " . state  
$xpl_mstr_tstat_coolsp . "\n";
}

Due to the hvac.zone message containing many different state  
variables, I didn't monitor a single variable. I discovered that when  
nothing is monitored, the entire xPL message is returned as the state  
when the state/message changes. The test for the hvac.zone string  
confirms we only handle the state changes for that particular xPL  
message. Otherwise we can try to deal with state changes for  
hvac.zoneinfo messages. There might be a better way to do this.

The hvac setpoint data is set up as a child object of the hvac zone  
object. This lets you track setpoint changes per setpoint per zone.

Settable items are the setpoints, hvac mode and fan mode.

Let me know if anyone is interested.

Thanks,
Greg


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



  

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: xPL HVAC schema module

by Greg Satz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have packaged my xPL MH changes into http://www.iranger.com/downloads/xpl.tar.gz for those interested. It contains diffs to the files I changed within MH itself, the new code modules I wrote for the xPL security and HVAC schemas as well as the mh.private.ini and code directory so you can see how I used them. The MH diffs are mostly modifying how the debugging output is generated. You do need the changes to the read_table_A.pl file.

I have not tested the code that changes the HVAC mode, fan mode or setpoint temperatures.

I used the HVAC module with my Aprilaire thermostats and a gateway that I wrote for them. It did help flesh out some bugs so it was a useful exercise. I have a ton of debugging enabled in my mh.private.ini which helped me figure lots of this out.

Let me know how it goes.

Thanks,
Greg

On Sep 12, 2009, at 5:32 AM, Andy McCallum wrote:

Hi Greg,

  I am currently finishing off an xPL gateway to my DIY HVAC Zone controller. The zone controller controls individual aircon zones aiming to measure and maintain the individual setpoints while the main reverse cycle aircon (Daikin) does it own thing.

  I have compatibility with Misterhouse via straight xPL Items.

  I would be very interested to see what tack you have taken, and leverage off your work! In particular to ensure my gateway (which is HVAC xPL compliant) is compatible with your MH interface.

Andy.

Greg Satz wrote:
I put together an xPL HVAC module that supports the HVAC Schema. If  
you define the following:

xPL_HVACGATEWAY,iranger-aprilair.0a000004013x0l7,hvac_gateway,Gateways
xPL_HVACZONE,5,xpl_mstr_tstat,hvac_gateway,ALL_TSTATS
xPL_HVACZONESETPOINT,5,xpl_mstr_tstat_coolsp,hvac_gateway,ALL_SPS,cool

You can use the following code to scan for changes:

if ($xpl_mstr_tstat->state_now) {
     my $data = state $xpl_mstr_tstat;
     if ($data =~ /hvac\.zone : zone/) {
         print_log "Master Thermostat " . $xpl_mstr_tstat- 
 >hvac_state . " Temperature " . $xpl_mstr_tstat->temperature . "\n";
     }
}

if ($xpl_mstr_tstat_coolsp->state_now) {
     print_log "Master Thermostat Setpoint cool state " . state  
$xpl_mstr_tstat_coolsp . "\n";
}

Due to the hvac.zone message containing many different state  
variables, I didn't monitor a single variable. I discovered that when  
nothing is monitored, the entire xPL message is returned as the state  
when the state/message changes. The test for the hvac.zone string  
confirms we only handle the state changes for that particular xPL  
message. Otherwise we can try to deal with state changes for  
hvac.zoneinfo messages. There might be a better way to do this.

The hvac setpoint data is set up as a child object of the hvac zone  
object. This lets you track setpoint changes per setpoint per zone.

Settable items are the setpoints, hvac mode and fan mode.

Let me know if anyone is interested.

Thanks,
Greg


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



  
!DSPAM:4aab8767212561702017069!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

!DSPAM:4aab8767212561702017069!
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



!DSPAM:4aab8767212561702017069!


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: xPL HVAC schema module

by Andy McCallum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


  Thanks Greg.

  It might take a few weeks till I can get round to looking at this end of my HVAC project.

  I am tempted to wait until you have done more testing??

Andy.

Greg

 wrote:
I have packaged my xPL MH changes into http://www.iranger.com/downloads/xpl.tar.gz for those interested. It contains diffs to the files I changed within MH itself, the new code modules I wrote for the xPL security and HVAC schemas as well as the mh.private.ini and code directory so you can see how I used them. The MH diffs are mostly modifying how the debugging output is generated. You do need the changes to the read_table_A.pl file.

I have not tested the code that changes the HVAC mode, fan mode or setpoint temperatures.

I used the HVAC module with my Aprilaire thermostats and a gateway that I wrote for them. It did help flesh out some bugs so it was a useful exercise. I have a ton of debugging enabled in my mh.private.ini which helped me figure lots of this out.

Let me know how it goes.

Thanks,
Greg

On Sep 12, 2009, at 5:32 AM, Andy McCallum wrote:

Hi Greg,

  I am currently finishing off an xPL gateway to my DIY HVAC Zone controller. The zone controller controls individual aircon zones aiming to measure and maintain the individual setpoints while the main reverse cycle aircon (Daikin) does it own thing.

  I have compatibility with Misterhouse via straight xPL Items.

  I would be very interested to see what tack you have taken, and leverage off your work! In particular to ensure my gateway (which is HVAC xPL compliant) is compatible with your MH interface.

Andy.

Greg Satz wrote:
I put together an xPL HVAC module that supports the HVAC Schema. If  
you define the following:

xPL_HVACGATEWAY,iranger-aprilair.0a000004013x0l7,hvac_gateway,Gateways
xPL_HVACZONE,5,xpl_mstr_tstat,hvac_gateway,ALL_TSTATS
xPL_HVACZONESETPOINT,5,xpl_mstr_tstat_coolsp,hvac_gateway,ALL_SPS,cool

You can use the following code to scan for changes:

if ($xpl_mstr_tstat->state_now) {
     my $data = state $xpl_mstr_tstat;
     if ($data =~ /hvac\.zone : zone/) {
         print_log "Master Thermostat " . $xpl_mstr_tstat- 
 >hvac_state . " Temperature " . $xpl_mstr_tstat->temperature . "\n";
     }
}

if ($xpl_mstr_tstat_coolsp->state_now) {
     print_log "Master Thermostat Setpoint cool state " . state  
$xpl_mstr_tstat_coolsp . "\n";
}

Due to the hvac.zone message containing many different state  
variables, I didn't monitor a single variable. I discovered that when  
nothing is monitored, the entire xPL message is returned as the state  
when the state/message changes. The test for the hvac.zone string  
confirms we only handle the state changes for that particular xPL  
message. Otherwise we can try to deal with state changes for  
hvac.zoneinfo messages. There might be a better way to do this.

The hvac setpoint data is set up as a child object of the hvac zone  
object. This lets you track setpoint changes per setpoint per zone.

Settable items are the setpoints, hvac mode and fan mode.

Let me know if anyone is interested.

Thanks,
Greg


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



  
!DSPAM:4aab8767212561702017069!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

!DSPAM:4aab8767212561702017069!
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



!DSPAM:4aab8767212561702017069!


------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: xPL HVAC schema module

by Gregg Liming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg Satz wrote:

> I have packaged my xPL MH changes into
> http://www.iranger.com/downloads/xpl.tar.gz for those interested. It
> contains diffs to the files I changed within MH itself, the new code
> modules I wrote for the xPL security and HVAC schemas as well as the
> mh.private.ini and code directory so you can see how I used them. The MH
> diffs are mostly modifying how the debugging output is generated. You do
> need the changes to the read_table_A.pl file.
>
> I have not tested the code that changes the HVAC mode, fan mode or
> setpoint temperatures.
>
> I used the HVAC module with my Aprilaire thermostats and a gateway that
> I wrote for them. It did help flesh out some bugs so it was a useful
> exercise. I have a ton of debugging enabled in my mh.private.ini which
> helped me figure lots of this out.
>
> Let me know how it goes.

Your diffs and new lib now committed to svn.

Gregg

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365