|
Page 1 of 5
|
[ 66 posts ] |
Go to page: 1, 2, 3, 4, 5 Next |
| Author |
Message |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 iPad Control Page
Hey everyone, I thought I'd share my latest creation with you. Matt and I tend to neglect our own HA systems in favor of, well, doing real work  . This sometimes leads to spousal complaints. In my case, it had to do with controlling the sound in the house and doing reminders. We can do both, but: 1) not on Indigo Touch (only on 2 KPLs) 2) not fully (can't turn on/off zones easily) and 3) having to walk across the house to turn on/off a reminder. Also, I've yet to really do any redesign of my control pages for the iPad. So, here's my new iPad control page. Yes, I managed to get just about everything on there. Attachment:
iPadPage.png [ 184.05 KiB | Viewed 4247 times ]
Here is a design tip for you guys: in Landscape, the iPad's viewable area for a control page is 1024x704. Any bigger and it'll turn on the scroll bars, but if you make it exactly that you'll get a full screen with no scrolling (unless you zoom of course). This was my first design goal - no scrolling. The Audio, Scenes, Devices, and Environment titles plus the section lines are part of the background image. My second design goal was that I wanted the controls to look as closely to iOS controls as possible. This required me to make some new images - I took screen shots of native controls in Interface Builder, pulled them apart and adjusted the transparent areas (around the corners). The result is pretty good I think. Of note: the "Fan On/Fan Off" images and the "Open/Closed" image are toggles - so if you tap on them it toggles the state and switches the graphic. This is interesting because we didn't like that behavior in the native control (toggling) which is what led us to use the undocumented API that caused 1.5 to crash in 4.0. Oh, the irony. For "Off/Cool/Heat/Auto", I took separate screen shots of that segmented control with each section selected, then created 4 different images that represent each mode state. When you tap anywhere on the control, it just cycles through each mode from left to right (and circles back). This seemed a good solution for those since they don't change very often. I then had to decide what to do with my House Mode. Lots of stuff in my house is driven off this one variable: HVAC operation, lights, notifications, etc. I didn't really want to cycle through them like I did for the HVAC Mode. So, I again took a screenshot of the control with each section selected. I then pulled each section apart so that they work independently. When you tap on Company, the house mode switches to Company and the images redraw as appropriate. It was a lot of work, but I really like the result. The third design goal was that I needed to somehow represent the audio zones in the house so we could turn them on/off independently. I use AirFoil to direct sound from my server Mac to all the zones so that I can get iTunes music and spoken announcements (like when timers are up, reminders, calendar events, etc) in any of the zones. Airfoil runs to an Airport Express ("Whole House") which drives speakers in all the common areas of my house (each room has a hardwired volume control), two Apple TVs ("Living Room" and "Bedroom"), and my development Mac in the office. I created those buttons such that they would show the status of those speakers (if one of them is offline, the speaker icon has a red circle with a line through it on top to show that it's unavailable). Each zone is based on a variable that my Airfoil sync script keeps updated based on Airfoil's state. I also have an Airfoil attachment script that lets me toggle speakers (zones) on or off. The buttons at the top Play/Pause, Previous Track, Next Track, iTunes volume up and down. I still need to figure out how to get playlist selection working in a good way, but I think that's special enough to warrant a separate page. I'll let you know what I come up with. Things I'm not happy with: I don't think I like the different icons for the devices - I was trying to indicate relay vs dimmer, but I'm not convinced that's a necessary distinction. I may switch to all ON/OFF icons or maybe just make each a button (like the timer buttons for instance) that just show gray when off and green (or maybe iOS blue) when on. Also, the Devices section feels a bit like a willy-nilly gathering of stuff. I might take another organization pass at that. I was trying to use distance to distinguish devices that were in the same room, but I think it just makes it look messy. That's pretty much it. Next up - design an iPhone version (although it isn't TOO bad to zoom and scroll this page on an iPhone so I probably won't do it for a while yet - need to get back to that real work I was talking about earlier). I'll probably make it portrait and just long so you only have to scroll down to get to all the parts. I think each of the sections in this version cold probably be easily moved into a vertical orientation pretty easily.
_________________ Jay (Indigo Support)
|
| Wed Jun 30, 2010 5:42 pm |
|
 |
|
gregjsmith
Joined: Apr 01, 2003 Posts: 823 Location: Rio Rancho, NM
|
 Re: iPad Control Page
Nice write up. I don't think we have heard much about your (the developers) set up.
_________________ Greg In The Desert
|
| Wed Jun 30, 2010 7:01 pm |
|
 |
|
Korey
Joined: Jun 04, 2008 Posts: 118
|
 Re: iPad Control Page
jay wrote:Hey everyone, I thought I'd share my latest creation with you. Matt and I tend to neglect our own HA systems in favor of, well, doing real work  . This sometimes leads to spousal complaints. In my case, it had to do with controlling the sound in the house and doing reminders. We can do both, but:
Very nice work! Looks great! Any chance of posting your applescripts and related bits as an starting design point? I have been having a hard time getting applescript to control volume up / down via airfoil and would love to see your scripts. Korey
|
| Wed Jun 30, 2010 8:47 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: iPad Control Page
I don't control volume via Airfoil at the moment - just via iTunes. I'm using "System Audio" as the input option in Airfoil and Soundflower to output all sound from my server to the zones so I don't have to worry about switching audio sources between iTunes/PlaySound/IndigoServer whenever I need something else to make noise. In effect, when I adjust volume, it's only iTunes volume that's being changed.
I do have the Airfoil sync and attachment scripts that I'll eventually get cleaned up and added to the file library but it won't have any volume stuff in it.
_________________ Jay (Indigo Support)
|
| Thu Jul 01, 2010 7:09 am |
|
 |
|
jenwill1
Joined: Mar 22, 2009 Posts: 61 Location: Kingwood, Texas
|
 Re: iPad Control Page
Jay,
Great looking control page.
Can you give me a clue on how your thermostat mode buttons are made/work ?
Thanks !
|
| Sat Jul 03, 2010 7:19 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: iPad Control Page
The third paragraph after the picture describes how I made the images and how it works - do you have specific questions?
_________________ Jay (Indigo Support)
|
| Sat Jul 03, 2010 7:25 pm |
|
 |
|
jenwill1
Joined: Mar 22, 2009 Posts: 61 Location: Kingwood, Texas
|
 Re: iPad Control Page
I understand developing screen shots for each one and assume that you have different .png files with the blue action highlighted. I am not sure how it rotates thru each option, changes the .png file and takes the appropriate action to the thermostat. May be difficult to describe in a short response.
Maybe a screen shot of the settings while editing the button would be helpful.
Thanks
|
| Sun Jul 04, 2010 10:11 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: iPad Control Page
You're correct - separate PNGs for each state (off, cool on, heat on, auto on). I'd share the images, but I suspect it might violate some copyright or something - but it's easy enough (if time consuming) to do it yourself in Interface Builder. Changing the image out is done using the image selection heuristics built-in to Indigo. So step one is to create 5 images, named "HVAC Mode+.png", "HVAC Mode+all off.png", "HVAC Mode+auto on.png", "HVAC Mode+cool on.png", and "HVAC Mode+heat.png". Note that the first two are identical images and both are required (we have a little bug in the image selection heuristics that if fixed would remove the need for "HVAC Mode+all off.png"). Next, create one control per thermostat configured like this: Display: is set to Device StateFor: is set to your thermostat, and the next popup is set to Current ModeAs Image: is selected and set to "HVAC Mode+.png" No Caption: or Client action:Finally, to get the mode to cycle between the states, you set the Server action: to execute the following AppleScript: - Code: Select all
if hvac mode of device "THERMOSTAT NAME HERE" is offMode then set hvac mode of device "THERMOSTAT NAME HERE" to coolOn else if hvac mode of device "THERMOSTAT NAME HERE" is coolOn then set hvac mode of device "THERMOSTAT NAME HERE" to heatOn else if hvac mode of device "THERMOSTAT NAME HERE" is heatOn then set hvac mode of device "THERMOSTAT NAME HERE" to heatCoolOn else set hvac mode of device "THERMOSTAT NAME HERE" to offMode end if
In short, the image is selected based on the current mode of the thermostat, and the AppleScript cycles through each mode when the control is clicked/tapped. When the mode is changed, the image is updated.
_________________ Jay (Indigo Support)
|
| Sun Jul 04, 2010 11:17 am |
|
 |
|
jenwill1
Joined: Mar 22, 2009 Posts: 61 Location: Kingwood, Texas
|
 Re: iPad Control Page
I can work with that. Have a good holiday !
|
| Sun Jul 04, 2010 12:12 pm |
|
 |
|
jenwill1
Joined: Mar 22, 2009 Posts: 61 Location: Kingwood, Texas
|
 Re: iPad Control Page
After the holiday.....
I tested this with a simple button to turn a scene on and off using a variable with applescript. On browser preview the button changes colors, on the ipad is doesn't.
The color is gray for false and green for true. On the ipad the color is always green ?
|
| Sun Jul 04, 2010 2:59 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: iPad Control Page
I suspect you're experiencing the iPad/iPhone delay problem. It's caused by one of two things, which can be remedied by doing:
1) Turn off bluetooth - there's an iOS bug where having bluetooth enabled conflicts with wifi (and especially bonjour). 2) Turn off "Enable Stealth Mode" on the advanced firewall settings (on the Indigo Server Mac), which also disables bonjour.
_________________ Jay (Indigo Support)
|
| Mon Jul 05, 2010 4:23 pm |
|
 |
|
jenwill1
Joined: Mar 22, 2009 Posts: 61 Location: Kingwood, Texas
|
 Re: iPad Control Page
Negatory on both.......
I did some more digging. Problem was the variables were False and not false. I keyed the first variable values in by hand.
Works fine now. Not sure why the browser liked it and the Ipad didn't.
Thanks Jay
|
| Mon Jul 05, 2010 5:12 pm |
|
 |
|
hamw
Joined: Mar 31, 2008 Posts: 738
|
 Re: iPad Control Page
Wow, that looks great. Is it possible to add your buttons to the indigo control page pulldown button menu?
|
| Wed Jul 07, 2010 8:36 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: iPad Control Page
jenwill1 wrote:Problem was the variables were False and not false. I keyed the first variable values in by hand.
That's actually a bug in IWS - variable values should be case sensitive, although with true/false, which represent a boolean value, it's a bit more tricky. If variables were typed, that would be different. We'll decide for 5.0 which is the correct behavior and fix one or the other... 
_________________ Jay (Indigo Support)
|
| Wed Jul 07, 2010 8:46 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6642 Location: Austin, Texas
|
 Re: iPad Control Page
hamw wrote:Wow, that looks great. Is it possible to add your buttons to the indigo control page pulldown button menu?
I'm afraid that adding them might be in violation of Apple copyrights - it's unclear. And being unclear is enough for me to avoid it. As I said above, creating the buttons isn't that hard - just install Xcode, use Interface Builder to create the buttons, and take a screen shot. The only adjusting you have to do is around the corners. It's time consuming, but not hard. I'll discuss with Matt to see what his thoughts are about copyright issues - maybe he's more comfortable with it. If so, we'll consider adding them in 5.0.
_________________ Jay (Indigo Support)
|
| Wed Jul 07, 2010 8:51 am |
|
|
|
Page 1 of 5
|
[ 66 posts ] |
Go to page: 1, 2, 3, 4, 5 Next |
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|