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
pierre 0
Hi,
I'd like to send http request form the push of a button.
In the system I see only scene.
How to do that ?
So push button one and execute lua code like this:
--[[
%% properties
%% globals
–]]
local _deviceIp = fibaro:get(fibaro:getSelfId(), 'IPAddress') -- get the adress off ipx800V4
HC2 = Net.FHttp(_deviceIp)
response = HC2:GET("/api/xdevices.json?key=apikey&SetR=22")
fibaro:sleep(500)
response = HC2:GET("/api/xdevices.json?key=apikey&SetR=28")
fibaro:sleep(500)
response = HC2:GET("/api/xdevices.json?key=apikey&SetR=37")
fibaro:sleep(500)
response = HC2:GET("/api/xdevices.json?key=apikey&SetR=38")
fibaro:sleep(500)
response = HC2:GET("/api/xdevices.json?key=apikey&SetR=43")
fibaro:sleep(500)
response = HC2:GET("/api/xdevices.json?key=apikey&SetR=51")
fibaro:sleep(500)
-- fibaro:call(36,'turnOn'); -- ON Entree privee
fibaro:call(12,'turnOn') -- OFF lampe chevet kiki
Thanks a lot.
HC2 4.1800
Pierre
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.