Showing posts with label LIFX. Show all posts
Showing posts with label LIFX. Show all posts

Saturday, 6 January 2018

Lifestyle for LIFX and LIFXstyle - what's going on?

This post has the relevant keywords in the title for the benefit of anyone who uses Google to find clarification.

For some years now (since Oct 2014) my app for controlling LIFX bulbs has been called LIFXstyle (pronounced Lifestyle by me but no-one else would know that and is free to say it how they like). Incidentally it's based on Hue-topia (for Philips Hue bulbs) which goes back to 2013.

I started the year with some optimism, as you do, determined to spend the time and jump through the hoops and publish more of my apps on the Mac App Store. This 'can-do' attitude was quickly knocked into touch after two rejections of this app (technically one 'more information' and one rejection). One of the reasons for rejection was the name.

It's frustrating to be faced with an imperative to change the name of something so well-established (and well-selling). So I'm not changing the name of the version sold outside of the Apple Store, unless LIFX themselves complain, which they haven't to date.

"XXXX for LIFX" was the format suggested by Apple in the rejection. The rejection was under their 'copycat' policy, I guess it was too similar to "LIFX" which is the name of LIFX's own app. Anyway, of course I went with their suggestion, keeping the new name as similar as I possibly could to the original name of my app.

That's the reason why the version available for web download is called LIFXstyle and the version on the App Store is called Lifestyle for LIFX
SaveSave

Monday, 1 January 2018

Drag and drop colours from and to LIFX and Hue bulbs

If you're an existing user of LIFXstyle or Hue-topia you may think "that's not new". Versions 1 and 2 did allow you to drag colours around but with version 3 and much new functionality, the drag and drop has been missing.
The drag and drop does now carry the warmth / colour temperature value. (And of course brightness and saturation.) So if you've found a nice setting for one lamp, whether that's white with a little warmth or a full-on colour, you can drag the colour to other lamps / groups / locations.

This will be in Hue-topia 3.0.9 and is already released in LIFXstyle 3.1.1

Tuesday, 19 December 2017

How a LIFX Z strip looks behind stained glass

Here's a personal story; I was a stained glass artist for some years and have a few pieces in my home and office now.

LIFX have recently released their 'Z' multizone light strips. I must admit that at first I thought it was a bit of a novelty. I bought some because I had to add support to PeacockMedia's LIFXstyle app.

After playing around a bit and trying strips in various places, I tried lighting this particular stained glass panel in my office. I tried various placements before I tried sticking a metre of the stuff behind the thick vertical line down the middle.

 And here's how it looks after putting it back up and switching on:
It really works well, I'm chuffed to bits with it. But even better than that - you can change the light from warm white to cold white, and all the colours of the spectrum:


 At first, LIFXstyle (v3.0) was capable of switching the entire strip to the same colour / brightness. One of the great features of the lightstrip is that it's divided into 'zones' (hence Z, multizone). After a little work on LIFXstyle we were dialling up different colours / settings for each 'zone'.
 Version 3.1 allows you to mess around with colour and save the settings you like as a preset, apply cycling effects to the whole strip or parts of it. (An early version of 3.1 will be available very shortly.)

Finally, because I can't resist another picture, here are some pretty pastels.



Thursday, 6 July 2017

Effects Designer for LIFX and Hue bulbs

Here is the first look at a new drag and drop lighting effects designer for our Hue-topia and LIFXstyle light controllers.



You'll be able to create more sophisticated versions of the false dawn / dusk or go the whole hog and create a 24hr daylight simulator (blue hour / golden hour etc)

And you'll be able to get creative and design mood effects such as flickering fire, colour cycling for party effects or mood.

I think all bases are covered, you can set the length of the whole cycle from 1s to 24hrs, whether it's 'one shot' or loops, the length of the transitions.

You can apply effects to a single bulb, groups or rooms, manually or on schedule.

This feature is now in version 2.0 (beta) of  LIFXstyle and Hue-topia

Wednesday, 18 November 2015

LIFX - see your schedules as a gantt chart

LIFXstyle gives you some very powerful tools for scheduling your lamps. Schedule individual lamps, groups to switch on, off or change colour. Set up presets and trigger those on schedule.

With a number of schedules set up (possibly overlapping) it's difficult to see exactly what's going to happen. Or if a lamp doesn't behave as expected, the reason may not be obvious.
Viewing your schedules as a gantt chart should help. View a day (24hrs) or a whole week. Click a block (either to the left or the right) to see the particular schedule which is responsible at that point.

This chart is now in alpha testing. If you'd like a copy for beta testing ahead of the main release, please get in touch.

Thursday, 19 March 2015

Panic button for switching on connected bulbs

Problem: There have been occasions when I've been woken up in the middle of the night by a sound, maybe something innocent, but it hasn't always been. In a half-asleep state I want to be able to reach out and hit a button to switch on all of my lights.

I have many connected bulbs, some LIFX, some Hue, so this shouldn't be a big deal.

Here are the options I can think of:

iPhone: This is the most obvious solution, but is actually the most clumsy. There are two apps I have to get into to switch on all of my lights. (Though I could make a single app to do this.) From a locked state that's a lot of pressing and tapping, and doesn't touch-ID always fail to work when you most need it to? It's certainly a long way away from simply reaching out and fumbling for a big 'on' button.

A great solution would be to make an app that would respond to the phone being picked up and shaken. Can an iOS app respond to a shake from a locked state? I don't think so. This solution might work but would probably need the phone to be 'armed' at night by bringing the app in question to the front and turning auto-lock off.

Hue Tap: This is exactly the kind of solution I'm looking for, but a/ it would only operate my Hue bulbs and b/ they're fifty quid. Seems a bit much for four programmable buttons purely dedicated to the Hue bulbs.

Laptop: I usually have one within reach when I'm asleep. In theory this is pretty slick - reach out for it, lift the lid and hit one of the F keys that I've programmed to mean 'all on'. In practice it takes more seconds than you'd think to fumble for it, lift the lid, wait for it to connect to the wireless network before hitting the key. (When you wake up in the early hours, it's almost painful to squint at a screen.) It would be possible to leave the laptop close to the bed with the lid open and prevented from going to sleep but again this requires some bedtime preparation.

Some kind of bluetooth button: Here we're getting closer, I believe it'll be feasible to buy a cheap bluetooth device pair it with the computer (I didn't mention that I have an 'always on' mac looking after various household things) and write an app to receive that button press and toggle the lights on / off

That last option reminded me of this:

It was under my desk covered in dust. (I love the old white extended keyboards with big clunky keys). It's essentially a bluetooth controller with loads of programmable buttons. Even better is that LIFXstyle and Hue-topia can already respond to F-key presses, with or without a modifier key.

Here's how to get things set up:

1. pair the keyboard with the 'always on' mac

2. set the f-keys to work as f-keys without pressing the fn key (System Preferences > Keyboard)

3. in Hue-topia and/or LIFXstyle, go into Preferences>Hotkeys and choose which presets you want to trigger with each F key.

That's it - I can reach out and bash one of the first few f-keys. A single keypress triggers a preset in both apps. (I've assigned the first couple of F keys to the same 'all on bright' preset). Other f-keys trigger other presets including 'all off'. It works beautifully, immediately and from anywhere in the house, and even outside.

Next steps:

One of these:
It could be fastened to the wall within reach of the bed. These can be had for much less than a Philips Tap, also much more versatile - it also has plenty of other keys for controlling other things in the future. (Any future app could listen for any of the keys on this keypad). LIFXsyle and Hue-topia would need an enhancement for assigning those high-number f-keys (this improvement is already on the enhancement list.)

Are there other wireless ways of triggering lights / sending a message to a mac that I've not considered? As always, I'll be grateful for thoughts in the comments.

Sunday, 7 December 2014

Scripting to create effects with your Hue / LIFX bulbs

This tutorial uses Hue-topia (for Philips Hue bulbs) or LIFXstyle (for LIFX bulbs)

It also uses Applescript. Code is provided below (which you'll be able to modify and develop) and you'll need Applescript Editor which you'll find on your Mac.

This previous article explained how to send a command to switch to a named preset. As from version 1.4 of LIFXstyle and v1.8.1 of Hue-topia it's also possible to read and set the state of individual bulbs or groups (on/off, hue, brightness, whiteness) from a script.

Accessing a bulb / group

To get started, type:

tell application "LIFXStyle"
# or tell application "Hue-topia"
get properties of first lamp
end tell

The result should be something like:

{class:lamp, hue:39, whiteness:225, brightness:225, title:"Living A", identity:"d073d500cc1c", state:true}


You can access a bulb / group by its name or ID. We're using name here (actually called  'title' when scripting). But of course you can easily change this, so to futureproof your script, you might like to use the ID instead (actually called 'identity' when scripting). You can find the identity of a bulb by using the example above.

To access a particular bulb, use something like:

properties of first lamp whose title is "Living A"

(Obviously one of my lamps is called 'Living A' - change that for the name of one of your lamps) 

lamp  is one of your lamps
group  is one of your groups
lamps  gets you a collection containing all of your lamps
groups gets you a collection containing all of your groups

Accessing individual bulbs within a group 

(since HT v1.8.2 and LS v1.4.1)  group contains lamps so:

        set collectionOfLamps to a reference to lamps of (first group whose title is "AllBarSecurity")
        set brightness of first item of collectionOfLamps to 80

Changing the colour of a bulb

This example switches the bulb on and sets the colour to red:

set state of first lamp whose title is "Living A" to 1
set hue of first lamp whose title is "Living A" to 0  # zero is red
set whiteness of first lamp whose title is "Living A" to 0


Note a lamp must be on when you send hue, whiteness or brightness, otherwise the instruction will have no effect. That's just the way the bulbs work. 

Note also that the state being off isn't the same thing as the brightness being 0 (LIFX bulbs fade right down to nothing with the state still set to on. Hue bulbs' minimum brightness is still quite a bit of light.)

whiteness, brightness and hue can be an integer between 0 and 255. state is a boolean so can be true/false or 0/1

Some approximate colour values:

Red: 0
Green: 85
Blue: 170
Yellow: 32
Orange: 20
Purple: 200

Loops and pauses 

All the usual Applescript program flow applies here. The script below will cycle all of your lamps randomly red, green and white. (Perfect for Christmas)

tell application "LIFXStyle"
#or tell application "Hue-topia"
repeat
set n to (number of items in lamps)
set i to (random number from 1 to n)
set whiteness of lamp i to 0
set hue of lamp i to 85 # green 
delay 0.5
set i to (random number from 1 to n)
set whiteness of lamp i to 0
set hue of lamp i to 0 # red 
delay 0.5
set i to (random number from 1 to n)
set whiteness of lamp i to 255 # white 
delay 0.5
#press cmd . to stop
end repeat
end tell


This script cycles a given lamp through the whole colour spectrum:

tell application "LIFXStyle"
# or tell application "Hue-topia"
repeat
repeat with hueValue from 0 to 255
set (hue of first lamp whose title is "Living A") to hueValue
delay 0.1
end repeat
end repeat
end tell

For more documentation see AppleScript Editor's File > Open Dictionary... (choose LIFXstyle or Hue-topia)

If you write a cool script, do share.

Wednesday, 16 April 2014

Connected bulbs - a comparison of Philips Hue and LIFX

I'm making this comparison because I'm responsible for OSX apps that control Philips Hue bulbs and I hope to shortly have available two apps which will control the new LIFX bulbs.[edit]LIFXstyle for Mac is now available. I'm now using both types of bulbs in my home and don't favour one brand or the other, although there are pros and cons on both sides which I hope to list below.


The first thing to notice is that the LIFX bulb is physically larger than the Philips bulb. This means trouble fitting certain shades and lamps, but then the Philips bulb is also larger than a regular household bulb (if there is such a thing any more) and I've had trouble fitting those into certain lamps, especially with a screw/bayonet adaptor (more of that later).

Once fitted and switched on, the next noticeable thing is the brightness. The Hue bulbs go to around 600 lumens, and run up to 9W. The LIFX ones go to 17W and 1000 lumens (these are maximums, the actual power and brightness will of course depend on your colour and brightness settings).

Also worth a mention is that the Philips bulbs only come with an edison screw cap (ES). For UK users, this means either buying a fitting which takes screw-in bulbs, or buying an adaptor separately. I found these in a local electrical shop so no problem there but the adaptor does add to the overall height of the bulb. The LIFX bulb is available in bayonet (BC), so more convenient for UK users, as well as screw (ES) and 'downlight'.

LIFX bulbs are 'standalone', ie you just buy a bulb, plug it in and your app connects to it. This is interesting after using the Hue bulbs that require a 'bridge' which helps apps talk to the bulbs. The bridge comes as part of a starter kit with three bulbs, after that you buy individual bulbs. It would be wrong to list the Philips bridge as a con though because it does contain some functionality, for example any schedules that you set up sit on the bridge, so even with your computer off or your iPad away from the house, your lights will continue to operate on schedule.

In both cases there are a few steps to go through to get the lamps set up and your app controlling them. For me this was trouble-free in both cases and I can't say that one was much easier to get running than the other. If anything, the Philips bridge may make things a little more straightforward - you're only required to press the button on the bridge the first time that you run any app that wants to connect to it. and that's it. But in return for this user-friendliness you have got the extra hardware, extra leads to plug in and another power socket taken. The LIFX bulb may have taken a few more clicks to get running, It involves switching wireless networks and entering your regular wifi key to get everything talking. This was straightforward and just a case of following on-screen instructions.

With the bulbs up and running the next big noticeable difference is the colour range. I've seen criticism of the Hue bulbs for the gaps in their colour range. I've developed the app Ambisleeves which changes the colour of bulbs to reflect the album cover of the music currently playing and being displayed by Screensleeves. It's unfortunate that for apps like this, when a primary blue is required, hue bulbs are lacking and a violet-blue is the best they can do. Greens are almost non-existent. I'm not using any kind of measuring equipment, just my eyes, but the difference is obvious. I was very pleased to see the LIFX bulb show a good strong colour all the way around the spectrum. To be fair to Philips, lighting your room with a green light is generally not very conducive to any kind of mood.

Price-wise they're in the same ballpark, although with LIFX you can just buy as many or as few bulbs as you like, with Hue you need the bridge, so your first purchase will be the starter kit and you're paying for the bridge as part of that.

There are naturally some small differences in the way that they function. One that might be of interest is that if you ever use the wall switch, Hue bulbs will forget their previous setting and come on with a default bright white. LIFX bulbs do remember their colour and brightness settings which is a feature I like. In an emergency, you can override to that by using the wall switch to switch on rapidly after switching off which then gives you a bright white light.

If there's anything I've missed, anything you'd like to add or anything you'd like to ask, please use the comments below.



[Edit 27 Oct 2014] I've used both types of bulb in my own home for quite a while now and there's one more thing I'd like to note which will be of interest if you'd like to use the false dawn / false dusk feature. The step between 'off' and minimum brightness is quite a step with Hue bulbs, whereas the LIFX bulbs move much more smoothly from minimum brightness to off.