xAP Flash nee Joggler beta 5

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • BodgeIT
    Automated Home Sr Member
    • Jul 2010
    • 57

    #31
    The missing link

    now <xAP><on> and <xAP><off>
    Updated my config and now this works OK.

    I'll update the doc and send it to you.

    ** EDIT **
    Checking the documentation, there seems to be a discrepency in relation to the <xAP><schema>generic</schema></xAP> entry and the documentation.
    In one doc it's as above, in the main doc, it's detailed as:
    <generic>

    <Class>The class within the header to recognise (class=)

    <body>[INDENT]The body/block/section name within the message

    <parameter>The parameter name within the body

    <type>The type of parameter eg text, numeric or state - (not yet implemented, all treated as text)

    <context>If an additional parameter within the block further defines the 'context' of this parmeter.
    e.g. within the X10 schema device=A6 (not yet implemented)

    </generic>

    Can I just check which version is correct?
    Last edited by Kevin; 23 September 2010, 04:59 PM.

    Comment

    • Kevin
      Moderator
      • Jan 2004
      • 558

      #32
      Good spot - the old <xapon> and <xapoff> tags are still in the getting started doc , and the beta 5 doc doesn't document this change - and should have. I've added the new <xAP><on> and <xAP><off> tags to the tag spreadsheet too.

      I'll also post another (my) example xapconfig.xml file shortly.

      Re creating a generic schema - to do this you need to set the schema to generic <schema>generic</schema> and also include a <generic>...</generic> tag section

      <xAP>
      <schema>generic</schema>
      <generic>
      <Class>...</Class>
      <body>...</body>
      <parameter>...</parameter>
      <context>...</context>
      <type>...</type>
      </generic>
      </xAP>

      the <Class> tagname has to have a capital C - sorry can't be helped... also <context> and <type> are not yet implemented. When implemented context likely needs an additional tag to be added as we need to pick up both an additional xAP parameter name and its value.



      K
      Last edited by Kevin; 23 September 2010, 12:16 PM.

      Comment

      • kev_t
        Automated Home Sr Member
        • Jun 2004
        • 58

        #33
        generic messages

        I hae been looking at the parsing of the generic messages to but have not had any success

        This is the message from the weather station, and I want to extract tempc

        xap-header
        {
        v=12
        Hop=1
        UID=FF400200
        Class=Weather.Report
        Source=windy.weather.1
        }
        Weather.Report
        {
        tempf=68.9
        utc=12:06:08
        tempc=20.5
        icon=Sunny
        date=20100923
        windm= 4
        windk= 8
        airpressure=1001.5
        winddirc=W
        humidity=74
        rain=0.0
        extratemp1=-100.0
        extratemp2=-100.0
        extratemp3=-100.0
        extrahum1=-100
        extrahum2=-100
        extrahum3=-100
        }

        And this is the xAP section from the button

        <xAP>
        <uid>FF400200</uid>
        <source>windy.weather.1</source>
        <schema>generic</schema>
        <generic>
        <Class>Weather.Report</Class>
        <body>Weather.Report</body>
        <parameter>tempc</parameter>
        </generic>
        </xAP>

        Just double checked and Iserver has created a filter for windy.weather.1

        Any suggestions?

        KevinT
        Last edited by kev_t; 23 September 2010, 01:58 PM.

        Comment

        • Kevin
          Moderator
          • Jan 2004
          • 558

          #34
          I looked at that Weather.Display message and he has OD OA characters at the end of every line...(at least that's what a cut and paste from the post shows) is that the current version of Weather Display ? - if so it is still not to spec.
          If the hex view within xFX Viewer shows otherwise could you post it.

          xAP Flash would not match the values as it looks for

          tagvalue0A and he is sending tagvalue0D0A

          You may be able to kludge this by including that 0D at the end of the value between the tags - might have to use CDATA.
          K

          Comment

          • BodgeIT
            Automated Home Sr Member
            • Jul 2010
            • 57

            #35
            Sorry to keep laying it on

            I've moved on to setting up an OSD from a xAP message generated by my HAH.
            Following the instructions in the beta5 guide, I have created this entry for my page:
            <page NAME="OSD">
            <visible>false</visible>
            <opacity>0.1</opacity>
            <group>Center</group>
            <textbox NAME="OSD">
            <gridX>1</gridX>
            <gridY>1</gridY>
            <width>120</width>
            <height>80</height>
            <fontsize>24</fontsize>
            <visible>true</visible>
            <text></text>
            <xAP>
            <schema>xAPBSC</schema>
            <uid>FF00D800</uid>
            <source>dbzoo.livebox.Plugboard</source>
            <Class>xAPBSC.cmd</Class>
            <parametertype>text</parametertype>
            <parameter>text</parameter>
            <parametername>text</parametername>
            </xAP>
            <mode>text</mode>
            </textbox>
            </page>

            As you can see I'm still a little unsure of which "parameter*" entry will get me my info(as I haven't yet seen any), so I'm headging my bets.
            I have this situated this as the very last page in my config.
            Essentially what happens is the xAPFlash tries to start but never actually finishes loading. No xAP entry appears in XFX for the ahscs5.

            Have I missed something?

            Comment

            • kev_t
              Automated Home Sr Member
              • Jun 2004
              • 58

              #36
              generic messages

              I updated weather display after the last problem when you highlighted this

              There are no OD's in the message, so the version I have is to spec on this point at least

              78 61 70 2d 68 65 61 64 65 72 0a 7b 0a 76 3d 31 xap-header { v=1
              32 0a 48 6f 70 3d 31 0a 55 49 44 3d 46 46 34 30 2 Hop=1 UID=FF40
              30 32 30 30 0a 43 6c 61 73 73 3d 57 65 61 74 68 0200 Class=Weath
              65 72 2e 52 65 70 6f 72 74 0a 53 6f 75 72 63 65 er.Report Source
              3d 77 69 6e 64 79 2e 77 65 61 74 68 65 72 2e 31 =windy.weather.1
              0a 7d 0a 57 65 61 74 68 65 72 2e 52 65 70 6f 72 } Weather.Repor
              74 0a 7b 0a 74 65 6d 70 66 3d 36 38 2e 39 0a 75 t { tempf=68.9 u
              74 63 3d 31 32 3a 30 36 3a 30 38 0a 74 65 6d 70 tc=12:06:08 temp
              63 3d 32 30 2e 35 0a 69 63 6f 6e 3d 53 75 6e 6e c=20.5 icon=Sunn
              79 0a 64 61 74 65 3d 32 30 31 30 30 39 32 33 0a y date=20100923
              77 69 6e 64 6d 3d 20 34 0a 77 69 6e 64 6b 3d 20 windm= 4 windk=
              38 0a 61 69 72 70 72 65 73 73 75 72 65 3d 31 30 8 airpressure=10
              30 31 2e 35 0a 77 69 6e 64 64 69 72 63 3d 57 0a 01.5 winddirc=W
              68 75 6d 69 64 69 74 79 3d 37 34 0a 72 61 69 6e humidity=74 rain
              3d 30 2e 30 0a 65 78 74 72 61 74 65 6d 70 31 3d =0.0 extratemp1=
              2d 31 30 30 2e 30 0a 65 78 74 72 61 74 65 6d 70 -100.0 extratemp
              32 3d 2d 31 30 30 2e 30 0a 65 78 74 72 61 74 65 2=-100.0 extrate
              6d 70 33 3d 2d 31 30 30 2e 30 0a 65 78 74 72 61 mp3=-100.0 extra
              68 75 6d 31 3d 2d 31 30 30 0a 65 78 74 72 61 68 hum1=-100 extrah
              75 6d 32 3d 2d 31 30 30 0a 65 78 74 72 61 68 75 um2=-100 extrahu
              6d 33 3d 2d 31 30 30 0a 7d 0a 0a 0a m3=-100 }


              KevinT

              Comment

              • Kevin
                Moderator
                • Jan 2004
                • 558

                #37
                Originally posted by BodgeIT View Post
                I've moved on to setting up an OSD from a xAP message generated by my HAH.
                Ahah - moving fast eh.. The OSD is an area that i know is going to need some tweaking but that's what the beta testing is for...
                As you can see I'm still a little unsure of which "parameter*" entry will get me my info(as I haven't yet seen any), so I'm headging my bets.
                The parameter tags you're referring to are for use within generic schema <schema>generic</schema> only and then should be within a <generic> section . They would be named <Class> <parameter>and <type> and you would need a <body> tag too. You are however using schema<xAPBSC> so they are not used here.

                The spreadsheet is really your bible here as it is I believe correct and clearly shows the valid tag names and the levels at which they may be used. <on> and <off> are missing from the <xAP> section
                - only valid within a <button> section.

                The OSD was really intended for use with the xAP-OSD and message.display schema although there is no reason I guess why it shouldn't be available to other schema. I'll need to look at the code to see quite how that might be handled currently though , especially with BSC.
                Essentially what happens is the xAPFlash tries to start but never actually finishes loading.
                I have some code to protect against <pages> that contain no <button> elements but it looks like it's not catching this case. FTTB just add an invisible <button> element to the page and xAP Flash will load your XML. BTW you are using an <opacity> tag which is not supported and it should be <alpha>01.</alpha> (which is pretty transparent).

                I've got various fixes , and a feature change that I hope you'll like... just not sure when I'll post an update based on the subsequent questions. The OSD (for all schema) is not one I'll look to address in the next release as I'd rather spend a bit more time considering the permutations but I would like to get KT's weather.display issue investigated.

                K
                Last edited by Kevin; 23 September 2010, 04:14 PM.

                Comment

                • BodgeIT
                  Automated Home Sr Member
                  • Jul 2010
                  • 57

                  #38
                  Thanks Kevin, I've rem'd it out for now.
                  Can we get a wiki up? This might help with disseminating new info.

                  I'll get on to Brett and beg him to put OSD schema into his new xAP library that he's writing for the HAH.

                  Comment

                  • Kevin
                    Moderator
                    • Jan 2004
                    • 558

                    #39
                    I'm not sure OSD sits conveniently within HAH, maybe if there were alarm thresholds or something. Maybe you could use the scripting to create a xAP OSD message from one of the existing endpoint changes ? I can see that incoming SMS might warrant OSD though.

                    Alternatively some other xAP controller could listen to the HAH messages and send OSD messages as needed ?

                    I will get around to looking at how BSC might trigger an OSD but I dont expect it will be a much wanted feature and it would have to only be on events and not infos. The OSD schema have additional fields like target, duration and priority to better support which devices display messages and for how long and which take precedence etc..

                    K

                    Comment

                    • Kevin
                      Moderator
                      • Jan 2004
                      • 558

                      #40
                      beta version 5c

                      beta version 5c of the SWF is posted...

                      Fixes:

                      textbox elements now register source filters with iServer at startup.

                      display of recovered generic schema parameter within 'text' mode buttons or textbox elements.

                      New Feature:

                      xAP message macros.

                      You can now include any number of xAP messages each separately contained within an <on> or <off> tag inside a <button><xAP> element. They will be sent whenever the button is pressed on or off and in the order they are entered in the XML. There is no pacing of these so they will all get sent really fast, if you include a lot of messages double check your targets cope.
                      This is useful to create a series of xAP commands for example to set scenes or turn things off at night. Using wildcards where possible is advantageous.

                      ... when and if you were able to change button states via xAP you'd be able to trigger macros via a xAP command too

                      K
                      Last edited by Kevin; 23 September 2010, 05:34 PM.

                      Comment

                      • kev_t
                        Automated Home Sr Member
                        • Jun 2004
                        • 58

                        #41
                        generic messages

                        The parsing of the generic xap message example I gave earlier, extracting tempc from a weather report , now works in beta5c

                        Thanks

                        Kevin T

                        Comment

                        • BodgeIT
                          Automated Home Sr Member
                          • Jul 2010
                          • 57

                          #42
                          Great new feature Kevin, I'm sure I'll think of something work with it, feature request for the new feature...a <delay> parameter in secs.

                          Also am still a bit confused and I am still unable to get info from my CurrentCost box to show in textbox.

                          The parameter tags you're referring to are for use within generic schema <schema>generic</schema> only and then should be within a <generic> section . They would be named <Class> <parameter>and <type> and you would need a <body> tag too. You are however using schema<xAPBSC> so they are not used here
                          .

                          Does this mean in the textbox I can't get the content of displaytext instead of text from my xAP message. I thought it was something like:
                          <textbox>
                          <xAP>
                          <parametertype>
                          </xAP>
                          <mode>text</mode> what other textbox modes are there?
                          </textbox>

                          and then for generic:
                          <button>
                          <xAP>
                          <schema>generic</schema>
                          <generic>
                          <parameter>
                          </generic>
                          </xAP>
                          </button>

                          Is this no longer the case?
                          Can I get a new copy of the xml bible?

                          ** EDIT **
                          Scratch that! I got BSC info in my Textboxes....I had to reboot my joggler after loading the new .swf file.
                          Previously I had just stopped xAPFlash, loaded file and restarted...it must still run in memory/background!

                          Still no improvement in formatting of text in textbox though not even using CDATA and HTML
                          Last edited by BodgeIT; 23 September 2010, 09:43 PM. Reason: Update

                          Comment

                          • Kevin
                            Moderator
                            • Jan 2004
                            • 558

                            #43
                            Originally posted by BodgeIT View Post
                            Great new feature Kevin, I'm sure I'll think of something work with it, feature request for the new feature...a <delay> parameter in secs.
                            I've got to do some thinking about the role of the Joggler and the features. It's really a display front end and should be used in conjunction with a xAP controller of some form. Adding control features into xAP Flash , whilst I expect an obvious attraction especially to newer xAP users, is going to create a huge code undertaking. It also doesn't fit in with the way I run my xAP setup - so there's no real incentive for me to do it. Of course someone might come along willing to contribute to the AS3 code and implement this.

                            Whilst a single (delay) is easy to implement - that would rapidly become a configurable delay per message - and then you could get multiple overlapping triggers - and then there would be periodic requests and a scheduler... triggers from other messages ... you can see the progression. But I do believe a scheduler would be a useful code addition for a lot of users.
                            Can I get a new copy of the xml bible?
                            The only change so far is are the two tags <on> and <off> within a <xAP> section - I'm looking for correction information and when I release beta 5 formally then it'll hopefully be right...
                            ** EDIT **
                            Scratch that! I got BSC info in my Textboxes....I had to reboot my joggler after loading the new .swf file.
                            Previously I had just stopped xAPFlash, loaded file and restarted...it must still run in memory/background!
                            It's cached after the first load - the config files aren't though, although if you persist the config it may take a second restart to take effect.

                            Did you use a 'generic' or 'xAPBSC' schema ? To pickup displaytext instead of text using xAPBSC you would use <mode>displaytext</mode> instead of <mode>text</mode>
                            Still no improvement in formatting of text in textbox though not even using CDATA and HTML
                            phew... not even looked at that Gary ....it's specific to the Joggler but it'll percolate to the top of the todo list in time.. keep an eye on the beta release notes - if it says it's fixed ,and it isn't then shout again...

                            K
                            Last edited by Kevin; 23 September 2010, 10:41 PM.

                            Comment

                            • BodgeIT
                              Automated Home Sr Member
                              • Jul 2010
                              • 57

                              #44
                              Thanks Kevin.
                              IMHO I think you should add the <delay> tag which operates between messages and then stop there.
                              The "intelligence" of my system is and always will be the HAH(At least while I'm in this flat). The flexibility and sophistication provided by the plugboard will not be surpassed by anything on the Joggler. I think offering a certain 'degree' of sophistication is more than adequate. For me, the Joggler(and xAPFlash on it) is very much the "handiest" interface for controlling my HA but won't be more than that.

                              Are the Doc updates usefull? Happy to support in anyway.
                              Incidentally, I've tried to "run" xAPFlash locally and access via a browser but can't get that to work, could you add a quick "howto" to docs?

                              ** EDIT ""
                              I've made some progress on formatting. Don't know how, but have managed to get font size changes to work. Will experiment a little more tomorrow...er today.
                              Last edited by BodgeIT; 24 September 2010, 02:14 AM.

                              Comment

                              • Kevin
                                Moderator
                                • Jan 2004
                                • 558

                                #45
                                The work on the docs is much appreciated - I just haven't had much time to have a look through your editing changes but I'm sure everyone will benefit from your efforts.

                                Re running within a browser - search in the 'Getting Started' document for this paragraph and that should get you going...

                                "You will not be able to test this actually on your Joggler unitil you've completed the steps below but you can test it on a PC within Adobe Flash or a web browser... "

                                K

                                Comment

                                Working...
                                X