Please login or register.

Login with username, password and session length
Pages: [1] 2 3

Author Topic: Active Phone Tips & Tricks  (Read 99088 times)

anthonylavado

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 198
  • At a position relative to the observer.
    • anthonylavado.com
Active Phone Tips & Tricks
« on: September 24, 2010, 06:59:53 PM »

Hey everyone... I'm taking my post here to make it a sort of guide/sticky for common steps and actions to be taken for Active Phone.
Please continue to use the other thread if you have questions/need help.

Please make sure you try the troubleshooting steps at the bottom of this post, just in case it solves your issue.


Review
Install? AHP 3.278 or newer. No plug-in addition, installs right over your current AHP. The registration code replaces the one for AHP when entered.

So a few things to note now that I have it working:

Good
  • It is exactly as advertised. A Palm Pad remote, but on your cellphone/browser. Works on PCs/Macs/etc.
  • There's an option to turn on Security codes. This is a good thing.
  • It seems to run as a separate component to AHP. I couldn't access right away until I adjusted my Firewall. Even with AHP allowed through, it wouldn't work until I opened up the port.
  • Starts off at housecode A, you must tap/click until you get to the desired housecode. Labels update automatically based off AHP.
  • All functions work, your standard On/Off, Bright/Dim.
  • Goes through whatever interface you have, and the module displays in AHP get updated accordingly.

Concerns
  • Unless you set up a Static IP Address or know your computer's network name, the link can change every time you restart your computer.
  • There are no security options on by default. You can turn one on though. If you want external access, you can try a different external port (with appropriate forwarding settings on the router), but you're still open to the world.
  • Having to move to another housecode manually can be a pain. I'd imagine this could be adjustable in future.
  • No skinning support, but that's a minor gripe.

Potential
  • Don't want to bother setting up your own webserver? This is for you. It's a one touch ready to go option. I already have an internal webserver, secured, on my AHP machine, so this didn't benefit me. This is best for the less technically inclined.
  • It is a regular webpage. You can turn this into a desktop/dashboard widget/module to keep it at hand. Could be very useful. One could make a SSB (Single Site Browser) out of this. It's basically an app that launches only one webpage.
  • After reading the code, there is a way to send direct commands as a URL. More on their structure later.
  • If you know the URLs, then you can control this from any computer in your home. You could make desktop shortcuts that do things. There'll be a browser window open afterwards, but I'm sure it wouldn't be hard to work out a way to close them automatically.


URL Structure

All URLs begin with the IP, and the Port:
http://127.0.0.1:8777/

If you add the AHP folder, you see the PalmPad:
http://127.0.0.1:8777/ahp

If you have security turned on, you'll see an "Xid" code:
http://127.0.0.1:8777/ahp?Xid=0123456789

Actions are performed with a few variables. They get passed after "image?Act=" in the URL. They must be done without "ahp/" in the URL.
Examples:

http://127.0.0.1:8777/image?Act=


If you have the security option, your "Xid" security code MUST go before the action in your URL. This would be something like


http://127.0.0.1:8777/image?Xid=0123456789&Act=

Actions that can be performed:

image?Act=getmodules
- returns a list of Modules (names) and IDs.

image?Act=sendplc
- this is the basis of a PLC command

image?Act=sendcmd
- this is the basis of an RF command

&State=0 OR &State=1 OR &State=2
- as per AHPDev:
0 sends the command.
1 sends a key down and will transmit continously (only useful for bright/dim)
2 sends a key up and cancels a previous key down

&X10Cmd=On
- the command to be sent. This can be:
on
off
dim
bright
alllightson
alllightsoff
alloff

&X10Addr=A1
- the module to be controlled. Standard House Code followed by Unit Number.

Sample URL:
http://127.0.0.1:8777/image?Act=sendplc&State=0&X10Cmd=On&X10Addr=A1

If someone wanted to, they could make their own front end interface for this that sends the appropriate calls. Web page or App, the potential is there, just like Mike Berro did with "Home Control":
http://www.lifelogapp.com/homecontrol/
http://itunes.apple.com/us/app/homecontrol/id366687584

Sending a command returns an XML status:
Code: [Select]
<monitor>
<sendcmd sent="1" queue="0">
</sendcmd>
</monitor>
or when used with State=2
Code: [Select]
<monitor>
<sendcmd sent="1" queue="0">
</sendcmd>
<activecam inst="0" label="(null)"/>
</monitor>

This way the PalmPad page can "flash" the little red LED image.

As per AHPDev, the XML returns are the following:
Quote
sent=1 ==> successful addition to the send queue
queue=0 ==> the current send queue depth in ms.  This is more applicable to older transmitters (like firecracker) than something with much more complex scheduling like the CM15.

Page located in :
C:\Program Files\Common Files\X10\Common\WebApps\PalmPad.html
Images located in :
C:\Program Files\Common Files\X10\Common\Art\

You can customize both the PalmPad.html page and the images in the Art folder to skin/adjust to your liking. Please keep a backup copy of the original files just in case.


HTML File Structure
Images
Images from the "Art" folder are called by the AHP server as "image?Act=image&XAction=DefImage&Idx=58".
As an example,
Code: [Select]
<img src="image?Act=image&XAction=DefImage&Idx=52"></img>Shows the House Code dial at "A".

PalmPad Variables
The PalmPad can be customized to start at whichever House Code you use. Look for the following and adjust accordingly:
Code: [Select]
//PALMPAD VARS
    var houseCode = "A";
If you do change it, in order to avoid visual confusion, you can adjust the PalmPad.html file towards the bottom:
Code: [Select]
  <div id="SwitchPos">
        <img id="SWITCH" src="image?Act=image&XAction=DefImage&Idx=5" USEMAP="#hswitch" />
    </div>
I have it set to "&Idx=5" to show House Code D (as per the "Art" directory). That way I don't get confused when it shows up.

Replacing the images in the "Art" folder and editing the PalmPad.html file will allow you to easily skin the controller any way you like it.

AHP Configuration for Active Phone
Adjust this file only when AHP is closed. Otherwise, your changes will not be saved.
In "C:\Program Files\ActiveHome Pro\" you will find a file called AHP_config.xml which contains options. This can be opened in Notepad or another text editor.
We're looking for one specific line:
Code: [Select]
CellAdvertise="1" CellServerIP="0" CellServerPort="8777" CellUseRandomPort="0"
    CellAdvertise
    Options: 1 or 0
    Function: Not known yet. 1 is default, 0 will make the Active Home Pro splash screen (when you open the program) show up in the corner instead of centered.

    CellServerIP
    Options: 0
    Function: None yet when changed, either using an IP address or numbers.

    CellServerPort
    Options: 8777 or other
    Function: This is the port number used by AHP to serve the PalmPad.html webpage to your phone. This is changeable to just about any port *and* the change is reflected in the "Invite a Cell Phone" option as well as the e-mail sent to your phone.
    Status: Deprecated - See the info on the Registry option below.

    That being said, to change the listened port, make the following registry change and reboot (or restart x10nets and AHP)

    Using regedit, the key is
    HKEY_CLASSES_ROOT\CLSID\{001000AF-2DEF-0103-10B6-DC5BA692C858}\X10\Interface

    Create a new DWORD value XServerPort, and set the value to the port you wish to use.

    On 64 bit versions of windows, use the following key instead:
    HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{001000AF-2DEF-0103-10B6-DC5BA692C858}\X10\Interface

    Reboot and you'll see the new value in the email invite dialog.

    CellUseRandomPort
    Options: 0 or 1
    Function: When set to 1, this option does what it says on the tin. The Active Phone webserver is set to a random port, so unless you know how to find it, don't try it.




    Troubleshooting

    Problems registering ActivePhone and Active Home Pro?
    The registration code you received for ActivePhone replaces your ActiveHome Pro registration code. Enter the one you received in your Active Phone purchase e-mail when prompted after installing.

    1) When I invite a cellphone, I don't get an e-mail with a link.
    • Make sure you check your Spam/Junk folder. It's very common for Active Home e-mails to go there first where you'll never see them.

    2) When I type the address into my phone's browser, the page loads, but I don't see a PalmPad remote.
    • Make sure you've typed in the correct address. It needs to follow this exact structure: http://xxx.xxx.xxx.xxx:8777/ahp
      Note that there is no slash at the end. If you put a slash, it will *not* load properly.

    3) I've typed in the address/clicked on the link in my invite E-mail, but I get an error saying the "Page can not be found/loaded".
    • Some times, with or without reboots, you computer can get a new IP address on your internal network. This makes the previous link stop working. You can:
    _
    • a) Recommended. Use your computer's name in place of the 192.xxx.xxx.xxx IP Address. If on the iPhone, try appending ".local" to the end of the computer name. Example: http://anthonylavado.local:8777/ahp
    • Windows: Go to the Start Menu, right click on "Computer", choose Properties. You'll see your computer name there.
    • Mac OS X: Go to the Apple Menu, click on "System Preferences", choose Sharing. You'll see your computer name at the top.
    _
    • b) Set up a Static IP address for your computer. This must be done on your Router. Consult your Router's support for more information on how to do this.

    4) I can't open the page at all, even with my computer name or IP.

    4b) I STILL can't open the page at all, even with my computer name or IP.
    • Try temporarily disabling your Anti-Virus/Security Software.
    • If the above still doesn't work, try uninstalling your software and seeing if it loads. Some Security Software (if installed/uninstalled incorrectly) can still lock you up. Check the developer's website for a Removal Tool or "Uninstall Failed" instructions. i.e. Norton Removal Tool, McAfee Removal Tool, "CA Uninstall Failed".


    5) I want to access this page from outside of my house. Can I do this?
    • Yes, you can. This is for advanced users. You can forward the port from your computer using your Router's Port Forwarding settings. Beware unless you turn it on, there is no security for the Active Phone interface, so if you're not careful, others could access your setup.
    • For Port Forwarding advice, visit http://www.portforward.com and see the info for your router.
    • I recommend at least changing the default port used in the registry (see earlier).
    • Just make sure you're typing in the right IP Address away from home.
      The link you get in the e-mail from ActiveHome is for use inside your home network, and won't be the same for external use.Visit this website from home: http://www.whatsmyip.org/
      Then, on your smart phone, you type in the corresponding number. For example, if http://www.whatsmyip.org/ tells you "Your IP Address is 222.222.222.555", the correct address on your phone would be http://222.222.222.555:8777/ahp and should be bookmarked to avoid retyping.
    [/list]
    « Last Edit: November 17, 2010, 12:31:07 AM by anthonylavado »
    Logged
    Follow me on Twitter: @anthonylavado
    Now making guest appearances in the Home Automation Chat Room

    Brian H

    • Community Organizer
    • Hero Member
    • ***
    • Helpful Post Rating: 305
    • Posts: 13295
    Re: Active Phone Tips & Tricks
    « Reply #1 on: September 24, 2010, 07:20:38 PM »

    Thank you for the great write up.  #:)
    Another helpful from me.
    Logged

    -Bill- (of wgjohns.com)

    • Advanced Member
    • Hero Member
    • ******
    • Helpful Post Rating: 81
    • Posts: 1340
    • He's just this guy. You know?
      • wgjohns.com
    Re: Active Phone Tips & Tricks
    « Reply #2 on: September 24, 2010, 09:19:30 PM »

    Thank you for the great write up.  #:)
    Another helpful from me.

    Ditto!
    Logged
    -Bill- (of wgjohns.com)
    bill@wgjohns.com

    In the real world, the only constant is change.

    When I'm online you can find me in the Home Automation Chat Room!

    X10 Dev

    • Sr. Member
    • ****
    • Helpful Post Rating: 19
    • Posts: 125
    Re: Active Phone Tips & Tricks
    « Reply #3 on: September 24, 2010, 10:15:55 PM »

    image?Act=sendplc
    - this is the basis of a PLC command

    Yes, and image?Act=sendcmd sends an RF command.

    &State=0 OR &State=1 OR &State=2
    - this describes the speed of the function. This affects dim/bright only. It does not affect On/Off.
    0 will dim/bright in 10% increments.
    1 will ramp up or down automatically.
    2 does not perform any function I can test at the moment. The resulting XML returns something about ActiveCam, so perhaps it deals with cameras.

    Almost. 
    0 sends the command. 
    1 sends a key down and will transmit continously (only useful for bright/dim)
    2 sends a key up and cancels a previous key down

    &X10Cmd=On
    - the command to be sent. This can be On/Off/Dim/Bright. No other functions known at this time.

    Also alllightson, alllightsoff, alloff

    &X10Addr=A1
    - the module to be controlled. Standard House Code followed by Unit Number.

    Yes.

    Edited to improve clarity by -Bill- (of wgjohns.com)
    « Last Edit: September 24, 2010, 10:51:08 PM by -Bill- (of wgjohns.com) »
    Logged

    anthonylavado

    • Hero Member
    • *****
    • Helpful Post Rating: 23
    • Posts: 198
    • At a position relative to the observer.
      • anthonylavado.com
    Re: Active Phone Tips & Tricks
    « Reply #4 on: September 24, 2010, 10:35:36 PM »

    Thank you for clearing that up! It makes sense now. I'll update the post when I'm not on my iPhone with Active Phone :-)

    Oh, while we have you here, the XML result with sent=1 queue=0?
    « Last Edit: September 24, 2010, 10:38:00 PM by anthonylavado »
    Logged
    Follow me on Twitter: @anthonylavado
    Now making guest appearances in the Home Automation Chat Room

    -Bill- (of wgjohns.com)

    • Advanced Member
    • Hero Member
    • ******
    • Helpful Post Rating: 81
    • Posts: 1340
    • He's just this guy. You know?
      • wgjohns.com
    Re: Active Phone Tips & Tricks
    « Reply #5 on: September 24, 2010, 10:58:16 PM »

    AHP Dev,
    Yes, thanks for the input!
    Long time no hear from X10 programmers!
    A "helpful" from me!
     #:)
    Hope you don't mind too much that I edited your post to make it a little clearer.  ;)
     >!
    « Last Edit: September 24, 2010, 11:02:51 PM by -Bill- (of wgjohns.com) »
    Logged
    -Bill- (of wgjohns.com)
    bill@wgjohns.com

    In the real world, the only constant is change.

    When I'm online you can find me in the Home Automation Chat Room!

    X10 Dev

    • Sr. Member
    • ****
    • Helpful Post Rating: 19
    • Posts: 125
    Re: Active Phone Tips & Tricks
    « Reply #6 on: September 27, 2010, 11:49:19 PM »

    Thank you for clearing that up! It makes sense now. I'll update the post when I'm not on my iPhone with Active Phone :-)

    Oh, while we have you here, the XML result with sent=1 queue=0?

    sent=1 ==> successful addition to the send queue
    queue=0 ==> the current send queue depth in ms.  This is more applicable to older transmitters (like firecracker) than something with much more complex scheduling like the CM15.
    Logged

    FrGuido

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 6
    Re: Active Phone Tips & Tricks
    « Reply #7 on: November 09, 2010, 03:59:18 PM »

    Concerning your statement:
    3) I've typed in the address/clicked on the link in my invite E-mail, but I get an error saying the "Page can not be found/loaded".

        * Some times, with or without reboots, you computer can get a new IP address on your internal network. This makes the previous link stop working. You can:

    _

        * a) Recommended. Use your computer's name in place of the 192.xxx.xxx.xxx IP Address.
        * Windows: Go to the Start Menu, right click on "Computer", choose Properties. You'll see your computer name there.

    Where on the iPhone would you enter the computer name to avoid the changing IP addresses?

    Thanks,
    Fr Guido
    Logged

    anthonylavado

    • Hero Member
    • *****
    • Helpful Post Rating: 23
    • Posts: 198
    • At a position relative to the observer.
      • anthonylavado.com
    Re: Active Phone Tips & Tricks
    « Reply #8 on: November 09, 2010, 05:58:01 PM »

    @frguido:

    You would put it into the Address Bar.
    Example -
    When you open Safari, instead of putting:
    http://127.0.0.1:8777/ahp

    You would put:
    http://ComputerNameHere:8777/ahp
    Logged
    Follow me on Twitter: @anthonylavado
    Now making guest appearances in the Home Automation Chat Room

    FrGuido

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 6
    Re: Active Phone Tips & Tricks
    « Reply #9 on: November 10, 2010, 01:20:40 PM »

    I'm probably off base here but I would normally put in (as issued by Active Home Pro) http://192.168.0.x:8777/ahp. When I put http://Bobs1150:8777/ahp in Safari, it tells me the server stopped  responding.
    Logged

    FrGuido

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 6
    Re: Active Phone Tips & Tricks
    « Reply #10 on: November 11, 2010, 01:27:38 AM »

    I'm not sure what prevents me from using http://computername:8777/ahp on my iPhone. It works great from my laptop either with an Ethernet connection or a wireless connection. Is there something in the phone's system that would prohibit sending that full url? I'd really love to make this work ... the changing IP address requires that I constantly go back to the ActiveHome Pro program and have it give me a new connection address.
      Thanks,
    Bob Mansfield
    Logged

    anthonylavado

    • Hero Member
    • *****
    • Helpful Post Rating: 23
    • Posts: 198
    • At a position relative to the observer.
      • anthonylavado.com
    Re: Active Phone Tips & Tricks
    « Reply #11 on: November 11, 2010, 01:51:05 AM »

    I'm not sure what prevents me from using http://computername:8777/ahp on my iPhone. It works great from my laptop either with an Ethernet connection or a wireless connection.
    1) Is the laptop the same computer that you're using for AHP? If so, try it from any other computer on your home network.
    2) If it's working from other computers in your home, it should work on your iPhone. You mentioned that it was working with the IP Address. I'll assume that means you're connected to your Wireless Router with your iPhone?

    3) What security software do you have installed on your computer? What operating system is it running? (Windows XP, Vista, 7)
    Logged
    Follow me on Twitter: @anthonylavado
    Now making guest appearances in the Home Automation Chat Room

    FrGuido

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 6
    Re: Active Phone Tips & Tricks
    « Reply #12 on: November 11, 2010, 04:44:48 AM »

    OK ... you're right ... the laptop I used IS the one with ActiveHome Pro. I'm on an old Dell with a Celeron processor, Windows XP, sp3, running Sunbelt's VIPRE antivirus. But I can access from another computer that's on my wireless connection as well. Why, if my iPhone will connect using http://192.168.0.x:8777/ahp won't it connect using http://bobs1150:8777/ahp like the other computers that are on my wireless network? By the way, I appreciate your time helping me ... Thanks!
    Bob
    Logged

    anthonylavado

    • Hero Member
    • *****
    • Helpful Post Rating: 23
    • Posts: 198
    • At a position relative to the observer.
      • anthonylavado.com
    Re: Active Phone Tips & Tricks
    « Reply #13 on: November 11, 2010, 11:38:16 AM »

    Why, if my iPhone will connect using http://192.168.0.x:8777/ahp won't it connect using http://bobs1150:8777/ahp like the other computers that are on my wireless network?

    I think I got it now. My guide suggests using the computer name, when other devices can "resolve" that Computer Name. That means taking the NetBIOS Computer Name, talking to the router, and figuring out what IP Address it belongs to.

    Regular computers can do this without issue, but mobile devices (like our iPhones) don't recognize this by default. Some Routers will take care of doing the "translation" of Name to IP Address for you (for example, mine does this, and so do several others). Some models don't.

    Now that we know what the issue is, a few steps/suggestions:

    1) Try using http://bobs1150.local:8777/ahp on your iPhone, and see if that connects.
    2) If the ".local" part doesn't work, try installing "Bonjour Print Services for Windows" from Apple: http://support.apple.com/kb/DL999
    3) To avoid any future connectivity issues, check your Router's documentation/manual to learn about setting up a "Static IP Address". This means that your router will always give your computer one IP address, regardless of how many times it's rebooted or reconnected.

    Let me know how this goes! I'm eager to solve this challenge.
    Logged
    Follow me on Twitter: @anthonylavado
    Now making guest appearances in the Home Automation Chat Room

    FrGuido

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 6
    Re: Active Phone Tips & Tricks
    « Reply #14 on: November 11, 2010, 05:17:49 PM »

    Anthony,
      I, too, am anxious to try that out. I'll not be able to try it until next Wednesday or so. It still seems odd that any other computer in my house can access the site using "MyComputerName" and the little iPhone can't. I am using an iPhone 3G with v4.1 software and 05.14.02 Modem firmware.
      I'll get back to you when I know how it works. Thanks again!
    Logged
    Pages: [1] 2 3
     

    X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
    © Copyright 2014-2016 X10.com All rights reserved.