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 execute command send to Denon ??


Question

Posted

 

Good morning !!.....I want to control the denon receiver with my hc3 with various http commands but I can't get it to work. I made the switch from Vera (I should never have chosen that) to Fibaro but that works a little differently with conditions / triggers, I have read the documentation about this but can't get it to work. The old lua code in Vera/Micasaverde was: 

 

lua:

local timeout = 5
local status, result = luup.inet.wget("http://192.168.46.20/goform/formiPhoneAppPower.xml?1+Poweron", timeout)
luup.sleep (2000)
local status, result = luup.inet.wget("http://192.168..46.20/goform/formiPhoneAppDirect.xml?SITV", timeout)
luup.sleep (1500)
local status, result = luup.inet.wget("http://192.168..46.20/goform/formiPhoneAppDirect.xml?MSMCH STEREO", timeout)
luup.sleep (1500)
local status, result = luup.inet.wget("http://192.168..46.20/goform/formiPhoneAppVolume.xml?1+-25", timeout)

 

How do I get this to work in my hc3? ( scene ??, VD ?? ) , Thanks for thinking along.

Recommended Posts

  • 0
Posted

Try that in QA

 

function QuickApp:getHttp()
net.HTTPClient({timeout=5000}):request("http://192.168.46.20/goform/formiPhoneAppPower.xml?1+Poweron",  
    {success = function(resp)
       print(resp)
     end,
    error = function(error)
     print(error)
     end,
  option = {method = "GET"}  })
end
function QuickApp:onInit()
    self:getHttp()
end
  • 0
  • Inquirer
  • Posted (edited)

    Unfortunately this configuration does not work

     

    Please login or register to see this attachment.

     

    console:

    [30.04.2025] [16:23:32] [WARNING] [QUICKAPP426]: Callback for button_ID_0_1 not defined
    [30.04.2025] [16:23:33] [DEBUG] [QUICKAPP426]: table: 0xaaab134c2010
    [30.04.2025] [16:23:44] [TRACE] [QUICKAPP426]: onAction: {"args":["onReleased","button_ID_0_1"],"manual":true,"deviceId":426,"actionName":"UIAction"}
    [30.04.2025] [16:23:44] [TRACE] [QUICKAPP426]: UIEvent: {"elementName":"button_ID_0_1","values":[],"deviceId":426,"eventType":"onReleased"}
    [30.04.2025] [16:23:44] [WARNING] [QUICKAPP426]: UI callback for element: button_ID_0_1 not found.

     

    Edited by HCQuestion
    • 0
    Posted (edited)

    Where the button comes from?

    Please replace print(resp) to print(json.encode(resp))

    Edited by cag014
    • 0
  • Inquirer
  • Posted

    I made a QA with 1 action button .... Not the right way ?

    Please login or register to see this attachment.

    • 0
    Posted (edited)

    The button should call some function... otherwise is doing nothing.

    Let me know what exactly your intention to do with the button?

    My guess when you press the Power On button you probably need to send  http://192.168.46.20/goform/formiPhoneAppPower.xml?1+Poweron

    and Powr Off sends http://192.168.46.20/goform/formiPhoneAppPower.xml?1+Poweroff

    Correct?

     

    By the way let me know if the new print(json.encode(resp)) shows the data

     

    Edited by cag014
    • 0
  • Inquirer
  • Posted

    If I want to watch TV I like to activate a scene that dims the lights, closes the curtains etc. ( that works ) and sets my amplifier to the correct settings. I managed to do this with Vera/Micasaverde but Fibaro HC3 is a bit of a puzzle. ( The next challenge is the IR ITach GC100 ). I replaced the print(json.encode(resp)) with this message in the console:

    [02.05.2025] [12:29:24] [TRACE] [QUICKAPP426]: onAction: {"deviceId":426,"actionName":"UIAction","args":["onReleased","button_ID_0_1"],"manual":true}[02.05.2025] [12:29:24] [TRACE] [QUICKAPP426]: UIEvent: {"elementName":"button_ID_0_1","deviceId":426,"values":[],"eventType":"onReleased"}

    [02.05.2025] [12:29:24] [WARNING] [QUICKAPP426]: UI callback for element: button_ID_0_1 not found.

    • 0
    Posted

    Again, the buttons must call some function in QA. 

    These warnings you receive when button pressed, correct?

    Since you didn't post the printout of the resp,  did you receive correct response?

    • 0
  • Inquirer
  • Posted

    I get this message when I activate the button, maybe I'm trying it the wrong way. How would you start the action yourself? Am I missing something?

    when 1 push the OFF button ( results in console: )

    Please login or register to see this attachment.

    [03.05.2025] [10:36:34] [TRACE] [QUICKAPP426]: onAction: {"args":["onReleased","button_ID_0_1"],"deviceId":426,"actionName":"UIAction","manual":true}
    [03.05.2025] [10:36:34] [TRACE] [QUICKAPP426]: UIEvent: {"values":[],"eventType":"onReleased","elementName":"button_ID_0_1","deviceId":426}
    [03.05.2025] [10:36:34] [WARNING] [QUICKAPP426]: UI callback for element: button_ID_0_1 not found.

    • 0
    Posted

    So when you press Power Off button, the http://192.168.46.20/goform/formiPhoneAppPower.xml?1+Poweroff  command should be executed,correct?

    • 0
  • Inquirer
  • Posted

    That’s correct…… 1 button  = some http commands send to Denon for execution 

     

    • 0
    Posted

    Please add function name in Power OFF button configuration

    Please login or register to see this spoiler.

     

    • 0
  • Inquirer
  • Posted (edited)
    12 minutes ago, cag014 said:

    Please add function name in Power OFF button configuration

    Please login or register to see this spoiler.

     

    result:

     

    [06.05.2025] [11:50:58] [TRACE] [QUICKAPP426]: onAction: {"manual":true,"deviceId":426,"actionName":"UIAction","args":["onReleased","button_ID_0_1"]}
    [06.05.2025] [11:50:58] [TRACE] [QUICKAPP426]: UIEvent: {"deviceId":426,"values":[],"eventType":"onReleased","elementName":"button_ID_0_1"}
    [06.05.2025] [11:51:03] [DEBUG] [QUICKAPP426]: Operation canceled

    Edited by HCQuestion
    • 0
    Posted

    Please post your QA file

    • 0
  • Inquirer
  • Posted
    26 minutes ago, cag014 said:

    Please post your QA file

     

    i send the QA private 

     

    Please login or register to see this code.

    Old Vera/Micasaverde LUA:

    local timeout = 5
    local status, result = luup.inet.wget("http://192.168.0.5/api/scenes?sceneid=888", timeout)
    local status, result = luup.inet.wget("http://192.168.0.31/goform/formiPhoneAppPower.xml?1+Poweron", timeout)
    luup.sleep (2000)
    local status, result = luup.inet.wget("http://192.168.0.31/goform/formiPhoneAppDirect.xml?SISAT", timeout)
    luup.sleep (1500)
    local status, result = luup.inet.wget("http://192.168.0.31/goform/formiPhoneAppDirect.xml?MSDOLBY%20DIGITAL", timeout)
    luup.sleep (1500)
    local status, result = luup.inet.wget("http://192.168.0.31/goform/formiPhoneAppVolume.xml?1+-31", timeout)
    luup.sleep (1500)
    local status, result = luup.inet.wget("http://192.168.0.31/goform/formiPhoneAppPower.xml?2+Poweron", timeout)

    • 0
    Posted

    Yes...

    Have opened your QA file and you didn't add function name to call.

    Open QA editor, press on the button and add

     

    Please login or register to see this spoiler.

     

    • 0
  • Inquirer
  • Posted

    did that but forget to save.

     

    now saved : console :

     

    [08.05.2025] [12:14:15] [TRACE] [QUICKAPP426]: onAction: {"deviceId":426,"manual":true,"args":["onReleased","button_ID_0_1"],"actionName":"UIAction"}[08.05.2025] [12:14:15] [TRACE] [QUICKAPP426]: UIEvent: {"values":[],"deviceId":426,"elementName":"button_ID_0_1","eventType":"onReleased"}[08.05.2025] [12:14:20] [DEBUG] [QUICKAPP426]: Operation canceled

    • 0
    Posted

    Looks ok, but your http request returns "Operation cancelled"

    Please check Syntax, I don't see Poweroff command in your Vera examples. Are you sure it is supported?

    Didn't find the Poweroff command in Denon documentation also.

     

     

     

    • 0
  • Inquirer
  • Posted

    Great it works, sorry I assumed (seemed logical) that poweron (which did work in my browser) could be replaced by poweroff but the correct command is Powerstandby... which works!
    How can I add multiple commands to this?

    • 0
  • Inquirer
  • Posted

    Do I need to add a button for each command to activate it or can this be done in one action?

     

    Please login or register to see this image.

    /monthly_2025_05/image.png.e084fb25e39548f50f56812075fb4ff1.png" />

     

    old Vera :

    Please login or register to see this attachment.

    • 0
    Posted

    You can do it either way, to create buttons or to create one action that sends all commands.

    Please post what exactly you did with Vera 

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