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 for Sensibo don't work in VD


cuong.mhome

Question

Dear all, 

Pls help me for situation.

 

I'm try to intergate Sensibo (Smart IR for Air Conditioner),

But I got the problem when connect via Fibaro Virtual Device as:

 

1. With Web Browser it work.

Please login or register to see this link.

 

2. But I don't how to it work in FIBARO Virtual Device, I tried but it error?

 

local http = Net.FHttp("home.sensibo.com",80);
----------------------------------------
local Command  = '/api/v2/users/me/pods?fields=*&apiKey=O7LHDg0TID80NUyY0xqaqlGGlycqfg';

response ,status, errorCode  = http:GET(Command);

fibaro:debug(response);
fibaro:debug(status);
fibaro:debug(errorCode);

 

=> Error: 

[DEBUG] 18:46:21:
403 Forbidden
nginx

Link to comment
Share on other sites

Recommended Posts

  • 0

1st : http (ssl) doesn't work in VD

2nd:  

local http = Net.FHttp("home.sensibo.com",80);

should be

local http = Net.FHttp("home.sensibo.com",443);

 

but see 1st point.

 

total: you can't. all thanks to Fibaro devs who can't develop https connection in 2019y.

as workaround write scene and call this scene from VD

make in scene params and call from VD scene with params (for example turn on off etc)

  • Like 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thank you @10der

    I got your information, with scenes it work without any problem. (of course using  net.HTTPClient)

     

    Edited by cuong.mhome
    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    @cuong.mhomecould you show me you'r Scene?

     

    I get the part of VD not working with https.

    But I dont understand your last post.

     

    I dont understand API's and how to get data etc :-)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @Ibie

    It's mean I have to write program on Scenes.

    So, now I connect with Sensibo use VD make the interface and scenes to write the code. 

     

    By the way, I give some code. (It work for me):

    Hope it can help you. 

     

    1. Get the Sensibo Status: 
    function UpdateStatus(SensiboId,apiKey)  
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/'..SensiboId..'/acStates?fields=status,acState&limit=1&apiKey=' .. apiKey, {
          success = function(resp)
            if resp.status == 200 then         
                jsonResp = json.decode(resp.data);                
                  local Status = "Off";
                  if ( jsonResp.result[1].acState.on == true) then
                      Status = "On";
                end                
                  
                  local TargetTemp = jsonResp.result[1].acState.targetTemperature;
                  local mode = jsonResp.result[1].acState.mode;
                  local fanLevel = jsonResp.result[1].acState.fanLevel;
                  local tempUnit = jsonResp.result[1].acState.temperatureUnit;
                  local Swing = jsonResp.result[1].acState.swing;
                
                  if(TargetTemp == nil) then TargetTemp = "" end
                  if(mode == nil) then mode = "" end
                  if(fanLevel == nil) then fanLevel = "" end
                  if(tempUnit == nil) then tempUnit = "" end
                  if(Swing == nil) then Swing = "" end
              
                  local displayStatus = "Pow:".. Status .. ", Set:"..TargetTemp.. " " ..tempUnit;
                  local displayMode = "Mode:".. mode ..", Fan:" .. fanLevel .. ", Swing:" .. Swing;          
            end
          end
        })       
    end
    ----------------------------------
    2. Set Value to Sensibo: 

     

    ------ Set AC State ----------
    function SetProperties(SensiboId,apiKey,properties,value,isString)

      local myJson = '';
      if(isString == true) then
          myJson = '{"newValue": "'..value..'"}';
      else
        myJson = '{"newValue": '..value..'}';
      end
      
      fibaro:debug(myJson);
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/'.. SensiboId .. '/acStates/'..properties..'?apiKey=' .. apiKey, {
              error = function(err)
                fibaro:debug("Error : " .. err)
            end,
            options = {
                method = 'PATCH',
                timeout = 5000,
                headers = {
                    ["content-type"] = "application/x-www-form-urlencoded;"
                },
                data = myJson
            },
              success = function(resp)
                fibaro:debug("Respone OK")
              end
        })       
    end 

     

    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    Hi @cuong.mhome ,

     

    Nice work. I plan to do integration of Sensibo Sky in near future. The thing is I still don't have AC unit :-D 

    Link to comment
    Share on other sites

    • 0

    @cuong.mhome

     

    Could you share the complete VD you have for the Sensibo ?

     

    I am struggeling to get your code complete, like where to input the API key and PodID

     

    Hopefully you could share a bit more.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I try to post Scenes Code again.  

     

    local apiKey = "Your API Here"
    local LinkVitualDeviceId = 650;
    local SensiboDeviceId = "Your Sensibo Serial"

    function Main()
          strCmd = fibaro:getValue(LinkVitualDeviceId, "ui.lblCmd.value") 
      
          if(strCmd == "") then
            UpdateMeasurement(SensiboDeviceId,apiKey,LinkVitualDeviceId);
            UpdateStatus(SensiboDeviceId,apiKey,LinkVitualDeviceId);
        
        elseif (strCmd == "On") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"on","true",false)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Off") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"on","false", false)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
         elseif (strCmd == "Auto") then
            fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","auto", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Dry") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","dry", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Cool") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","cool", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Fan") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","fan", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Low") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","low", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Medium") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","medium", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "High") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","high", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "FanAuto") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","auto", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "SwingOn") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"swing","rangeFull", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "SwingOff") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"swing","stopped", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
            UpdateStatus(SensiboDeviceId,apiKey,LinkVitualDeviceId);
        
        else 
            fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"targetTemperature",strCmd,false)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")        
              return;
        end
    end

    --Funtion -----------------------
    ------ Update VD Value ----------
    function UpdateMeasurement(SensiboId,apiKey,vdId)
      
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/'..SensiboId..'/measurements?apiKey=' .. apiKey, {
          success = function(resp)
            if resp.status == 200 then        
                jsonResp = json.decode(resp.data);    
                  fibaro:call(vdId, "setProperty", "ui.lblActual.value", "Temp: " .. jsonResp.result[1].temperature .. ", Hum: "..jsonResp.result[1].humidity);

            end
          end
        })       
    end
    ----------------------------------
    ------ Update VD Value ----------
    function UpdateStatus(SensiboId,apiKey,vdId)
      
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/'..SensiboId..'/acStates?fields=status,acState&limit=1&apiKey=' .. apiKey, {
          success = function(resp)
            if resp.status == 200 then 
            
                jsonResp = json.decode(resp.data);                
                  local Status = "Off";
                  if ( jsonResp.result[1].acState.on == true) then
                      Status = "On";
                end                
                  
                  local TargetTemp = jsonResp.result[1].acState.targetTemperature;
                  local mode = jsonResp.result[1].acState.mode;
                  local fanLevel = jsonResp.result[1].acState.fanLevel;
                  local tempUnit = jsonResp.result[1].acState.temperatureUnit;
                  local Swing = jsonResp.result[1].acState.swing;
                
                  if(TargetTemp == nil) then TargetTemp = "" end
                  if(mode == nil) then mode = "" end
                  if(fanLevel == nil) then fanLevel = "" end
                  if(tempUnit == nil) then tempUnit = "" end
                  if(Swing == nil) then Swing = "" end
              
                  local displayStatus = "Pow:".. Status .. ", Set:"..TargetTemp.. " " ..tempUnit;
                  local displayMode = "Mode:".. mode ..", Fan:" .. fanLevel .. ", Swing:" .. Swing;
                  
                  fibaro:call(vdId, "setProperty", "ui.lblStatus.value", displayStatus);
                  fibaro:call(vdId, "setProperty", "ui.lblModeStatus.value", displayMode);
              
            end
          end
        })       
    end
    ----------------------------------

    ------ Set AC State ----------
    function SetProperties(id,apiKey,properties,value,isString)
      
      --local myJson = '{\"acState\":{\"on\":'..acState..',\"targetTemperature\":22,\"mode\":\"fan\",\"fanLevel\":\"low\"}}';
      local myJson = '';
      if(isString == true) then
          myJson = '{"newValue": "'..value..'"}';
      else
        myJson = '{"newValue": '..value..'}';
      end
      
      fibaro:debug(myJson);
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/vEWHLeej/acStates/'..properties..'?apiKey=' .. apiKey, {
              error = function(err)
                fibaro:debug("Error : " .. err)
            end,
            options = {
                method = 'PATCH',
                timeout = 5000,
                headers = {
                    ["content-type"] = "application/x-www-form-urlencoded;"
                },
                data = myJson
            },
              success = function(resp)
                fibaro:debug("Respone OK")
              end
        })       
    end 

    ------ Set AC State ----------
    function SetACState(id,apiKey,acState)
      
      --local myJson = '{\"acState\":{\"on\":'..acState..',\"targetTemperature\":22,\"mode\":\"fan\",\"fanLevel\":\"low\"}}';
      local myJson = '{"acState":{"on":'..acState..',"targetTemperature":22,"mode":"fan","fanLevel":"low"}}';
      fibaro:debug(myJson);
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/vEWHLeej/acStates?apiKey=' .. apiKey, {
              error = function(err)
                fibaro:debug("Error : " .. err)
            end,
            options = {
                method = 'POST',
                timeout = 5000,
                headers = {
                    ["content-type"] = "application/x-www-form-urlencoded;"
                },
                data = myJson
            },
              success = function(resp)
                fibaro:debug("Respone OK")
              end
        })       
    end 

    --------------------------------------
    Main();

     

    -----------------------------  Finish Program ------------------------

     

    @

    Please login or register to see this link.

    I try to post the VD for Sensibo, 

    It work together with the sceenes. 

    Please login or register to see this attachment.

    Edited by cuong.mhome
    • Like 1
    • Thanks 2
    Link to comment
    Share on other sites

    • 0

    @cuong.mhome Hi,

     

    Thank you for sharing sensibo integration.  My home has a number of sensibo sky. Right now I control each sensibo via IFTTT which is very limited. May I know how your scene work with the VD?

     

    I have been waiting for "true" integration of sensibo over a year ?

    Edited by Sirhideo
    Link to comment
    Share on other sites

    • 0
    6 hours ago, cuong.mhome said:

    I try to post Scenes Code again.  

     

    local apiKey = "Your API Here"
    local LinkVitualDeviceId = 650;
    local SensiboDeviceId = "Your Sensibo Serial"

    function Main()
          strCmd = fibaro:getValue(LinkVitualDeviceId, "ui.lblCmd.value") 
      
          if(strCmd == "") then
            UpdateMeasurement(SensiboDeviceId,apiKey,LinkVitualDeviceId);
            UpdateStatus(SensiboDeviceId,apiKey,LinkVitualDeviceId);
        
        elseif (strCmd == "On") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"on","true",false)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Off") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"on","false", false)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
         elseif (strCmd == "Auto") then
            fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","auto", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Dry") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","dry", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Cool") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","cool", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Fan") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"mode","fan", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Low") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","low", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "Medium") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","medium", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "High") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","high", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "FanAuto") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"fanLevel","auto", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "SwingOn") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"swing","rangeFull", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
        elseif (strCmd == "SwingOff") then
              fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"swing","stopped", true)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")
        
            UpdateStatus(SensiboDeviceId,apiKey,LinkVitualDeviceId);
        
        else 
            fibaro:debug(strCmd);
            SetProperties(SensiboDeviceId,apiKey,"targetTemperature",strCmd,false)
            fibaro:call(LinkVitualDeviceId,"setProperty","ui.lblCmd.value", "")        
              return;
        end
    end

    --Funtion -----------------------
    ------ Update VD Value ----------
    function UpdateMeasurement(SensiboId,apiKey,vdId)
      
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/'..SensiboId..'/measurements?apiKey=' .. apiKey, {
          success = function(resp)
            if resp.status == 200 then        
                jsonResp = json.decode(resp.data);    
                  fibaro:call(vdId, "setProperty", "ui.lblActual.value", "Temp: " .. jsonResp.result[1].temperature .. ", Hum: "..jsonResp.result[1].humidity);

            end
          end
        })       
    end
    ----------------------------------
    ------ Update VD Value ----------
    function UpdateStatus(SensiboId,apiKey,vdId)
      
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/'..SensiboId..'/acStates?fields=status,acState&limit=1&apiKey=' .. apiKey, {
          success = function(resp)
            if resp.status == 200 then 
            
                jsonResp = json.decode(resp.data);                
                  local Status = "Off";
                  if ( jsonResp.result[1].acState.on == true) then
                      Status = "On";
                end                
                  
                  local TargetTemp = jsonResp.result[1].acState.targetTemperature;
                  local mode = jsonResp.result[1].acState.mode;
                  local fanLevel = jsonResp.result[1].acState.fanLevel;
                  local tempUnit = jsonResp.result[1].acState.temperatureUnit;
                  local Swing = jsonResp.result[1].acState.swing;
                
                  if(TargetTemp == nil) then TargetTemp = "" end
                  if(mode == nil) then mode = "" end
                  if(fanLevel == nil) then fanLevel = "" end
                  if(tempUnit == nil) then tempUnit = "" end
                  if(Swing == nil) then Swing = "" end
              
                  local displayStatus = "Pow:".. Status .. ", Set:"..TargetTemp.. " " ..tempUnit;
                  local displayMode = "Mode:".. mode ..", Fan:" .. fanLevel .. ", Swing:" .. Swing;
                  
                  fibaro:call(vdId, "setProperty", "ui.lblStatus.value", displayStatus);
                  fibaro:call(vdId, "setProperty", "ui.lblModeStatus.value", displayMode);
              
            end
          end
        })       
    end
    ----------------------------------

    ------ Set AC State ----------
    function SetProperties(id,apiKey,properties,value,isString)
      
      --local myJson = '{\"acState\":{\"on\":'..acState..',\"targetTemperature\":22,\"mode\":\"fan\",\"fanLevel\":\"low\"}}';
      local myJson = '';
      if(isString == true) then
          myJson = '{"newValue": "'..value..'"}';
      else
        myJson = '{"newValue": '..value..'}';
      end
      
      fibaro:debug(myJson);
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/vEWHLeej/acStates/'..properties..'?apiKey=' .. apiKey, {
              error = function(err)
                fibaro:debug("Error : " .. err)
            end,
            options = {
                method = 'PATCH',
                timeout = 5000,
                headers = {
                    ["content-type"] = "application/x-www-form-urlencoded;"
                },
                data = myJson
            },
              success = function(resp)
                fibaro:debug("Respone OK")
              end
        })       
    end 

    ------ Set AC State ----------
    function SetACState(id,apiKey,acState)
      
      --local myJson = '{\"acState\":{\"on\":'..acState..',\"targetTemperature\":22,\"mode\":\"fan\",\"fanLevel\":\"low\"}}';
      local myJson = '{"acState":{"on":'..acState..',"targetTemperature":22,"mode":"fan","fanLevel":"low"}}';
      fibaro:debug(myJson);
      local http = net.HTTPClient()  
      http:request('https://home.sensibo.com/api/v2/pods/vEWHLeej/acStates?apiKey=' .. apiKey, {
              error = function(err)
                fibaro:debug("Error : " .. err)
            end,
            options = {
                method = 'POST',
                timeout = 5000,
                headers = {
                    ["content-type"] = "application/x-www-form-urlencoded;"
                },
                data = myJson
            },
              success = function(resp)
                fibaro:debug("Respone OK")
              end
        })       
    end 

    --------------------------------------
    Main();

     

    -----------------------------  Finish Program ------------------------

     

    @

    Please login or register to see this link.

    I try to post the VD for Sensibo, 

    It work together with the sceenes. 

    Please login or register to see this attachment.

    @cuong.mhome From my newbie lua knowledge the above code looks like a middleware which waits for different scene to parse the parameter into this scene, and then this scene connects to the sensibo API and do the things.

     

    If this is the correct understanding, could you please give an example of scene on how to let say.. press High button and 21 button?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @

    Please login or register to see this link.

    ,

     

    The code can't work in VD. (Fibaro problem) so We have to write the API code in Scenes. 

    Problem is:  Scenes can't don't have the interface, setting ...

    => We use the VD file is the User Interface to controll. 

     

    In this way, when you press the button, it will update the command label, and after that it will call the Scenes. 

    I make the scenes like the CODE BEHIDE. 

     

    On mistake in this code I forgot to change is: http:request('https://home.sensibo.com/api/v2/pods/vEWHLeej/acStates?apiKey=' .. apiKey, 

    vEWHLeej is serial number, but it still in the function. => You should to change it. 

     

    Thank you. 

     

     

    Link to comment
    Share on other sites

    • 0
    36 minutes ago, cuong.mhome said:

    Hi @

    Please login or register to see this link.

    ,

     

    The code can't work in VD. (Fibaro problem) so We have to write the API code in Scenes. 

    Problem is:  Scenes can't don't have the interface, setting ...

    => We use the VD file is the User Interface to controll. 

     

    In this way, when you press the button, it will update the command label, and after that it will call the Scenes. 

    I make the scenes like the CODE BEHIDE. 

     

    On mistake in this code I forgot to change is: http:request('https://home.sensibo.com/api/v2/pods/vEWHLeej/acStates?apiKey=' .. apiKey, 

    vEWHLeej is serial number, but it still in the function. => You should to change it. 

     

    Thank you. 

     

     

    @cuong.mhome , so after changing the serial number, the linked scene ID in your VD, in simple, for automation purpose, I can start to create a 3rd scene just to do let say

     

    if day == night then

          fibaro:call(sensiboVDID, "pressButton", X)

    end

     

    then your VD will call the scene above for operation, right?

     

     

    Edited by Sirhideo
    Link to comment
    Share on other sites

    • 0

    @cuong.mhome I get it to work! thank you! I am wondering 2 things about the VD though.

     

    1) where is the code that update the Actual and Status label?

    2) the Command label only appear after pressing any button but then the value disappear?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hello, 

     

    1. I just use function for update the VD stataus: 

    => "function UpdateStatus(SensiboId,apiKey,vdId)"

    2. Yes, the command label use to trans the parameter to Scenes. 

    After scenes get and action, it will clear the command status. 

     

    Link to comment
    Share on other sites

    • 0

    @cuong.mhome

     

    Thank you for the explanation.  By the way, I would suggest you to remove your API key and the device_id on this post for security purpose, once again thanks!!

    Edited by Sirhideo
    • Like 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks for your mention. 

    This is just test device, token also the sample. 

    So, it is not problem to show.

     

    On 10/25/2019 at 10:46 PM, Sirhideo said:

    @cuong.mhome

     

    Thank you for the explanation.  By the way, I would suggest you to remove your API key and the device_id on this post for security purpose, once again thanks!!

     

     

    Link to comment
    Share on other sites

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