Announcement

Collapse
No announcement yet.

Apple Homekit(Siri) integration with Homeseer

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

    "setPointRef":167, // Required - HomeSeer device reference for your thermostat Set Point.
    // "setPointReadOnly":true, // Optional - Set to false if your SetPoint is read/write. true is the default
    // "stateRef":166, // Required - HomeSeer device reference for your thermostat current state
    // "stateOffValues":[0,4,5], // Required - List of the HomeSeer device values for a HomeKit state=OFF
    // "stateHeatValues":[1], // Required - List of the HomeSeer device values for a HomeKit state=HEAT
    // "stateCoolValues":[2], // Required - List of the HomeSeer device values for a HomeKit state=COOL
    // "stateAutoValues":[3], // Required - List of the HomeSeer device values for a HomeKit state=AUTO
    // "controlRef":168, // Required - HomeSeer device reference for your thermostat mode control (It can be the same as stateRef for some thermostats)
    // "controlOffValue":0, // Required - HomeSeer device control value for OFF
    // "controlHeatValue":1, // Required - HomeSeer device control value for HEAT
    // "controlCoolValue":2, // Required - HomeSeer device control value for COOL
    // "controlAutoValue":3, // Required - HomeSeer device control value for AUTO
    // "coolingThresholdRef":169, // Optional - Not-implemented-yet - HomeSeer device reference for your thermostat cooling threshold
    // "heatingThresholdRef":170 // Optional - Not-implemented-yet - HomeSeer device reference for your thermostat heating threshold
    // },
    --
    stipus

    Comment


      Originally posted by stipus View Post
      "setPointRef":167, // Required - HomeSeer device reference for your thermostat Set Point.
      // "setPointReadOnly":true, // Optional - Set to false if your SetPoint is read/write. true is the default
      // "stateRef":166, // Required - HomeSeer device reference for your thermostat current state
      // "stateOffValues":[0,4,5], // Required - List of the HomeSeer device values for a HomeKit state=OFF
      // "stateHeatValues":[1], // Required - List of the HomeSeer device values for a HomeKit state=HEAT
      // "stateCoolValues":[2], // Required - List of the HomeSeer device values for a HomeKit state=COOL
      // "stateAutoValues":[3], // Required - List of the HomeSeer device values for a HomeKit state=AUTO
      // "controlRef":168, // Required - HomeSeer device reference for your thermostat mode control (It can be the same as stateRef for some thermostats)
      // "controlOffValue":0, // Required - HomeSeer device control value for OFF
      // "controlHeatValue":1, // Required - HomeSeer device control value for HEAT
      // "controlCoolValue":2, // Required - HomeSeer device control value for COOL
      // "controlAutoValue":3, // Required - HomeSeer device control value for AUTO
      // "coolingThresholdRef":169, // Optional - Not-implemented-yet - HomeSeer device reference for your thermostat cooling threshold
      // "heatingThresholdRef":170 // Optional - Not-implemented-yet - HomeSeer device reference for your thermostat heating threshold
      // },
      Thanks for replying Stipus.

      Here is the extract from my cofig.json file:"ref":143,
      "type":"Thermostat",
      "name":"Downstairs Thermostat",
      "temperatureUnit":"F",
      "setPointRef": [ 144, 145 ],
      "setPointReadOnly":false,
      "stateRef":146,
      "stateOffValues":"0",
      "stateHeatValues":"1",
      "stateCoolValues":"2",
      "stateAutoValues":"3",
      "controlRef":146,
      "controlOffValue":"0",
      "controlHeatValue":"1",
      "controlCoolValue":"2",
      "controlAutoValue":"3"

      When I attempt to change the temperature here is the message that appears in my Homeseer log:

      "JSON controldevicebyvalue ref 144,145 not found". 144 and 145 are the ref values for "target temperature high" and "target temperature low".

      Thank you

      Gusterrhoid2

      Comment


        Unfortunately, the setPointRef is not a JSON array. it must be a single value, a single homeseer device reference.

        You may:

        - Set a single reference such as:
        "setPointRef":144,

        - Create a HomeSeer event on device 144 value change to set device 145 value to the same value or to device 144 value + 1

        The best solution would be to use the coolingThresholdRef and heatingThresholdRef ... but I haven't implemented those 2 parameters....

        stipus
        --
        stipus

        Comment


          I did as you suggested and changed my config file to:

          "setPointRef":144

          That is fine because one can change either the cool or heat set point within homeseer and the other updates to reflect the value that was changed.

          Now I get this information within the homeseer log:

          DEBUG System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request). at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__8.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at NestSharp.NestClient.SetTargetTemperature(String thermostatId, Double target, String scale) at HSPI_Nest.NestApp.SetControlValue(Int32 dvref, Double value) ---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request). at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__8.MoveNext()<---

          I think there might be something going on with the way Nest works in particular, different from other thermostats.

          Comment


            It looks like a problem with the Nest plugin.

            Check here for similar problems:
            http://forums.homeseer.com/showthread.php?t=171846

            It might be because the temp is not an integer value as it's converted from degrees to fahrenheit...
            --
            stipus

            Comment


              I was wondering if this was the problem. Is there a way to change the code in the homeseer.js file so that the temp is sent as an integer? The nest homebridge plugin somehow does this, but I haven't been able to figure out how to install the homebridge nest plugin since switching from Linux to Windows.


              Sent from my iPhone using Tapatalk

              Comment


                It's always possible to change HomeSeer.js

                There is a function setThermostatTargetTemperature()

                PHP Code:
                    setThermostatTargetTemperature: function(temperaturecallback) {
                        var 
                value temperature;
                        if( 
                this.config.temperatureUnit == "F" ) {
                            
                value temperature*9/5+32;
                        }

                        var 
                ref this.config.setPointRef;
                        var 
                url this.access_url "request=controldevicebyvalue&ref=" ref "&value=" value;

                        
                this.log("%s - Setting target temperature to %s - HomeSeerControl[%s]=%s"this.nametemperaturerefvalue);
                        
                httpRequest(url'GET', function(errorresponsebody) {
                            if (
                error) {
                                
                this.log('HomeSeer set thermostat target temperature function failed: %s'error.message);
                                
                callback(error);
                            }
                            else {
                                
                this.log('HomeSeer set thermostat target temperature function succeeded!');
                                
                callback();
                            }
                        }.
                bind(this));
                    }, 

                You could try to change:

                PHP Code:
                       if( this.config.temperatureUnit == "F" ) {
                            
                value temperature*9/5+32;
                        } 
                to

                PHP Code:
                        if( this.config.temperatureUnit == "F" ) {
                            
                value Math.roundtemperature*9/5+32 );
                        } 
                Don't forget to restart homebridge after the change.
                --
                stipus

                Comment


                  Thank you for the suggestion. Unfortunately I'm still running into the same error. There must be something else about the way the nest plugin is accepting the command.


                  Sent from my iPhone using Tapatalk

                  Comment


                    HomeSeer.js tries to set the device value to the temp in Fahrenheit.

                    You may double-check the device allowed values.
                    From the HS main window click the device
                    Click the Status-Graphics tab

                    You should see the list of allowed values for control...
                    --
                    stipus

                    Comment


                      Thank you very much Stipus. The trick was adding the math.round text. I didn't place it in the correct location the first time around. Works perfectly now.

                      I appreciate all your efforts with this awesome plugin.


                      Sent from my iPhone using Tapatalk

                      Comment


                        Originally posted by stipus View Post
                        Using most HomeKit applications, you can create HomeKit rooms, and move devices to rooms. Then you can use the room name in SIRI requests.

                        For example, I have a HomeKit room named "Living Room", and I can say dim the living room lights... and siri dims all the lights. Or turn off the living room, and siri turns off all living room lights.
                        Same for kitchen, hall, bedroom, corridor ... it's quite nice to be able to switch on all lights in a room from SIRI.

                        You can also create HomeKit zones, and move rooms to zones. Then you can address all rooms in the zone using the zone-name. If you create a zone called "upstairs", and move all upstair-rooms to that zone, you can tell siri to turn-off upstairs.

                        You can also create HomeKit scenes... that can run mini scenarios... You can create a HomeKit scene called "good morning": setup your bedroom light to 50%, bathroom to 70%, kitchen to 60% ... etc. Then you can say "good morning" to siri and all commands are processed.
                        Hi,

                        Is it possible to add a variable to the devices(services) in the config.json, called ROOM in order to add the service to the correct room in the HomeKit config?

                        Thanks,
                        Rien
                        Regards,

                        Rien du Pre
                        The Netherlands
                        Using:
                        Homeseer PRO latest HS4 BETA on a Raspberry
                        Plugin's:
                        RFXCOM, mcsMQTT, Z-Wave

                        Comment


                          Hi Stipus,

                          I've been using the HomeBridge connection together with some Hue lights using the JowiHue plugin without problems for a while. However yesterday I updated the JowiHue plugin to the latest version. Now the brightness devices have been merged with the parentdevice and Homebridge crashes at the moment that it tries to get information about the brightness characteristic.

                          I removed all brightnesRef references but it still crashes. I also tried to enter a brightnessRef with the same reference id as the parentid, but unfortunately it doesn't help either.

                          For a Z-Wave dimmer device, the brightness function seems to work fine.

                          Any suggestion?

                          Peter
                          Attached Files

                          Comment


                            Originally posted by Rien du Pre View Post
                            Hi,

                            Is it possible to add a variable to the devices(services) in the config.json, called ROOM in order to add the service to the correct room in the HomeKit config?

                            Thanks,
                            Rien
                            Unfortunately a HomeKit accessory server (such as HomeBridge) cannot create or declare a HomeKit room....
                            --
                            stipus

                            Comment


                              Originally posted by petermdevries View Post
                              Hi Stipus,

                              I've been using the HomeBridge connection together with some Hue lights using the JowiHue plugin without problems for a while. However yesterday I updated the JowiHue plugin to the latest version. Now the brightness devices have been merged with the parentdevice and Homebridge crashes at the moment that it tries to get information about the brightness characteristic.

                              I removed all brightnesRef references but it still crashes. I also tried to enter a brightnessRef with the same reference id as the parentid, but unfortunately it doesn't help either.

                              For a Z-Wave dimmer device, the brightness function seems to work fine.

                              Any suggestion?

                              Peter
                              You should clear the HomeBridge cache. I'm not sure because I'm away but I think there is a cache directory under the HomeBridge directory. You have to stop HomeBridge, delete the cache directory, and restart HomeBridge.

                              Once you cleared the cache, you may have to assign all HomeKit accessories to rooms again...
                              --
                              stipus

                              Comment


                                how to update the windows version.

                                i have installed a version from august 2015.

                                whats the best way toupdate everything , because i want to use it again.

                                regards
                                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

                                Working...
                                X