npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

lennoxapi

v0.1.2

Published

TypeScript API for Lennox S30/S40/E30/M30 thermostats (LAN connection)

Readme

lennoxapi

TypeScript API for controlling Lennox S30, S40, E30, and M30 thermostats via local LAN connection. No cloud required.

Features

  • Local Control: Communicates directly with your thermostat over your local network
  • No Cloud Dependency: Works without Lennox cloud services
  • Full Thermostat Control: Temperature setpoints, HVAC modes, fan modes, humidity
  • Zone Support: Works with single-zone and multi-zone systems
  • Single Setpoint Mode: Supports Lennox's "Perfect Temp" / auto mode with single temperature target
  • Additional Features: Away mode, ventilation, allergen defender, outdoor temperature

Installation

npm install lennoxapi

Usage

import { S30API } from 'lennoxapi';

const api = new S30API({
  ipAddress: '192.168.1.100',
  protocol: 'https',
});

// Connect to thermostat
await api.serverConnect();

// Get the system
const system = api.getSystem('LCC');
await api.subscribe(system);

// Poll for data
for (let i = 0; i < 60; i++) {
  await api.messagePump();
  if (system.configComplete() && system.zones.length > 0) break;
}

// Read current state
console.log('System:', system.name);
console.log('Outdoor temp:', system.outdoorTemperature);

const zone = system.getZone(0);
console.log('Zone temp:', zone.temperature);
console.log('Setpoint:', zone.sp);

// Control the thermostat
await zone.setHvacMode('cool');
await zone.setCoolSetpoint(72);
await zone.setFanMode('on');

// Cleanup
await api.shutdown();

API Reference

S30API

Main API class for connecting to thermostats.

  • serverConnect() - Establish connection
  • subscribe(system) - Subscribe to system updates
  • messagePump() - Poll for updates (returns true if message received)
  • shutdown() - Close connection

LennoxSystem

Represents the thermostat system.

  • name - System name (e.g., "Downstairs")
  • productType - Model (e.g., "S40")
  • outdoorTemperature - Outdoor temperature (if available)
  • manualAwayMode - Away mode status
  • singleSetpointMode - Whether single setpoint mode is active
  • zones - Array of zones
  • setManualAwayMode(enabled) - Enable/disable away mode

LennoxZone

Represents a thermostat zone.

  • temperature - Current temperature
  • humidity - Current humidity
  • sp / spC - Single setpoint (F/C)
  • hsp / hspC - Heating setpoint (F/C)
  • csp / cspC - Cooling setpoint (F/C)
  • systemMode - Current HVAC mode
  • setHvacMode(mode) - Set HVAC mode ('off', 'heat', 'cool', 'heat and cool')
  • setCoolSetpoint(temp) - Set cooling setpoint
  • setHeatSetpoint(temp) - Set heating setpoint
  • setSingleSetpoint(temp) - Set single setpoint (when in SSP mode)
  • setFanMode(mode) - Set fan mode ('auto', 'on', 'circulate')

Credits

This library is a TypeScript port of the excellent lennoxs30api Python library by Pete Rager. The original Python library powers the Lennox S30 Home Assistant integration.

License

MIT