Page 1 of 1

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 10:09 pm
by Noel
Anyone here who got a small PHP code demo on how I can send and receive data to my X10 stuff?

The server will run on the same system that is running the HomeSeer server.
I will be using Apache (or if really needed IIS) for the web serving (on an other port)

Alternatively I guess that I could dump the status in a tmp file with a small VB script triggered ever X minutes, and read from it with PHP

Surely there must be an easy way to do this.


--
<h6>Anyone interested in time travel meet me here last Thursday!!</h6>

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 10:35 pm
by TANE
Why nu use the build in HS server.
You can build your own pages with plugins..like rover or TenHSServer
I'm not sure about php possibilities..Tenserver can work i think

http://rover-for-homeseer.blogspot.com/ ... lcome.html

http://www.tenholder.net/tenWare2/tenHs ... fault.aspx

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 10:41 pm
by Noel
Why?
I prefer to code in PHP, or if possible Coldfusion.
The HS server will only let you code in ASP.
Using Apache (or IIS), I can use the coding that I'm good at.

--
<h6>Anyone interested in time travel meet me here last Thursday!!</h6>

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 10:51 pm
by TANE
try Tenserver
if you just can fire urls....

example (was my request)
http://yourhsip/tenHsServer/tenHsServer ... evice&d=C7
This one will toggle the C7

or just ask the status
http://yourhsip/tenHsServer/tenHsServer ... tatus&d=C7

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 11:03 pm
by Noel
Tenserver should work for me.
I guess that I could parse the info into PHP.
It's not realy a direct way to do this, but for now it will do.

Chak.. Once again thank you.

--
<h6>Anyone interested in time travel meet me here last Thursday!!</h6>

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 11:30 pm
by TANE
YW
I'm also looking for something to build just for the status display on my website.
Hope you can share the code.

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 11:34 pm
by Noel
Give me some days, and I will have some code to share.

Not sure if it will be in PHP or Coldfusion. (I might code it 1st in Coldfusion as I can build stuff with this really fast and easy. When all is working fine I will port it to PHP.)

--
<h6>Anyone interested in time travel meet me here last Thursday!!</h6>

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 11:37 pm
by Digit
Why try to send/receive directly from PHP?

On my site, i let a small piece of VB open a TCPClient to a port on which my HA application is listening and then send commands to it, anything i like. The HA app does the rest. This way every device is transparent to the website, it doesn't have to know whether its X10, PLCBUS, whatever. And i only have to code a new protocol once, only in the HA app. For retrieving for example status information of your devices to show on the website i'd use a database. I guess MySQL in your case. It's less realtime then, but it works for me.
Although a push-mechanism would be nice to have; still need to have a good look at lightstreamer.

PHP good.. ASP bad (for me)

Posted: Fri May 23, 2008 11:50 pm
by Digit
Oops, missed the Homeseer part[:I]

PHP good.. ASP bad (for me)

Posted: Thu Jun 12, 2008 10:52 pm
by Lennart
Hmm, I somehow missed this topic.

If you're using Homeseer and would like to use PHP to control devices/build an interface, you might also consider instantiating Homeseer as a DCOM object from within your PHP script, as explained here: http://www.cocoontech.com/index.php?showtopic=310

I'm using WAMP server beside Homeseer and it works well. It did take some time to get Homeseer working in this way, but the thing that did the trick was: homeseer.exe /regserver

Lennart

PHP good.. ASP bad (for me)

Posted: Fri Jun 13, 2008 9:49 am
by Noel
Hi Lennart,

Thank you for the info. I've not had much time to play with PHP / Homeseer (or any other hobby) the last days as we (my girl friend and I) just got a litle boy (1st one)...

As soon as things are settled a bit more, I will start coding, and try the DCOM way.

--
<h6>Anyone interested in time travel meet me here last Thursday!!</h6>