PHP good.. ASP bad (for me)

Put a link of your Home Automation, Domotica website here.
Post Reply
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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>
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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>
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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>
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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.
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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>
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post by Digit »

Oops, missed the Homeseer part[:I]
Lennart
Member
Member
Posts: 497
Joined: Sat Jul 22, 2006 10:58 am
Location: Netherlands

PHP good.. ASP bad (for me)

Post 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
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

PHP good.. ASP bad (for me)

Post 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>
Post Reply

Return to “Who has a realtime website”