I have tested new features in the Prowl app on the iPhone. It can now launch custom URLs based on the Prowl Application name. Interesting. If HomeSeer sends application name “doorbell” the app can launch a URL that shows me the last doorbell press image..

 

 

Challenge: You need 2 different URLs to access the system depending on where you are.
Local LAN:      
Public internet:

To solve this I can now point to 1 script running on the internet (you need to be able to access this internally and externally). This script checks where you are (based on IP address) and it will forward the browser to an internal or external URL.

Next, if you have a hosting provider that supports this, you can create a forwarder to this script. Example

doorbell.yourdomain.com –> http://www.yourdomain.com/check_your_location.php

check_your_location.PHP script

[php light="true"]
<?php
// Your external IP address:
$externalIP = “144.121.33.177”;
// URL used when on the internal network:
$internalURL = “http://10.1.1.1/Doorbell.jpg”;
// URL used when on the public internet (not at home):
$externalURL = “http://144.121.33.177:2902/Doorbell.jpg”;

// You should not have to modify the code below
$domain=$_SERVER[‘REMOTE_ADDR’];
$domain1 = isset($_SERVER[‘HTTP_X_FORWARDED_FOR’]) ?
$_SERVER[‘HTTP_X_FORWARDED_FOR’] : $_SERVER[‘REMOTE_ADDR’];

if ($domain==$externalIP) {
header(“Location: $internalURL”);
} else {
header(“Location: $externalURL”);
}
?>
[/php]

 

The updated Twitter script can be found on the Twitter/Prowl script page.


Comments

New Prowl features — 2 Comments

  1. There seems a lot of challenges ahead (the sentence is repeated multiple times) ;-)

    Why a different URL from the Internet and the local LAN, is not it possible to access the same URL from your local LAN as you do from the Internet?

  2. Let me update this post tomorrow. Just noticed that I started it but did not finish it ;-)

%d bloggers like this: