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-mysqueezebox-alarmclocksensor

v0.0.4

Published

Squeezebox alarm clock sensor plugin for Homebridge

Downloads

18

Readme

homebridge-mysqueezebox-alarmclocksensor

npm version

Squeezebox alarm clock sensor plugin for Homebridge.

Features

This plugin creates a sensor accessory based on Squeezebox alarm time. This allows you to perform any automation workflow you want when you alarm clock is about to ring (from iOS Home App for instance). I personally use it to kick in my heating system (Nest Thermostat) so that my home is warm when I get up (it motivates me to get out of bed for catching up that 6:30am plane).

When an alarm is about to be triggered (e.g. 30 minutes before / configurable window_minutes), the sensor will be "switched on". The sensor will switch back to initial state once the alarm time has passed. In order to determine sensor status, your Squeezebox's alarms states (on/off and schedules) are polled on a frequency defined by the poll_cron parameter (by default every 5th minute from 5am through 10am).

NOTE 1: This plugin is, by design, meant to be configured through the MySqueezebox.com. I did not want to install a local Logitech Media Server (LMS).

NOTE 2: I use Apple HomeKit Automation feature to setup the action to be performed once the sensor is ON. You will need an Apple TV 4 or an iPad that stays at home. See HomeKit Automation requirements.

NOTE 3: Squeezebox product line is discontinued by the manufacturer (Logitech). However, I still love the product and have not yet found an alternative smart alarm clock that stands comparison (design, multiple alarms, standalone / no phone required).

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-mysqueezebox-alarmclocksensor
  3. Sign up for an account on MySqueezebox
  4. Update your configuration file. See sample-config.json snippet below.

Configuration

| Key | Default | Description | | --- | --- | --- | | accessory | N/A | Must be set to "MySqueezeboxAlarmClockSensor".| | name | Squeezebox Alarm Sensor | Name of accessory.| | playerid | N/A | The MAC address of your Squeezebox. You can find it from MySqueezebox.com under Player section: Player MAC Address.| | poll_cron | /5 4-9 * * * | The Cron expression defining the frequency for polling alarms status. e.g. "/5 5-9 * * *" will poll alarms at every 5th minute from 5am through 10am.| | window_minutes | 30 | When polling alarms, if an alarm time is defined within this many minutes, the sensor will be triggered.. | | sensor_type | c | Currently either "m" for motion sensor or "c" for contact sensor.| | email | N/A | Your mysqueezebox.com email account.| | password | N/A | Your mysqueezebox.com password account. Note that MySqueezebox website sends your email and password in clear text. Don't use any password you care about.|

Configuration sample:

{
  "accessories": [{
		"accessory": "MySqueezeboxAlarmClockSensor",
		"name": "Squeezebox Alarm Sensor",
		"playerid": "00:11:22:33:44:55",
		"poll_cron": "*/5 4-9 * * *",
		"window_minutes": "30",
		"sensor_type": "c",
		"email": "[email protected]",
		"password": "squeezeboxpassword"
	}]
}

Known issues

MySqueezebox cookies last for a year; the plugin doesn't attempt to deal with cookie expiration or re-login.

Credit

I took large inspiration from homebridge-mysqueezebox plugin. nriley deserves credit for that, thank you big times!