Announcement

Collapse
No announcement yet.

changing temp setpoint for Daikin via script

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

    changing temp setpoint for Daikin via script

    I'm using MQTT plugin to operate with my Daikin system (4 splits) and work well.
    I'd like to change the temperature setpoint via script.
    I'm trying with:
    Code:
    &hs.SetDeviceValueByRef(1373, hs.DeviceValueEx(1373) + 1,True)
    No error in log but nothing changed.

    Seems that the correct value should be in a range like -2147483648 to 2130706432.
    Ok, I tried with:
    Code:
    &hs.SetDeviceValueByRef(1373, hs.DeviceValueEx(1373) +16777216,True)
    16777216 is "one step" into device value set, no error in log but no value changing.

    How can I set the target temperature device of my daikin split?

    Thanks

    Cris





    #2
    SetDeviceValue only works for virtual devices. For plugin devices you need to use CAPI. Post #12 of Custom device for communication back and forth between Homeseer and Hubitat - HomeSeer Message Board gives examples for HS3 and HS4. If you search the board you will also find one-line solution for HS3.

    Comment


      #3
      Ops, yes, the CAPI CONTROL!!!

      Ok, i tried this:

      Code:
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(1394,true ,"on",false,true))
      Code:
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(1394,true ,"off",false,true))
      and I can turn on/off the device.

      Then tried with:
      Code:
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(1397,true ,"1/2/3/4/5/6/7",false,true))
      and can change the fan speed.

      Tried with:
      Code:
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(1395,true ,"22",false,true))
      but I can't change the setpoint.

      For my test I'm using the immediate script event.

      Comment


        #4
        I believe your problem is "22" as this is a string, but the setpoint is a number. The HS3 help file provides three one-line methods to find a CAPI control. The link I referenced provides a generalize enumeration of the CAPI controls for a device. I did not try this, but the second parameter indicates that it is a singe control (true). I believe it should be false because setPoint has multiple values in a range. There will be no label since this is range of values. Case is not applicable for numbers. Suggest you try one of the other methods to get the CAPI control.
        Public Function CAPIGetControl(ByVal dvRef As Integer) As CAPIControl()
        Public Function CAPIGetControlEx(ByVal dvRef As Integer, _ ByVal SingleRangeEntry As Boolean) As CAPIControl()
        Public Function CAPIGetSingleControl(ByVal dvRef As Integer, _ ByVal SingleRangeEntry As Boolean, _ ByVal Label As String, _ ByVal ExactCase As Boolean, _ ByVal Contains As Boolean) As CAPIControl

        Comment

        Working...
        X