Remote connection to homeseer with Perl or PHP
-
- Starting Member
- Posts: 32
- Joined: Sun Mar 04, 2012 6:07 pm
Re: Remote connection to homeseer with Perl or PHP
This one is correct:
$hs->hs->Transmit("c8", "On", 100,0,false, true);
$hs->hs->Transmit("c8", "On", 100,0,false, true);
-
- Starting Member
- Posts: 32
- Joined: Sun Mar 04, 2012 6:07 pm
Re: Remote connection to homeseer with Perl or PHP
Can you post your code?
Re: Remote connection to homeseer with Perl or PHP
Hi here is my code many thanks
<?php
$hs=new COM("Homeseer2.application");
$hs->SetHost("localhost");
$hs->connect("guest","guest");
$hs->hs->Transmit("C8","on",100,0,false,false);
echo 'processed';
?>
<?php
$hs=new COM("Homeseer2.application");
$hs->SetHost("localhost");
$hs->connect("guest","guest");
$hs->hs->Transmit("C8","on",100,0,false,false);
echo 'processed';
?>
-
- Starting Member
- Posts: 32
- Joined: Sun Mar 04, 2012 6:07 pm
Re: Remote connection to homeseer with Perl or PHP
try:
$hs=new COM("Homeseer2.application");
$hs->SetHost("localhost");
$hs->connect("guest","guest");
$hs_api=$hs->GetHSRef();
$hs_api->Transmit("C8", "on", 100, 0, false, true);
echo 'processed';
$hs=new COM("Homeseer2.application");
$hs->SetHost("localhost");
$hs->connect("guest","guest");
$hs_api=$hs->GetHSRef();
$hs_api->Transmit("C8", "on", 100, 0, false, true);
echo 'processed';
Re: Remote connection to homeseer with Perl or PHP
getting error
Call to a member function Transmit() on a non-object in D:\xampp\htdocs\HsTestControl\homeseer.php on line 8
any ideas??
Call to a member function Transmit() on a non-object in D:\xampp\htdocs\HsTestControl\homeseer.php on line 8
any ideas??
-
- Starting Member
- Posts: 32
- Joined: Sun Mar 04, 2012 6:07 pm
Re: Remote connection to homeseer with Perl or PHP
You copied the homeseer dll ( dll files mentioned in the beginning of this topic) files into your php directory, where php.exe is?
Re: Remote connection to homeseer with Perl or PHP
Hi I have copied the homeseer2.dll and the other 2 files into the php.exe folder.
I have even set everything up on my other laptop one running xp the other vista 64bit, same error on both although the second machine vista worked once and only once.
does anything need altering in php.ini??
I have also applied the latest homeseer updates
thanks
I have even set everything up on my other laptop one running xp the other vista 64bit, same error on both although the second machine vista worked once and only once.
does anything need altering in php.ini??
I have also applied the latest homeseer updates
thanks
Re: Remote connection to homeseer with Perl or PHP
I am wondering if a path needs to be set????
at the moment I have copied the files to c:\xampp\php
does php.ini need an alteration to include that or a path setting to c:\programfiles\homeseer?
whicj I realise is less than ideal in the wild but would prove a point for testing?
thanks
at the moment I have copied the files to c:\xampp\php
does php.ini need an alteration to include that or a path setting to c:\programfiles\homeseer?
whicj I realise is less than ideal in the wild but would prove a point for testing?
thanks
Re: Remote connection to homeseer with Perl or PHP
I have just created a little test app in vb6 and it worked straight out of the bag?
I must have some security setting different in the php.ini but no idea what any ideas, please?
thanks
I must have some security setting different in the php.ini but no idea what any ideas, please?
thanks
Re: Remote connection to homeseer with Perl or PHP
It seems if I reboot my machine start homeseer and go straight to my test page I can turn C8 on once and only once then the error returns
-
- Starting Member
- Posts: 32
- Joined: Sun Mar 04, 2012 6:07 pm
Re: Remote connection to homeseer with Perl or PHP
You have to check if $hs_api already exists, if it exists you dont need to login for a second time.
Try this :
if (empty($hs_api)) {
$hs=new COM("Homeseer2.application");
$hs->SetHost("localhost");
$hs->connect("guest","guest");
$hs_api=$hs->GetHSRef();
}
$hs_api->Transmit("C8", "on", 100, 0, false, true);
Try this :
if (empty($hs_api)) {
$hs=new COM("Homeseer2.application");
$hs->SetHost("localhost");
$hs->connect("guest","guest");
$hs_api=$hs->GetHSRef();
}
$hs_api->Transmit("C8", "on", 100, 0, false, true);
Re: Remote connection to homeseer with Perl or PHP
No difference works the first time then the same error.
Re: Remote connection to homeseer with Perl or PHP
Could it be that the object doesn't disconnect from homeseer correctly?
Should I dispose of the object in someway at the end of the script?
thanks
Should I dispose of the object in someway at the end of the script?
thanks
-
- Starting Member
- Posts: 32
- Joined: Sun Mar 04, 2012 6:07 pm
Re: Remote connection to homeseer with Perl or PHP
Do you have email, I can sent you a class file which worked for me? I am not using it anymore, because I created my own home automation system in PHP with everything. The reason was that i Found I could create a better system with a better GUI than homeseer and its fun
The class I created was created 1,5 years ago, so it could be that it isnt working anymore because homeseer changed something?
Ronald

The class I created was created 1,5 years ago, so it could be that it isnt working anymore because homeseer changed something?
Ronald
Re: Remote connection to homeseer with Perl or PHP
Will pm you,
thanks I am wondering that, HS changed something as I had it working on the demo system 6+ months ago straight out of the box and couldn't believe my luck, So went on the webdesign front end thinking the back end was a piece of cake!!!
I would like to moce away from Homeseer but I haven't seen a DLL that will transmit a x10 code(haven't had a real chance to look) and I have an Ocelot setup which I works really well.
thanks I am wondering that, HS changed something as I had it working on the demo system 6+ months ago straight out of the box and couldn't believe my luck, So went on the webdesign front end thinking the back end was a piece of cake!!!
I would like to moce away from Homeseer but I haven't seen a DLL that will transmit a x10 code(haven't had a real chance to look) and I have an Ocelot setup which I works really well.