Michael Greb
and 1 contributors


Device::RadioThermostat - Access Radio Thermostat Co of America (3M-Filtrete) WiFi thermostats


  use Device::RadioThermostat;
  my $thermostat = Device::RadioThermostat->new( address => "http://$ip");
  say "It is currently " . $thermostat->tstat()->{temp} "F inside.";


Device::RadioThermostat is a perl module for accessing the API of thermostats manufactured by Radio Thermostat Corporation of America. 3M-Filtrete themostats with WiFi are OEM versions manufactured by RTCOA.


For additional information on the arguments and values returned see the RTCOA API documentation (pdf).

new( address=> '')

Constructor takes named parameters. Currently only address which should be the HTTP URL for the thermostat.


Retrieve a hash of lots of info on the current thermostat state. Possible keys include: temp, tmode, fmode, override, hold, t_heat, t_cool, it_heat, It_cool, a_heat, a_cool, a_mode, t_type_post, t_state. For a description of their values see the RTCOA API documentation (pdf).


Takes a single integer argument for your desired mode. Values are 0 for off, 1 for heating, 2 for cooling, and 3 for auto.


Returns undef if current mode is off. Returns heat or cooling set point based on the current mode. If current mode is auto returns a reference to a two element array containing the cooling and heating set points.


Returns a reference to a hash of the set points. Keys are t_cool and t_heat.


Set a temporary heating set point, takes one argument the desired target. Will also set current mode to heating.


Set a temporary cooling set point, takes one argument the desired target. Will also set current mode to cooling.


Returns a reference to a hash containing at least rem_mode but possibly also rem_temp. When rem_mode is 1, the temperature passed to set_remote_temp is used instead of the thermostats internal temp sensor for thermostat operation.

This can be used to have the thermostat act as if it was installed in a better location by feeding the temp from a sensor at that location to the thermostat periodically.


Takes a single value to set the current remote temp.


Disables remote_temp mode and reverts to using the thermostats internal temp sensor.



With mode specified, sets mode and returns false on failure. With successful mode change or no mode specified, returns the current mode. Mode is an integer, 0 - disabled, 1 - partial lock, 2 - full lock, 3 - utility lock.

user_message($line, $message)

Display a message on one of the two lines of alphanumeric display at the bottom of the thermostat. Valid values for line are 0 and 1. Messages too long will scroll. This is only supported by the CT-80 model thermostats.

price_message($line, $message)

Display a message in the price message area on the thermostat. Messages can be numeric plus decimal only. Valid values for line are 0 - 3. Multiple messages for different lines are rotated through. I believe line number used will cause an indicator for units to display based on the number used but it's not mentioned in the API docs and I'm not home currently.


Clears the price_message area. May also clear the user_message, I'd appreciate someone with a CT-80 letting me know.


Returns individual run times for heating and cooling yesterday and today. This method isn't documented in the current API so it may go away in the future but does still work with the latest firmware. Sample data:

    $data = {
              'today' => {
                         'cool_runtime' => { 'minute' => 29, 'hour' => 2 },
                         'heat_runtime' => { 'minute' => 0,  'hour' => 0 }
              'yesterday' => {
                         'heat_runtime' => { 'minute' => 0,  'hour' => 0 },
                         'cool_runtime' => { 'minute' => 14, 'hour' => 0 }


Mike Greb <michael@thegrebs.com>


Copyright 2013- Mike Greb


This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.