Author |
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: January 14 2009 at 21:57 | IP Logged
|
|
|
Just wanted to say THANKS to everyone that has helped me
struggle thru the pains and arrows of ph-macro
construction.
A week ago I undertook a major effort to create a CC
center that would allow me to control lights and furnace
from my iPhone while we were traveling, as well as
enable/disable SMS and email messages to my phone when
the security cameras detected motion.
As of a few moments ago it all works! Of course it will continue to improve over the weeks ahead, but at least I've got pretty decent functionality for the moment.
I want to add sliders for the dimmable lights. Right
now I've just got them controllable to On/Off states.
The furnace, however, is nicely controlled to specific
or variable settings.
The 3 Heat/Cool buttons set specific (normal) settings,
but can be modified with the up/down arrows on the right
by 1 degree per tap. To save window space, instead of
posting text to indicate furnace mode, I changed the
colors of the up/dwn arrows with gray being off, red
being Heat, and blue for Cool.
The 4 buttons on the upper left set/clear enablingflags
that send SMS messages to my cell phone, or emailwith an
attached image from the camera that detected motion.
This allows me to have as much or little alerting as I
need.
Anyway. Long story, short.
I'm growing to love PH more and more with every passing
day. It IS THE SOLUTION I have been looking for for
years.
Kudos to all of you that make it all so very possible
with your support in this forum!!!!
A Post Script on the Control Center. Instead of adding lighting sliders, with all the complexity associated with that approach, I found from experimentation that only a few discrete levels were really required for practical lighting control. Accordingly I implemented six 15% steps that have worked out very well. The results looks like this...
Edited by GadgetGuy - May 31 2009 at 19:50
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 14 2009 at 23:38 | IP Logged
|
|
|
Great job!
Good thinking on the arrow color idea.
Edited by TonyNo - January 14 2009 at 23:39
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: January 15 2009 at 09:17 | IP Logged
|
|
|
I was thinking (in the middle of the night which is when
I get the best brain farts) that instead of lighting
sliders, I can do the same thing that I did for the
furnace (to keep things really visually simple).
Adding a single up/dwn incremental control (say 10%
increments) I could tap a light to turn it on/off and
then tap the incremental control to change the light
setting. By logging out the last CC button tap to a
Global Var I can remember the last button tapped, and
use that device name in the Insteon control. If a light
is not full on or off then I can post an intensity
(Static Global Var) level over the light control button
so the lighting value is visible.
While this is not as perfect as a full slider panel, it
offers a lot of control in a compact configuration.
If it works, I'll post the results.
======
See the results of this effort, that worked better than expected, at the end of the first post herin.
Edited by GadgetGuy - June 01 2009 at 07:47
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: January 15 2009 at 12:18 | IP Logged
|
|
|
Looks great. I haven't forayed into video yet. What
kind of cameras are you using and how do you like them?
As to sliders for lights, I put in a lot of effort a
while ago to implement this. While it works well from
a PC and a large screen, it's less useful on the iTouch
and Treo because it requires many overlapping small
boxes which don't translate well on a small screen.
However, since that time Dave has added the various
global variable types to the Control Center. If I did
it again I would add a global variable for each light
and update it with a ph_getinsteonlevelrt function.
This gives the light level from 1 to 255 which you then
can manipulate mathematically.
P.S. Chrome messed up your jpg. I viewed the jpg
yesterday on my itouch but today neither chrome nor ie
let's me see the picture of your screen.
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: January 15 2009 at 13:00 | IP Logged
|
|
|
Roger that!! As I posted in a new topic an hour ago,
once I logout of the Forum in Chrome I am unable to log
back in in IE7! (Obviously I can log in with Chrome)
Until I can achieve a login, I am hosed re: fixing the
graphic. I just edited the post (with Chrome browser)to
correct a spelling error and when it refreshed the image
was busted!
Dang! Dang! Dang!
Until a forum Administrator clears whatever is locking
me out, I can't fix the image!
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: January 15 2009 at 13:50 | IP Logged
|
|
|
nadler wrote:
Looks great. I haven't forayed into video yet. What
kind of cameras are you using and how do you like them?
|
|
|
Nadler - got my cameras from Smarthome. I have two of the Legrand Cat5 Bullet cams. They are color and without IR illumination but reasonably sensitive in low light anyway. Since I have one on my TV mast looking out the driveway, the distances were too far for effective IR illumination anyway. The video quality is good but only at 640x480. It is critical to have a super quiet power supply to feed them(use the one from Legrand), otherwise the images have hum bars running thru them.
I choose the Cat5 as I figured I had to run power to the cams anyway so might as well get the video down the same cable.
In general,however, the IP cameras seem to be more versatile.
The key is good camera SW and I am using webcamXP from darkwet (http://webcamxp.com/home.aspx). Good guy there named Steve that I got to work with Dave so that the two applications integrate together niely (that's how I get my SMS and email notifications thru PH (triggered by motion detection in webcamXP). See also my application note in the PH Repository forum area.).
I feed the realtime camera images thru PH's web server so I get a summary page of home conditions on my iPhone. Using the PH web server gives me access to Globals and Insteon control.
With one tap on the left frame items I can get to all kinds of instant capabilities with minimum hassle.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: January 15 2009 at 14:16 | IP Logged
|
|
|
The video feeds are great. What were you watching on
TV? Looks like CNN.
|
Back to Top |
|
|
funbobbybaby69 Groupie
Joined: April 01 2008
Online Status: Offline Posts: 88
|
Posted: January 15 2009 at 16:06 | IP Logged
|
|
|
Now that your a pro, how much would you charge to set this up for me. LOL!!!!!!!! Looks fantastic!
I switched my camera's from cat5 to cat5E (enhansed) it helped with the "noise" in the video signal.
Keep up the good work!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: January 15 2009 at 16:28 | IP Logged
|
|
|
nadler wrote:
The video feeds are great. What were you watching on
TV? Looks like CNN. |
|
|
I hate to say it but my wife was watching a soap opera.
Sheesh! I couldn't do that!
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: January 15 2009 at 16:33 | IP Logged
|
|
|
funbobbybaby69 wrote:
Now that your a pro, how much would you charge to set this up for me. LOL!!!!!!!! Looks fantastic!
|
|
|
Well.... it's kind of like Master Card..."Priceless"
All it took so far would have earned me about 4-cents/hour!
That said. Looking back on it all now, I'm amazed how much effort it took. The code was easy, but getting it to work was a challenge. Sometimes it took days to find a simple typo that caused a macro line to be skipped over. Until Dave gets a debugger eventually going the only way to find problems is moving a ph_msgbox dialog around the code until one finds the issue.
Oh well, these kinds of challenges are more fun than playing in the traffic, or sitting in a bar somewhere!
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
judetf Senior Member
Joined: January 23 2008
Online Status: Offline Posts: 234
|
Posted: May 30 2009 at 06:59 | IP Logged
|
|
|
Hey GadgetGuy,
Quick question: how did you integrate Webcamxp's video feed into PH's web pages? Did you just add code to the PH page to point to the Webcamxp stream's ipaddress and port (since it's the same box, it's the same ipaddress, right?), or is there a better way to do it so that they are both directly incorporated together?
Thanks!
jtf
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: May 30 2009 at 07:40 | IP Logged
|
|
|
judetf wrote:
Hey GadgetGuy,
Quick question: how did you integrate Webcamxp's video feed into PH's web pages? Did you just add code to the PH page to point to the Webcamxp stream's ipaddress and port (since it's the same box, it's the same ipaddress, right?), or is there a better way to do it so that they are both directly incorporated together?
|
|
|
That's an easy one to answer, and glad to do so. I previously posted a complete description in the "PowerHome Macros, Scripts, and Formulas Repository" section of the Forum.
You can find it here http://www.power-home.com/forum/forum_posts.asp?TID=1830&PN= 1 or search for "webcamXP" in All the Forums.
A note to others viewing this chain. The "Show Topics" field at the top of your Forum Window...
defaults to only the Last Week (ie, current events) of activity. To see a broader view of topics select a wider range from the scroll down menu.
Edited by GadgetGuy - May 30 2009 at 07:42
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
judetf Senior Member
Joined: January 23 2008
Online Status: Offline Posts: 234
|
Posted: May 30 2009 at 20:46 | IP Logged
|
|
|
GG,
Thanks for the pointer. I actually had found that though, and (unless I'm still missing something after a re-read), that's actually accomplishing something more complicated than I'm trying to do.
No motion sensors or messages for me. I'm really just looking to add a webcam to my little setup. Since PH already provides a webpage for me to check out my house, I would love to have the webcam view show up on the same page. PH's webpage is running on port 8080; I have the webcam setup on 8081 at the moment, since it won't start up on 8080 since PH already has that port.
So, I'm just looking for a way to have the webcam video stream show on one of the PSP pages I am serving up out of PH.
Hopefully that's a better explanation and you can give me a pointer. From your screenshots, it seems that you've accomplished this already...
Thanks!
jtf
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: May 31 2009 at 11:51 | IP Logged
|
|
|
judetf wrote:
GG,
I'm just looking for a way to have the webcam video stream show on one of the PSP pages I am serving up out of PH.
|
|
|
Judetf-
Sorry I missed the point of your original question.
Yes there is a reasonably straighforward way of geting your webcamXP images to your PH web page.
While you could code a lot of HTML yourself, fortunately Steve Niquille, the author of webcamXP, has provided an easy out for us by means of an auto generation html snippet.
Open webcamXP and select "Tools>Generate HTML code" from the Menu bar
In the window that opens up, make the following field entries...
where the IP Address / Host Name field is your PH web server IP address (eg, http://192.158.4.36:8000)[Assuming you have the webcamXP web server running on port 8000.]. Select the "Video Stream" for the Code to Generate; "Javascript" for the Type of Video Stream, and your camera number to be posted for the Destination Video Source. [Note: the image above has video source 1 selected while the html code image below was generated for video source #2.]
When you click on the Next button, code matching your requirements will be generated in the window. You can then copy and paste this into your PH web page directly or you may choose go place it on a separate page. I did it both ways with a small image thumbnail placed on my main web page, but when you click on it a new large window is opened so that more detail is visable.
The auto-generated code should look like the following image which represents the (New Window Opening) separate html page in its entirety, while the code within the red rectangle is what you would place on your PH web page but with the width and height tags smaller to make a thumbnail image.
Hopefully this will get you going.
BTW you need to generate this custome code for EACH camera you want to post as the code differs according to camera.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: May 31 2009 at 19:38 | IP Logged
|
|
|
A post thought to the web cam streaming, FYI.
As a consideration to my ISP broadband provider, I throttle back the live video feed from my home cameras, using webcamXP's Web/Broadcast Tab bandwidth restriction field.
By checking the "Limit bandwidth (kb/s)" box and entering a value of "250" in the data field (red elipse) I find that the updates for two cameras is about once per second, which seems plenty adequate.
Live video feeds will consume a lot of bandwidth, which I would expect would cause degradation of other user's on your broadband feed loop, if you don't limit streaming thruput.
Edited by GadgetGuy - June 01 2009 at 07:50
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
judetf Senior Member
Joined: January 23 2008
Online Status: Offline Posts: 234
|
Posted: May 31 2009 at 21:08 | IP Logged
|
|
|
GadgetGuy wrote:
where the IP Address / Host Name field is your PH web server IP address (eg, http://192.158.4.36:8000)[Assuming you have the webcamXP web server running on port 8000.]. |
|
|
I'm close, but I'm stuck on the above. I have PH using port 8080. When I try to set webcamxp to use the same port, it gives me an error saying that port 8080 is already in use. Is there a trick to getting them to use the same port?
Thanks _very_ much for all the answers, however. This is looking to be a _very_ nice addition to my PH setup!
jtf
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: June 01 2009 at 07:43 | IP Logged
|
|
|
jtf -
You DON"T want to have both servers on the same web port as they will conflict with each other. That's why it is not allowed to happen.
Leave webcamXP on port 8000 and PH on 8080. Your external web server accesses will always be via PH's web connection on port 8080.
The only thing that webcamXP's port (on 8000) will then be doing is to serve as a gateway for the code on the PH web site to reach back into webcamXP and grab the images. NOTE that all the code in the example given in the post several above, is grabbing cam images on port 8000.
Be sure to open up your firewalls and router to port 8080 if not already done so, so that external web access can happen. I initially forgot to do this and thought everything worked OK, forgetting that I was testing from computers on my LAN which were internal. As soon as I tried a access from a friends house to show off what I did, nothing worked of course as I had no access to the PH web server from outside!
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
judetf Senior Member
Joined: January 23 2008
Online Status: Offline Posts: 234
|
Posted: June 01 2009 at 09:13 | IP Logged
|
|
|
That clears it up. I can now see it on the PH page from outside, having given it its own port and opening up port forwarding.
However, that raises a new question: I use the PH webserver to require authentication, which gives me at least a little bit of piece of mind. Now that I've set a port and opened that port on my firewall, I can access the webcam directly, without going through the PH page, which strikes me as being a problem.
Any thoughts on how to secure the page so that it's not open to the public Internet?
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: June 01 2009 at 10:46 | IP Logged
|
|
|
jtf -
A first thought is that, if you don't publicize your URL, it isn't highly likely than anyone will see your page, or if they do, that they will know what or who's content it is.
But if you are concerned, then the only way I can think of to be more secure (maybe others in the Forum will have some ideas too) is to indirectly get to your camera page.
When you access the PH web server it opens the "/index.html" page by default. That is typically where your custom site will reside.
However, if you name your personal page something other than "index.html" (say "myweb.html"), then when you access the PH web server, since it sees no index.html page name it will open its default "Main" page instead. This opens up the device status view window, BUT only after you enter your login and PW, assuming that you have set Access Permissions to such as exampled below.
If you go to the PH Explorer>Setup>Web Server window and edit the page links therein in the Menu section, and add your newly named custom web page in a URL field and a reference name for it in the associated Title field (while you're at it rearrange and eliiminate the other Menu items to fit your personal use needs) then (after login in and entering your PW) you will go to the PH Main page but have a link to your personal page as the first Link at the top.
For example, my MAIN page looks like this...
with the leftmost link being the one to my personal page.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
Stellar Newbie
Joined: September 12 2010 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: October 06 2010 at 00:51 | IP Logged
|
|
|
Hi,
How to make a button in the CC when clicked, would open its my own html page?
|
Back to Top |
|
|