Announcement

Collapse
No announcement yet.

HS-391 - windows HS4 python support/api

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DJF3
    replied
    +1

    Leave a comment:


  • Malosa
    replied
    +1

    Leave a comment:


  • simplextech
    replied
    This posting should clarify if the request is for a Python Scripting interface or a Python API/SDK.

    Doing a JSON wrapper is possible today and a scripting interface is only half-there. A Python API to the SDK would make so many things much easier to integrate and develop actual plugins.

    Leave a comment:


  • kriz83
    replied
    +1 Scripting in VB is to cumbersome.

    Using the ESPHome plugin you will be able to easily publish sensor values to HomeSeer. I will publish the python script in a week or 2.

    Leave a comment:


  • lveatch
    replied
    I'm a Perl guy. When HS dropped external Perl support, they provided the JSON API. I wrote a common Perl module containing the necessary JSON API functions I need allowing for getting and setting HS data.

    for example:
    Code:
    use Homeseer::API;
    my %status_hash;
    
    $hs = Homeseer::API->new(
        {
            server  => 'http://homeseer.local.net',
            port    => 82,
            debug   => 1,
            user    => 'asfd',
            password  => 'asdfaasfklj',
        }
    );
    
    $hs->getStatus(\%status_hash, {ref => 164, location1 => 'Living Room', location2 => '1st Floor'} );
    $hs->controlDeviceByValue(\%status_hash, {ref => 164, value => 0} );
    $hs->controlDeviceByLabel(\%status_hash, {ref => 164, label => 'On'} );
    
    
    $hs->getStatus(\%status_hash, {ref => 164, location1 => 'Living Room', location2 => '1st Floor'} );
    print "'%status_hash{'Devices'}[0]->{'name'}' is ";
    print "'%status_hash{'Devices'}[0]->{'status'}'\n";
    This allows me to call the Perl scripts from HS or from the command line. For example:
    Code:
    ./getHsDevice.pl -r 1005 -a name,value
    Todays Rain Amount,0.02
    or

    Code:
    ./getHsDevice.pl -f 'Todays Rain Amount'  -a ref,name,value
    1005,Todays Rain Amount,0.02

    Leave a comment:


  • simplextech
    replied
    +10000000000000000000000000

    Leave a comment:


  • DJF3
    replied
    +1

    Leave a comment:


  • bartbakels
    started a topic HS-391 - windows HS4 python support/api

    HS-391 - windows HS4 python support/api

    windows HS4 python support/api
Working...
X