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

HTTP request in virtual device unreliable?


Henrik

Question

I'm using a virtual device to turn on the radio on my Denon HEOS system which is integrated using a servlet. The API is very simple, just plain GETs with some arguments.

Please login or register to see this code.

Every now and then the radio doesn't turn on. I looked in the Tomcat log (which runs the servlet) and the request is never received. Luckily I'm running a HCL with 4.058 beta which features Lua-based scenes!

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" /> So I added some debug messages in the scene and even though the scene runs the part which "press" the button on the virtual device, the HTTP request is never sent.

Please login or register to see this code.

So, being able to use Lua, I re-wrote that part that sends the request using net.HTTPClient(),

Please login or register to see this code.

Now it works perfectly, the radio always turn on it hasn't failed a single time.

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

 

Is this some bug or am I missing something? What kind of implementation is the virtual device using behind the scenes?

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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