Announcement

Collapse
No announcement yet.

HS-391 - windows HS4 python support/api

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

    HS-391 - windows HS4 python support/api

    windows HS4 python support/api
    Regards Bart
    ------------------------------------------
    Win7 64Bit on Intel NUCI7 with SSD
    HSPRO 3.
    Devices; 1370 Events; 691

    Jon00 Scripts, JowHue, HSTouch, Plugwise, Z-wave, Ultranetatmo, Ultracam, PHlocation, BLUSBUIRT, MeiHarmony, Buienradar, MEiUnifi Pushover 3P, Random, Nest HSPhone and Blueiris

    Visonic Powermax Alarm System (HS3) Interface: http://www.domoticaforum.eu/viewtopic.php?f=68&t=11129

    #2
    +1

    Comment


      #3
      +10000000000000000000000000

      Comment


        #4
        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
        Len


        HomeSeer Version: HS3 Pro Edition 3.0.0.435
        Linux version: Linux homeseer Ubuntu 16.04 x86_64
        Number of Devices: 633
        Number of Events: 773

        Enabled Plug-Ins
        2.0.54.0: BLBackup
        2.0.40.0: BLLAN
        3.0.0.48: EasyTrigger
        30.0.0.36: RFXCOM
        3.0.6.2: SDJ-Health
        3.0.0.87: weatherXML
        3.0.1.190: Z-Wave

        Comment


          #5
          +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.

          Comment


            #6
            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.

            Comment


              #7
              +1
              Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
              Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




              HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

              Comment


                #8
                +1

                Comment

                Working...
                X