Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


HC3 QuickApps coding - tips and tricks


jgab

Recommended Posts

  • Topic Author
  • 4 hours ago, Rover said:

    I deleted the old HC2Proxy QA and installed this one. Problem is that all HC2 device ID's have been changed. Is there a way to avoid this?

    Parameter HC2ID was nil in the previous QA but has an number in this version. Do I have to fill this value, if yes by what?

    The test blockscene with toggle binary switch still can only turnOnn.

    Unfortunately the children are deleted when the main QA is deleted. 

    One way is to copy and paste the code in the "main" file from the new to the old QA. Then it could work but its a bit of work.

    HC2ID is the id of the scene on the HC2. It's discovered automatically. The HC2 scene needs to be named "HC3Proxy".

     

    I have a test block scene that toggles a switch proxy and it works well. What kind of device is it? A Fibaro wall plug, switch?

    Do you get any log messages in the QA log? like "binary switch x turned off"

    Link to comment
    Share on other sites

    20 minutes ago, jgab said:

    I have a test block scene that toggles a switch proxy and it works well. What kind of device is it? A Fibaro wall plug, switch?

    Do you get any log messages in the QA log? like "binary switch x turned off"

    First toggle:

    [03.09.2020] [15:02:29] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [15:02:29] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [15:02:29] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn

    Second toggle:

    [03.09.2020] [15:05:06] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [15:05:06] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [15:05:06] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn

    So the "toggle" is just "turnOn"

    Please login or register to see this spoiler.

     

    The device is a Fibaro double switch.

    Edited by Rover
    Link to comment
    Share on other sites

  • Topic Author
  • 9 minutes ago, Rover said:

    First toggle:

    [03.09.2020] [15:02:29] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [15:02:29] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [15:02:29] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn

    Second toggle:

    [03.09.2020] [15:05:06] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [15:05:06] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [15:05:06] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn

    So the "toggle" is just "turnOn"

    Please login or register to see this spoiler.

    You should also get a log message back like " binary switch <ID> value=1" when the HC2 scene pushes the new state back to the HC3 QA.

    Have you set the right %%properties value in the HC2 scene header for the switch?

    Link to comment
    Share on other sites

    12 minutes ago, jgab said:

    You should also get a log message back like " binary switch <ID> value=1" when the HC2 scene pushes the new state back to the HC3 QA.

    Have you set the right %%properties value in the HC2 scene header for the switch?

    No other log messages than the showed ones above have been sent back.

    Off course the right %%properties value in the HC2 scene header for the switch (212) are present otherwise the turnOn action for the switch (212) could not be performed.

     

    BTW: the test block scene that toggles a switch proxy works well for a HC3 wall plug.

    Edited by Rover
    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Rover said:

    No other log messages than the showed ones above have been sent back.

    Off course the right %%properties value in the HC2 scene header for the switch (212) are present otherwise the turnOn action for the switch (212) could not be performed.

     

    BTW: the test block scene that toggles a switch proxy works well for a HC3 wall plug.

    The header is not for the action but for the update of the state. I believe that on the HC3 the block scenes check the state to know if a toggle should turnOn or turnoff. If the state is not correctly updated it will not perform the right action.

     

    The logic for the code is that the HC3 child proxy send the action to the HC2 and waits for the HC2 scene to report back the new state, and then the HC3 child proxy updates its own state.

    Please login or register to see this code.

    That it works for a wall plug and not for the double switch is very strange. And that you don't get a log back reporting the new state of the double switch indicates that the HC3Proxy scene on the HC2 is not triggering when the double switch changes state. Can you see in the log on the HC2 if the scene triggers?

    Link to comment
    Share on other sites

    No the HC3Proxy scene on HC2 does not trigger. It only triggers for the device mapping.

    --[[
    %% autostart
    %% properties
    212,429,24,171,174,169 value
    --]]

    212 is the double switch

     

    "BTW: the test block scene that toggles a switch proxy works well for a HC3 wall plug. ": The intention was to make clear that toggling on a HC3 included device (so not a HC2 proxy device) works.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 4 minutes ago, Rover said:

    No the HC3Proxy scene on HC2 does not trigger. It only triggers for the device mapping.

    --[[
    %% autostart
    %% properties
    212,429,24,171,174,169 value
    --]]

    212 is the double switch

     

    "BTW: the test block scene that toggles a switch proxy works well for a HC3 wall plug. ": The intention was to make clear that toggling on a HC3 included device (so not a HC2 proxy device) works.

     

    Can you list triggers like that?

    I have only done

    Please login or register to see this code.

    ... but if it's possible I have learned something new.

    When you start the QA on the HC3 do you see that it fetches the initial values of the devices on the HC2?

    Like (it starts with the scene id report)

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    11 minutes ago, jgab said:

    When you start the QA on the HC3 do you see that it fetches the initial values of the devices on the HC2?

    Like (it starts with the scene id report)

    Please login or register to see this code.

    No, when starting the test toggle block scene, the only debug notifications are:

    [03.09.2020] [17:36:54] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [17:36:54] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [17:36:54] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn.

    I will change the property declarations now.

    Link to comment
    Share on other sites

    Also with the separate HC2 property declarations no change in behavior or debugging data on HC2 (= no triggering) or HC3.

    Link to comment
    Share on other sites

    But 33 minutes later, without any action from my side:

    [03.09.2020] [17:57:14] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":50,"actionName":"setProperty","args":["value",1]}[03.09.2020] [17:57:14] [DEBUG] [QUICKAPP47]: binary switch 171 value=1[03.09.2020] [17:57:14] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":49,"actionName":"setProperty","args":["value",1]}[03.09.2020] [17:57:14] [DEBUG] [QUICKAPP47]: binary switch 169 value=1[03.09.2020] [18:00:12] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":50,"actionName":"setProperty","args":["value",0]}[03.09.2020] [18:00:12] [DEBUG] [QUICKAPP47]: binary switch 171 value=0[03.09.2020] [18:00:12] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":49,"actionName":"setProperty","args":["value",0]}[03.09.2020] [18:00:12] [DEBUG] [QUICKAPP47]: binary switch 169 value=0[03.09.2020] [18:02:27] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":50,"actionName":"setProperty","args":["value",1]}[03.09.2020] [18:02:27] [DEBUG] [QUICKAPP47]: binary switch 171 value=1[03.09.2020] [18:02:27] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":49,"actionName":"setProperty","args":["value",1]}[03.09.2020] [18:02:27] [DEBUG] [QUICKAPP47]: binary switch 169 value=1[03.09.2020] [18:02:38] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":48,"actionName":"setProperty","args":["value",1]}[03.09.2020] [18:02:38] [DEBUG] [QUICKAPP47]: binary sensor 24 value=1[03.09.2020] [18:02:40] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":53,"actionName":"setProperty","args":["value",67]}[03.09.2020] [18:02:40] [DEBUG] [QUICKAPP47]: multilevel switch 174 value=67

    and on HC2:

    3-Sep 17:57:14 : Trigger
    3-Sep 17:57:14 : Updating 171 value=1
    3-Sep 17:57:14 : Trigger
    3-Sep 17:57:14 : Updating 169 value=1
    3-Sep 18:00:12 : Trigger
    3-Sep 18:00:12 : Updating 171 value=0
    3-Sep 18:00:12 : Trigger
    3-Sep 18:00:12 : Updating 169 value=0
    3-Sep 18:02:27 : Trigger
    3-Sep 18:02:27 : Updating 171 value=1
    3-Sep 18:02:27 : Trigger
    3-Sep 18:02:27 : Updating 169 value=1
    3-Sep 18:02:38 : Trigger
    3-Sep 18:02:38 : Updating 24 value=1
    3-Sep 18:02:39 : Trigger
    3-Sep 18:02:39 : Updating 174 value=67
    3-Sep 18:06:13 : Trigger
    3-Sep 18:06:13 : Updating 171 value=0
    3-Sep 18:06:13 : Trigger
    3-Sep 18:06:13 : Updating 169 value=0
    3-Sep 18:06:21 : Trigger
    3-Sep 18:06:21 : Updating 171 value=1
    3-Sep 18:06:21 : Trigger
    3-Sep 18:06:21 : Updating 169 value=1

    Link to comment
    Share on other sites

    After 1x toggle with blockscene (turnon) and 1x toggle (turnoff):

    [03.09.2020] [18:12:04] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [18:12:04] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [18:12:04] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn[03.09.2020] [18:12:05] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"setProperty","args":["value",1]}[03.09.2020] [18:12:05] [DEBUG] [QUICKAPP47]: binary switch 212 value=1[03.09.2020] [18:14:28] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOff","args":[]}[03.09.2020] [18:14:28] [DEBUG] [QUICKAPP47]: binary switch 212 turned off[03.09.2020] [18:14:28] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOff[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: QA HC2Proxy - version:1.0 (QA toolbox 0.18)[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: DeviceId..:47[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Type......:com.fibaro.binarySwitch[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Interfaces:["quickApp"][03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Room......:219[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Visible...:true[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Created...:Thu Sep 3 11:27:28 2020[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Modified..:Thu Sep 3 11:27:28 2020[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Setup: Event manager (0.2)[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Setup: Child device manager (0.3)[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: 7 children[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/scenes[03.09.2020] [18:15:00] [TRACE] [QUICKAPP47]: Scene ID for HC3Proxy is 434[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/24[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/169[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/171[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/212[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/429[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/174[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/64[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: binary sensor 24 value=false[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: binary switch 212 value=false[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: multilevel switch 174 value=0[03.09.2020] [18:15:00] [ERROR] [QUICKAPP47]: End of file[03.09.2020] [18:15:01] [DEBUG] [QUICKAPP47]: binary sensor 64 value=false[03.09.2020] [18:15:01] [DEBUG] [QUICKAPP47]: binary switch 171 value=false[03.09.2020] [18:15:01] [DEBUG] [QUICKAPP47]: binary switch 169 value=false

     

    Further toggling results is staying turnoff.

    Link to comment
    Share on other sites

    Why is the first print statement working and the second does not?

    function QuickApp:onInit()

        self:debug("onInit")
        self:hello()
        self.jT = json.decode((fibaro.getGlobalVariable("HomeTable")))
        print(self.jT.TestKamer.testLicht)
    end

     

    function QuickApp:hello()
      print(self.jT.TestKamer.testLicht)
    end
    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Rover said:

    After 1x toggle with blockscene (turnon) and 1x toggle (turnoff):

    [03.09.2020] [18:12:04] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOn","args":[]}[03.09.2020] [18:12:04] [DEBUG] [QUICKAPP47]: binary switch 212 turned on[03.09.2020] [18:12:04] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOn[03.09.2020] [18:12:05] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"setProperty","args":["value",1]}[03.09.2020] [18:12:05] [DEBUG] [QUICKAPP47]: binary switch 212 value=1[03.09.2020] [18:14:28] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":51,"actionName":"turnOff","args":[]}[03.09.2020] [18:14:28] [DEBUG] [QUICKAPP47]: binary switch 212 turned off[03.09.2020] [18:14:28] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/callAction?deviceID=212&name=turnOff[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: QA HC2Proxy - version:1.0 (QA toolbox 0.18)[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: DeviceId..:47[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Type......:com.fibaro.binarySwitch[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Interfaces:["quickApp"][03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Room......:219[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Visible...:true[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Created...:Thu Sep 3 11:27:28 2020[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Modified..:Thu Sep 3 11:27:28 2020[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Setup: Event manager (0.2)[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Setup: Child device manager (0.3)[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: 7 children[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/scenes[03.09.2020] [18:15:00] [TRACE] [QUICKAPP47]: Scene ID for HC3Proxy is 434[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/24[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/169[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/171[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/212[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/429[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/174[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/64[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: binary sensor 24 value=false[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: binary switch 212 value=false[03.09.2020] [18:15:00] [DEBUG] [QUICKAPP47]: multilevel switch 174 value=0[03.09.2020] [18:15:00] [ERROR] [QUICKAPP47]: End of file[03.09.2020] [18:15:01] [DEBUG] [QUICKAPP47]: binary sensor 64 value=false[03.09.2020] [18:15:01] [DEBUG] [QUICKAPP47]: binary switch 171 value=false[03.09.2020] [18:15:01] [DEBUG] [QUICKAPP47]: binary switch 169 value=false

     

    Further toggling results is staying turnoff.

     

    I noted that your version says. 1.0. I posted v1.1 yesterday

    (I'm still worried that your HC2 scene doesn't trigger)

    Link to comment
    Share on other sites

    I have installed the version of HC2Proxy of yesterday with HC2ID = number, where the previous version had HC2ID = nil.

    Please login or register to see this spoiler.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 27 minutes ago, Rover said:

    I have installed the version of HC2Proxy of yesterday with HC2ID = number, where the previous version had HC2ID = nil.

    Please login or register to see this spoiler.

    Sorry, I had a bug in the version reporting :-)

    In your last post with the log it's 2 things that stand out. First the QA restarts at 18:15:00 and then later (also. at 18:15:00) there is a EOF error.

     

    Try this version (yes. I know it's a pain to regenerate the child devices - you could cut and paste the code in the 'main' file to the old to update the installed version - this is version 1,2)

    There was a bug that could have caused the error we see.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    I have updated to HC2Proxy 1.2:

    [04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: QA HC2Proxy - version:1.0 (QA toolbox 0.18)[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: DeviceId..:47[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Type......:com.fibaro.binarySwitch[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Interfaces:["quickApp"][04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Room......:219[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Visible...:true[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Created...:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Modified..:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Event manager (0.2)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Child device manager (0.3)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: 7 children[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: QA HC2Proxy - version:1.0 (QA toolbox 0.18)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: DeviceId..:47[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Type......:com.fibaro.binarySwitch[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Interfaces:["quickApp"][04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Room......:219[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Visible...:true[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Created...:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Modified..:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Event manager (0.2)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Child device manager (0.3)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: 7 children[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/scenes[04.09.2020] [00:03:25] [TRACE] [QUICKAPP47]: Scene ID for HC3Proxy is 434[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/24[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/169[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/171[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/212[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/429[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/174[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/64[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary sensor 24 value=true[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary switch 171 value=false[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary switch 212 value=true[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary switch 169 value=false[04.09.2020] [00:03:25] [ERROR] [QUICKAPP47]: End of file[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary sensor 64 value=false[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: multilevel switch 174 value=38

     

    EOF is stil there...

    and there was no local in

    local _version = "1.2"
    Link to comment
    Share on other sites

  • Topic Author
  • 5 hours ago, Rover said:

    I have updated to HC2Proxy 1.2:

    [04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: QA HC2Proxy - version:1.0 (QA toolbox 0.18)[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: DeviceId..:47[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Type......:com.fibaro.binarySwitch[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Interfaces:["quickApp"][04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Room......:219[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Visible...:true[04.09.2020] [00:03:24] [DEBUG] [QUICKAPP47]: Created...:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Modified..:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Event manager (0.2)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Child device manager (0.3)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: 7 children[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: QA HC2Proxy - version:1.0 (QA toolbox 0.18)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: DeviceId..:47[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Type......:com.fibaro.binarySwitch[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Interfaces:["quickApp"][04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Room......:219[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Visible...:true[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Created...:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Modified..:Thu Sep 3 11:27:28 2020[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Event manager (0.2)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Setup: Child device manager (0.3)[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: 7 children[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/scenes[04.09.2020] [00:03:25] [TRACE] [QUICKAPP47]: Scene ID for HC3Proxy is 434[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/24[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/169[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/171[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/212[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/429[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/174[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/64[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary sensor 24 value=true[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary switch 171 value=false[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary switch 212 value=true[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary switch 169 value=false[04.09.2020] [00:03:25] [ERROR] [QUICKAPP47]: End of file[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: binary sensor 64 value=false[04.09.2020] [00:03:25] [DEBUG] [QUICKAPP47]: multilevel switch 174 value=38

     

    EOF is stil there...

    and there was no local in

    local _version = "1.2"

     

    _version should not be local - it was a bug.

    Here is v1.3

    Please login or register to see this attachment.

    It looks like the fetching of device status at the beginning somehow returns an error from the HC2 and thus the EOF.

    The new version paces the requests as not to overwhelm the HC2...  and it has better error messages.

    I noticed that it happens to device 429 on the HC2. It could be an coincidence, but what kind of device is that?

    Another thing, have you set the "max instances" for the HC2 scene? Set it to 10 just to be on the safe side.

     

    Link to comment
    Share on other sites

    429 is just as 24 a Fibaro motion sensor (binarySensor). It was a typo, deviceID should be 29. Changed in HC2 and HC3.

    Max instances HC2 was 2 --> 10.

    Install v1.3:

    [04.09.2020] [09:01:23] [DEBUG] [QUICKAPP47]: Call HC2:http://192.168.1.2/api/devices/429[04.09.2020] [09:01:23] [ERROR] [QUICKAPP47]: %s - %s

    Still 429 is called and not 29.

    Device 52 in HC3 removed (was HC2 device 429) + HC2 remapped (then device 429 gone).

    [04.09.2020] [09:10:52] [DEBUG] [QUICKAPP47]: onAction: {"deviceId":47,"args":[52],"actionName":"removeChildDevice"}

    Testscene toggle: on - off - on - off ?

     

    Please login or register to see this spoiler.

    • Like 1
    Link to comment
    Share on other sites

    On 9/2/2020 at 7:34 PM, Rover said:

    Syncing global variables: no need because the aim of sharing devices is to facilitate a smooth migration from HC2 to HC3. Then the global variables are created in HC3 in order to use in HC3 scenes and QA's.

    Device interfaces like battery and power status?: yes, because all attributes of HC2 devices are useful in HC3.

    Other types of devices then the basics...?: Yes I have a Danalock lock device and a Nest thermostat.

    In practice I have to come back on the rejection of the need of syncing global variables. In the process of migrating scenes from HC2 to HC3 step by step it is a handicap not to have access to the status of global variables of the HC2.

    Link to comment
    Share on other sites

    If I want to add devices to alarm zone in HC3: "no devices of this type" ???

    I have only HC2 devices of type sensor.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...