Announcement

Collapse
No announcement yet.

mcsxAP & C-Bus

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

    #31
    Had a look in the GUI and through the help (DeviceClass, etc) and can't see any setting for Max Value, so I can't see where the dim level is translated to a range between 0 - 31 - it seems to be something hard coded into HS as opposed to a configurable option.

    I understand what you're getting at - is I set a max value of 255 to the device (instead of 31) then HS should translate the %age to a value and pass that to the plugin. I just can't see where to set this.
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    Comment


      #32
      I was referring to on the mcsXap page where xAP messages are Accepted and device codes and names assigned. I will try to look later to see explicitly where the maxvalue is assigned, but it is a device-dependent parameter maintained by mcsXap. It is not maintained by HS. The 31 is from HS. Trying to get to Level=31/31

      Comment


        #33
        Aha, that explains why I couldn't find it as part of a HS device definition. Nothing on the standard mcsXap config pages about it either though. I'll await your words of wisdom...
        Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

        Comment


          #34
          I believe you obtained your C Bus device by accepting a received xAP message and in that message it had a Level=xxx/255. mcsXap picked up the 255 to use when it sends the Level.

          For Device Type C Bus Lighting I can make the conversion from HS's 31 to the received max value. What I do not know is how consistent HS is about sending 31. There are 31 brightness steps for some types of X10. I do not know how consistently HS uses it for other devices. We can try and see how it goes with the attached.
          Attached Files

          Comment


            #35
            Hmm, I htought I responsed some time ago mu my post seems to have gone into the bit bucket. Still...

            Michael, there's still and issue - setting the level to > 0 sends this message:

            xap-header
            {
            v=13
            hop=1
            uid=FF.000E:0000
            class=xapBSC.Cmd
            source=mcs.Xap.ARES
            target=UKUSA.gateway.C-Bus:G1E
            }
            output.state.1
            {
            Level=255/255
            State=OFF
            ID=001E
            }
            Checksum
            {
            Length=0187
            }
            While clicking the "On" button in the web gui creates this message (even after setting the level > 0):
            xap-header
            {
            v=13
            hop=1
            uid=FF.000E:0000
            class=xapBSC.Cmd
            source=mcs.Xap.ARES
            target=UKUSA.gateway.C-Bus:G1E
            }
            output.state.1
            {
            Level=0/255
            State=ON
            ID=001E
            }
            Checksum
            {
            Length=0184
            }
            It seems we're still missing some logic to set state = on if level > 100 and level = 100 is state set to ON.

            Does this make sense?
            Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

            Comment


              #36
              On a similar topic - Kevin, and idea how to trigger a scene or action control group via xAP?
              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

              Comment


                #37
                Enable the debug from mcsXap so we can see what HS is telling the plugin to do based upon the actions you take.

                Comment


                  #38
                  Clicking "ON" button in the GUI generates this:

                  <table border="0" cellpadding="0" cellspacing="2" width="100%"><tbody><tr><td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug EVentCB </td><td colspan="8" class="LOGEntry1" align="left">4,30,)</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry0" align="left">)30 DeviceExitsRef=1689</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug EVentCB </td><td colspan="8" class="LOGEntry1" align="left">4,30,)</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry0" align="left">SetBSCData Section=0, DC=)30, State=Off, Status=3</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry1" align="left">xapbsc.event Source=ukusa.gateway.c-bus:g1e,Exists=True</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug EVentCB </td><td colspan="8" class="LOGEntry0" align="left">4,30,)</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry1" align="left">xAP Send xapBSC.Cmd Level~0/255|State~ON|ID~001E</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry0" align="left">SETIO Object=DeviceClass,HC=)30,Command=2,Value=0,Data1=0,Data2=0</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:45:44 AM </td><td colspan="3" class="LOGType1" align="left"> Device Control </td><td colspan="8" class="LOGEntry1" align="left">Device: Lighting Study Study Light ()30) ON</td></tr></tbody></table>
                  Changing the Level from 0 to 100% in the GUI generates this debug:
                  <table border="0" cellpadding="0" cellspacing="2" width="100%"><tbody><tr><td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry1" align="left">)30 DeviceExitsRef=1689</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug EVentCB </td><td colspan="8" class="LOGEntry0" align="left">4,30,)</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry1" align="left">SetBSCData Section=0, DC=)30, State=Off, Status=3</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry0" align="left">xapbsc.event Source=ukusa.gateway.c-bus:g1e,Exists=True</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug EVentCB </td><td colspan="8" class="LOGEntry1" align="left">4,30,)</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType0" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry0" align="left">xAP Send xapBSC.Cmd Level~255/255|State~OFF|ID~001E</td></tr> <tr> <td colspan="1" class="LOGDateTime1" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType1" align="left"> mcsXap Debug </td><td colspan="8" class="LOGEntry1" align="left">SETIO Object=DeviceClass,HC=)30,Command=10,Value=31,Data1=0,Data2= 0</td></tr> <tr> <td colspan="1" class="LOGDateTime0" align="left" nowrap="nowrap">2012/02/02 10:48:50 AM </td><td colspan="3" class="LOGType0" align="left"> Device Control </td><td colspan="8" class="LOGEntry0" align="left">Device: LightingStudy Light Preset Dim Level 31 [100%]</td></tr></tbody></table>
                  Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                  Comment


                    #39
                    For the ON case HS is commanding ON, Level = 0
                    SETIO Object=DeviceClass,HC=)30,Command=2,Value=0,Data1=0,Data2=0

                    For the Level Change HS is commanding PRESET, Level = 31
                    SETIO Object=DeviceClass,HC=)30,Command=10,Value=31,Data1=0,Data2= 0

                    The plugin now maps Command to State as ON/OFF and Value to Level scaled to 255. Continue your test for the combinations that you want to consider and described what you want the plugin to do in each case. This logic will only apply to your C Bus types.

                    Comment

                    Working...
                    X