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


  • 0

Dune HD Max - XML responds


Question

Posted

Hi everyone,

 

moving on with the automation I am trying to automate my Dune HD Max video streamer. I have found the API document and I can send several commands.

 

The one that puzzles me most is reading the current player state:

Please login or register to see this code.

The responds is similar to this:

Please login or register to see this code.

How can I decode the info to just get the "player_state"? I know how this works in a JSON, but not in a XML layout.

 

Any help is appreciated

5 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Ok, making progress but to the correct result...

    Please login or register to see this code.

    This works, but the table is overwritten by itself meaning it only returns the last rule..

    That means during playback it makes this:

    Please login or register to see this code.

    into this

    Please login or register to see this code.

    It obviously needs to add a level extra so I can then filter the json table I get

     

    The goal offcourse is:

    Please login or register to see this code.

    or even better

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted

    Ok, a long night puzzling I made progress:

     

    The player now returns multiple line:

    Please login or register to see this code.

    And I can pull values from this table:

    Please login or register to see this code.

    Now I would like to be able to create a loop doing:

    Please login or register to see this code.

    How to do this with a json table?

    • 0
    Posted

    I found this post very interesting because I am in the research stage of a home automation project and one of the key requirements *was* to interact with a Plex media server (via its web service) to obtain library  information. Although I have experience of scripting (in different languages) I am completely new to the HC2 environment. I am interested in this post for two reasons

     

    1) I want to know if the language the HC2 uses is capable of processing XML requests coming back from  a device (which I believe is what may be being asked here) without having to resort to parsing "<" and "/>" constructs

     

    2) I am also interested in the DUNE HD devices which have been mentioned. 

     

    So I will be following this conversation with open eyes and I'm off to Google JSON which I had never heard of until two minutes ago!

    • 0
  • Inquirer
  • Posted

    The language the HC2 uses is called LUA and is widely documented.

     

    The XML parser is listed in my code above. (and on the

    Please login or register to see this link.

    )

    • 0
    Posted

    The language the HC2 uses is called LUA and is widely documented.

     

    The XML parser is listed in my code above. (and on the

    Please login or register to see this link.

    )

     

    Thanks - I had read about LUA for my very early stages and had worked out that is what the HC2 uses - I was thrown by the JSON reference.

     

    I will carry on reading

    Join the conversation

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

    Guest
    Answer this question...

    ×   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...