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 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-pentair-screenlogic

v3.0.2

Published

Plugin for Pentair Screenlogic Controllers

Downloads

22

Readme

homebridge-pentair-screenlogic

NPM version License Downloads

Fork of schemers/homebridge-screenlogic with some of my own improvements and fixes.

ScreenLogic plug-in for Homebridge using the node-screenlogic library.

Requirements

This plugin was recently rewritten in Typescript to use the latest capabilities of Homebridge 1.x, so it requires at a minimum:

  1. Homebridge >= 1.0.0
  2. Node >= 10.17.0

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plug-in using: npm install -g homebridge-screenlogic
  3. Update your configuration file. See example config.json snippet below.

Configuration

Configuration samples (edit ~/.homebridge/config.json):

UDP Broadcast

This performs a UDP broadcast on 255.255.255.255, port 1444, so ensure your network supports UDP broadcasts and the device is on the same subnet.

"platforms": [
        {
            "platform": "ScreenLogic"
        }
    ],

Direct connection via IP Address

Use this when you know the local static IP address.

"platforms": [
        {
            "platform": "ScreenLogic",
            "ip_address": "192.168.0.100"
        }
    ],
  • "port" is optional and defaults to 80
  • "username" is optional, but is recommended as it is used to keep accessory UUIDs consistent. Should be in the format "Pentair: XX-XX-XX".

Remote connection via gateway

Use this to go through Pentair servers.

"platforms": [
        {
            "platform": "ScreenLogic",
            "username": "Pentair: XX-XX-XX",
            "password": "..."
        }
    ],

Optional fields:

  • "hidden_circuits" comma-separated list of circuit names to hide. Set this for circuits you don't want showing up as switches. (ie.., "Aux 6,Floor Cleaner").

  • "hideAirTemperatureSensor" hides the air temperature sensor. Default is false.

  • "hidePoolTemperatureSensor" hides the pool temperature sensor, which is redundant if you are showing pool thermostat. Default is true.

  • "hideSpaTemperatureSensor" hides the spa temperature sensor, which is redundant if you are showing spa thermostat. Default is true.

  • "hidePoolThermostat" hides the pool thermostat (aka, pool heater) if you don't want to allow changes via HomeKit. Default is false.

  • "hideSpaThermostat" hides the spa thermostat (aka, spa heater) if you don't want to allow changes via HomeKit. Default is false.

  • "statusPollingSeconds" time in seconds to poll for pool statu. Default is 60 seconds.

  • createLightColorSwitches will create a "Pool Lights" accessory that contains switches for turing on light modes/colors. Default is false.

  • disabledLightColors an array of strings with the names of light mode/colors you want to disable. Default is an empty array.

Sample config

{
  "platform": "ScreenLogic",
  "hidePoolTemperatureSensor": false,
  "hideSpaTemperatureSensor": true,
  "hideAirTemperatureSensor": true,
  "hidePoolThermostat": false,
  "hideSpaThermostat": false,
  "statusPollingSeconds": 60,
  "createLightColorSwitches": true,
  "disabledLightColors": ["Pool Mode Party", "Pool Mode Romance"],
  "hidden_circuits": "Fountains,Floor Cleaner,Aux 6"
}

Implemented HomeKit Accessory Types

Air Temperature

  • TemperatureSensor accessory (Air) indicating the ambient temperature where thee screenlogic hardware is located

Pool

  • TemperatureSensor accessory (Pool) indicating the ambient temperature of the pool (last known temperature if pool isn't running)

Spa

  • TemperatureSensor accessory (Spa) indicating the ambient temperature of the Spa (last known temperature if pool isn't running)

Circuits

  • creates a Switch accessory for each discovered circuit (i.e., Pool, Spa, Jets, Pool Light, Spa Light, etc)

Pool Heater

  • Thermostat accessory with ambient temperature, mode control (heat/cool/auto/off), and target temperature control. See also Note on Pool/Spa Heater below.

Spa Heater

  • Thermostat accessory with ambient temperature, mode control (heat/cool/auto/off), and target temperature control. See also Note on Pool/Spa Heater below.

Light Colors

  • Light Colors accessory with multiple switches for setting a light mode/color. See also Note on Light Colors

"On" State

Pool and spa heaters do not turn the pool and/or spa on or off, they just change the heat mode.

i.e., if you want to heat the spa, you need to do two things:

  1. turn on the Spa (via the Spa Switch)
  2. make sure the Spa Heater is set to something other than off (most likely Heat)

This should work well in practice though, as you will generally have a set target temperature and mode, and then just turn the spa on/off without mucking with the thermostat.

This also means that even if the Pool/Spa is turned off and you open the Pool/Spa Heater it mght say "HEATING TO". It will not actually being heating unless the corresponding Pool/Spa switch is turned on.

Note on Light Colors

The light color commands (for modes and colors) are exposed as switches in HomeKit if you enable createLightColorSwitches (it is false by default).

Semantics

Since I don't have the ability to query the current state of which color/mode is active (Screenlogic app doesn't show it either), I implemented the following behavior:

  1. light mode/color switch is turned on (i.e., Pool Mode Sunset)
  2. light command is sent to Screenlogic controller
  3. after a few seconds, the same switch is turned off to give feedback that the command was sent
  4. all pool/spa lights will be turned on (if they aren't already), and set to that mode/color. This is done by the screenlogic controller itself.

Single Tile

Instead of cluttering the room with a bunch of switches, they are all shown in HomeKit as a single accessory called "Light Colors". Tap on the tile to expand, and then turn on the individual switch for the desired mode/color.

If you'd like to show them as separate tiles, you can tap the gear icon at the bottom of the expanded tile (or slide up at the bottom) and then select "Show as Separate Tiles". If you are showing as separate tiles and want to revert back to a single tile, you can select any switch and then select "Show as Single Tile"

Renaming

While showing the light switches as separate tiles, you can rename them if desired, which will let you pick a different name to use with Siri. After renaming you can then show as a single tile again if you'd like.

Siri

You can set a mode/color by saying the mode/color name:

  • "Hey Siri, turn on pool mode sunset"
  • "Hey Siri, turn on pool color blue"

Which will set the selected mode/color and turn on all the lights if they aren't on.