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


Question

Posted

I am trying to show a globalVariables in the debugging console but it does not show can anyone help my with this.
i use this code first i change the variable this works but it does not show anything in the debug console

local requestData = {
value = 'Auto'
}
local responseData, status = api.put('/globalVariables/handautowoongang', requestData)

local data, status = api.get('/globalVariables/handautowoongang')

 

9 answers to this question

Recommended Posts

  • 0
Posted

Why not just use: 

Please login or register to see this code.

 

  • Like 1
  • 0
Posted (edited)
47 minutes ago, marius de jong said:

I am trying to show a globalVariables in the debugging console but it does not show can anyone help my with this.
i use this code first i change the variable this works but it does not show anything in the debug console
local requestData = {
value = 'Auto'
}
local responseData, status = api.put('/globalVariables/handautowoongang', requestData)
local data, status = api.get('/globalVariables/handautowoongang')

What exactly you expect on debug window? You need to use

fibaro.debug() or at least Lua standard print() functions to display something on debug window.

 

Edited by cag014
  • 0
  • Inquirer
  • Posted
    43 minutes ago, cag014 said:

    What exactly you expect on debug window? You need to use

    fibaro.debug() or at least Lua standard print() functions to display something on debug window.

     

    Yes sorry i forgot to add the debug but what i am trying is to debug a api value. i now tried the code below from my hc2
    i tried to change it so it works on the hc3 api

     

     

    local currentPanelName = "1"
    local PanelID = 1 --het gevonden id onder je_hc2_ip/api/panels/heating
    local panel, status = api.get("/panels/climate/" ..PanelID) --laad de volledige api string van dit PanelID
    local handSetPointCooling = panel.properties.handSetPointCooling --Haal de huidige ingestelde waarde op
    fibaro.debug(handSetPointCooling)
    • 0
    Posted
    18 minutes ago, marius de jong said:

    fibaro.debug(handSetPointCooling)

    This is incorrect...

    fibaro.debug("tag",handSetPointCooling)

    you must to add some tag, otherwise nothing printed.

    You can use print() function.

     

    • 0
  • Inquirer
  • Posted

    1 more question i cant seem to get the current temprature of the temprature sensor in the climate zone?

     

    --Slaapkamer Joris--
    local currentPanelName = "1"
    local PanelID = 1 --het gevonden id onder je_hc3_ip/api/panels/climate
    local panel, status = api.get("/panels/climate/" ..PanelID) --laad de volledige api string van dit PanelID
    local setpointjoris = panel.properties.currentTemperatureHeating --Haal de huidige ingestelde waarde op
    fibaro.debug("tag",setpointjoris)
     
    local currentPanelName = "1"
    local PanelID = 1 --het gevonden id onder je_hc2_ip/api/panels/climate
    local panel, status = api.get("/panels/climate/" ..PanelID) --laad de volledige api string van dit PanelID
    local tempratuurjoris = panel.properties.currentTemperature --Haal de huidige ingestelde waarde op
    fibaro.debug("tag",tempratuurjoris)
     
    --Slaapkamer Joris--
     
    if setpointjoris < tempratuurjoris
    then   print("aan")
    else   print("uit")
    end
    • 0
    Posted (edited)

    try to see what you get in Swagger

    Please login or register to see this spoiler.

     

    Edited by cag014
    • 0
    Posted

    Hi!

    Any success in getting Temperature SetPoint from Climate panel in HC3?

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