Author |
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 05 2006 at 22:05 | IP Logged
|
|
|
hello, im trying to run PH as a Windows Service.
im using Windows 2003 Server Standard. everytime server restarts, i need to log to the server so PH can initialize. so every power outages i lost all my triggers until i login to the server and run PH. if I try to run PH as service with firedaemon, i got a database error.
please, any help is welcome.
thanks,
btw, Dave, Im already a registered customer. :)
|
Back to Top |
|
|
Dean Senior Member
Joined: August 21 2003 Location: United States
Online Status: Offline Posts: 109
|
Posted: November 06 2006 at 00:30 | IP Logged
|
|
|
GSouza,
I don't believe Dave has implemented this feature into Power-Home, although it has been requested.
The workaround would be to modify Windows 2003 to have a specific user login when the machine reboots and have PowerHome run when the user logs in. You can find a Microsoft KB article for Windows Server 2003 here.
Obviously there are security implications to allowing a user to login automatically, especially if they have Administrator rights, but if that is not a problem for your environment this is probably your best bet for now.
-Dean
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 06 2006 at 01:43 | IP Logged
|
|
|
If requested I can put the article for download on my site as a PDF-file for reviewing later...
Peter
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 06 2006 at 10:52 | IP Logged
|
|
|
Yes, im running that way already.
the problem is that PH sometimes dont run my triggers. I need to open the server with VNC and click on PH screen so after that, the triggers begins to work.
if i reboot the server, autologon and PH open and run ok but the triggers dont.
any other solution?
thanks,
Gustavo
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 06 2006 at 13:21 | IP Logged
|
|
|
Gustavo,
As Dean pointed out, PowerHome cant be launched as a service currently. You would need to use the userid without a password approach.
However, after PowerHome is opened, the triggers should fire without any other interaction. If this is not the case, you may want to email your database file to me so I can see if there is anything unusual. As long as there are no modal PowerHome dialogs waiting for attention (every message should have an auto-timeout), then PowerHome triggers and background operations should function. When you launch VNC and click the PowerHome window, is that all that is needing to be done? When you say "triggers", you mean the PowerHome Triggers as defined in the PowerHome Explorer, correct?
Let me know and Im sure we'll get this worked out.
Dave.
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: November 07 2006 at 00:03 | IP Logged
|
|
|
Dave,
I tested again and noted that if I wait a little bit longer, you are right, everything works fine, triggers and all. what i noted too is that sometimes, I dont know why, PH didnt answer to no commands, but if I wait 1 or 2 minutes and try again, everything works fine. Im not using any commands in controller configuration and I dont know why PH sometimes stop working. i just noted this tonight.
yes Dave, i mean PH triggers defined in PH explorer.
if you want, I can send my db. just dont know where to send.
thanks,
Gustavo
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 13 2006 at 15:42 | IP Logged
|
|
|
Gustavo,
Glad to hear that it's not locking up.
Now what can happen could be related to timed events. When PowerHome first launches, it'll ask you if you want to turn the Timed Events timer on (defaults to yes) and then asks you if you want to execute past due events (defaults to yes). If PowerHome has been off for awhile and you've got timed events that are set to run often (say once a minute) and the event itself takes a few seconds to run, PowerHome can appear locked while it's performing the actions.
The way PowerHome works is that if you've got the above timed event scenario or similar and PowerHome has been off for a couple of hours (120 minutes), PowerHome will process that timed event that takes a few seconds 120 times. If the timed event takes 3 seconds and it's running 120 times, thats 6 minutes that PowerHome will appear to be hung.
Let me know if this might be your problem or if you suspect something else.
Dave.
|
Back to Top |
|
|
Dean Senior Member
Joined: August 21 2003 Location: United States
Online Status: Offline Posts: 109
|
Posted: April 07 2007 at 08:36 | IP Logged
|
|
|
OK, after my W2K3 server was forced to reboot after some recent Microsoft security update, I started to revisit the "running PowerHome as a service" topic more seriously. Here is what I came up with, along with the caveats that are apparent to me so far.
Backup your PowerHome files/database just in case.
1) Grab this free utility:
http://www.codeproject.com/system/xyntservice.asp
2) I copied the XYNTService.exe and XYNTService.ini files to %SYSTEMROOT%\system32.
3) Modify the XYNTService.ini file. My file is below.
[Settings]
ServiceName=XYNTService
CheckProcessSeconds = 30
[Process0]
CommandLine="c:\Program Files\powerhome\pwrhome.exe"
WorkingDir="C:\Program Files\powerhome"
PauseStart=1000
PauseEnd=1000
UserInterface=Yes
Restart=Yes
4) To install the service, run the following at the command prompt: XYNTService -i. To un-install the service, run the following at the command prompt: XYNTService -u.
5) Bring up the Services app located under Administrative Tools. Locate the XYNTService entry and modify the properties. Change the service to run as the same user account you normally use to run PowerHome. When I left the service to run as the local system account, I received some error dialog box complaining about some script problem. Make sure the service is set to start when the server boots up.
6) Manually start the service...nothing appears to happen. Bring up Task Manager. You should see pwrhome.exe and SDM3.exe running. Try accessing PowerHome via web interface (if you have it configured), should work. I use a PalmPad to send X10 codes that PowerHome receives via W800RF32 which triggers PowerHome to turn on Insteon and X10 lights. Seems to work OK so far. I rebooted my W2K3 server, PowerHome started up.
Caveat(s)
* You must stop the XYNTService to stop PowerHome, then manually load PowerHome as normal to make any changes. Minor inconvenience in my opinion.
* This solution has not been extensively tested, your mileage may vary. I would like to hear back from others that try this or similar solutions to get PowerHome running as a service.
Good luck!
-Dean
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 11 2007 at 21:00 | IP Logged
|
|
|
Dean,
Thank you, thank you, thank you. I have tried multiple of these types of utilities and this is the first one that has worked.
I have spent nearly 16 hours in the last week investigating what it would take to convert PowerHome to a service and had nearly given up. PowerBuilder (the language PowerHome is written in) is notoriously difficult to get running as a service (no callback functions) and PowerHome even more so do to the activex controls and such that it employs. Thanks to you and the author of this program, I think that I can make some modifications and finally be able to offer PowerHome with an option to load as a service.
I'll be playing with this some more in the next few days and let everyone know how the testing goes.
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 16 2007 at 17:37 | IP Logged
|
|
|
All,
The next version of PowerHome WILL be able to be run as a service. Thanks to Dean for the link to XYNTService and the author of that wonderful utility and the sourcecode posted.
I have gone ahead and modified PowerHome to make it more service friendly and have coded up a special version of the XYNTService application so that it integrates and works specifically with PowerHome. Ive also been able to work around the requirement to load the service as the user that installed PowerHome and instead allow you to use the Local System Account and thereby retain the user interface. It took alot of effort to work through all the details but Im testing on my own system now and so far, all looks goods.
Dave.
|
Back to Top |
|
|
cmhardwick Senior Member
Joined: July 08 2006 Location: United States
Online Status: Offline Posts: 290
|
Posted: April 16 2007 at 21:12 | IP Logged
|
|
|
So it will run as a service then we load the interface seperately? Can the interface be on another machine and connected remotely through the network?
Great work, as always, Dave!
__________________ Cicero, Enjoying automation!
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: April 17 2007 at 16:53 | IP Logged
|
|
|
Cool, up and running as service.
thanks Dean, nice one.
Gustavo
|
Back to Top |
|
|
Dean Senior Member
Joined: August 21 2003 Location: United States
Online Status: Offline Posts: 109
|
Posted: April 18 2007 at 21:08 | IP Logged
|
|
|
Wow, quick work Dave, thanks. Glad the XYNTService application and source code was useful and I too thank the author for publishing the code.
Looking forward to the new version.
-Dean
|
Back to Top |
|
|
gatchel Newbie
Joined: December 21 2006 Location: United States
Online Status: Offline Posts: 24
|
Posted: April 25 2007 at 21:52 | IP Logged
|
|
|
Amazing how things are suggested and put into action.
Awesome!
This will be the best improvement yet...
__________________ Sign Here:____________________
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 29 2007 at 22:42 | IP Logged
|
|
|
Cicero,
Well, were not quite there yet. The next version of PowerHome will load quietly as a service and is basically the same as we've got now but with all of the user interface hidden. It's still the same program but modified to work with the XYNTService (Ive modified this code as well to work specifically with PowerHome).
I am working on separting the interface from the processing, but have some more work to do. The next version will bring us closer as a new Remote Control Center / Device Status client will be available as well. This new program will allow the CC / Device Status to run on remote machines on your network and automatically receive updates through the new UDP Broadcast server.
I still need to work on remote version of the PowerHome Explorer and Insteon Explorer and then we'll be yet another step closer.
Dave.
|
Back to Top |
|
|
ginigma Senior Member
Joined: June 18 2006 Location: United States
Online Status: Offline Posts: 127
|
Posted: April 30 2007 at 17:20 | IP Logged
|
|
|
Sounds like some real cool stuff is on the way!
__________________ Insteon (40 devices) ^ PowerHome (435 links) ^ Logitech Harmony 880
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: May 13 2007 at 04:28 | IP Logged
|
|
|
Dave, i was playing with powerhome WM control and its not working when I run powerhome from service (XYNT). if i stop the service and run powerhome manually, the WM control works fine.
any solution for this?
im using girder to transmit / receive an IR code from other media center PC to my server and then girder and PHWM control to send insteon commands to PH. so when i pause a movie, all the lights till kitchen or bath will be on and when i play the movie, all lights will go off.
cya
GS
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: May 14 2007 at 13:38 | IP Logged
|
|
|
Dave,
I just changed to PH socket CMD and it works perfect.
could i use any socket client to send commands to PH or I must use PH's socket command line?
I read in some place, i dont remember where, that you was developing an interface to girder. is this correct?
thanks
Gustavo
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 14 2007 at 19:06 | IP Logged
|
|
|
You may be thinking about my thread on a plugin for Netremote.
|
Back to Top |
|
|
GSOUZA Groupie
Joined: October 20 2006 Location: Brazil
Online Status: Offline Posts: 75
|
Posted: May 15 2007 at 15:28 | IP Logged
|
|
|
No Tony, i saw your post about netremote really cool by the way this netremote.
i remebered, i saw info about girder at PH faqs.
dave mentioned about girder integration.
cya
Gustavo
|
Back to Top |
|
|