Skip to content

Latest commit

 

History

History
101 lines (58 loc) · 2.43 KB

Room.pod

File metadata and controls

101 lines (58 loc) · 2.43 KB

NAME

Max::Room - Class to represent a group of eQ-3 Max! devices

SYNOPSIS

use Max;

for my $room ($max->rooms) { ... }

my $room = $max->room(42);
$room->set_temperature(21.5);

DESCRIPTION

Represents a "room" or "group" of thermostatic devices in the "eQ-3 MAX!" system.

Class methods

Max::Room->new(...)

Considered an internal method; should not be called directly.

Instance methods

add_device($device)

Given a Max::Device object, adds it to the room object. Does not update the Cube's configuration; use $device->set_room for that.

devices

Returns a list of discovered devices as Max::Device objects. The order is not guaranteed.

In scalar context, returns the number of devices.

display_name($include_id)

Returns the configured name, or a string comprised of the word "room" and the rooms' numeric ID. The ID is added, even for rooms that have a configured name, if the argument $include_id is true.

name

Returns the configured name (binary).

name($name)

Sets a new name, but does not write the metadata to the cube. Use $max->write_metadata to store the new name.

setpoint

Returns the configured target temperature as reported by a device in the room. If a wall thermostat is present, its temperature is preferred. Without any wall thermostat, will use any other device's reported setpoint.

Returns undef if the setting is not known.

setpoint($temperature)

Sends a new manual setpoint temperature to all the devices in the room. The new temperature must be a multiple of 0.5.

Currently does not handle errors.

temperature

Returns the actual temperature as reported by a wall thermostat in the room. Returns undef if the temperature is not known.

too_cold([$maxdelta])

Returns true if the measured temperature is more than $maxdelta degrees colder than the setpoint. The parameter defaults to 0. Returns undef if the temperature or setpoint is not known.

CAVEATS

  • Very little parameter checking is done.

  • Because set_temperature sets the mode to "manual", the setting is kept. The suggested use of this library is to set programs on a computer (via cron) rather than directly on the devices.

LICENSE

Pick your favourite OSI approved license :)

http://www.opensource.org/licenses/alphabetical

AUTHOR

Juerd Waalboer <#####@juerd.nl> <http://juerd.nl/>