Wednesday, 31 December 2014

iPhone IP Camera - feeling testy?

Would you open the door to this dodgy-looking character?


This is iPhoneIPCamera being used as a door viewer / security camera - it's close to being ready for release. 

I'm thinking of giving the App Store's 'Test Flight' a whirl. If you're interested in being a tester, please email or pm me your email address (Test Flight only caters for iOS8, although the final release will work on earlier systems.)

Saturday, 27 December 2014

New Year offer, Scrutiny 50%

Flagship application, Scrutiny, suite of webmaster tools, is used by larger organisations and individuals alike. (Read more about Scrutiny here) It seems fair to give the smaller businesses the opportunity to buy at a more affordable price.

This offer is now closed.



Why not download now and take advantage of the free and unrestricted trial? Any questions - ask Ash: ashley@peacockmedia.co.uk


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.

Thursday, 4 December 2014

Website content audit using Scrutiny

Scrutiny can crawl very large sites and reports a lot of information about your pages and the internal and external links they contain.

If you don't want to buy Scrutiny or can't run it (eg because you don't use Mac OSX) then why not let us do the work and provide the reports?



You can view some sample files here (in html and csv formats) (download them, don't preview, box.com's previews suck).

For more information, contact Shiela or Ashley at support@peacockmedia.co.uk