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


  • 1

Quick App for WLED Http Call


Question

Posted (edited)

I am trying to create a QuickApp for the new Home Center 3 for controling my WLED lighting which before I used a VD in HC2.

 

There is so much information on this forum going in all sorts of directions on how to achieve this relativly simple HTTP request. I am finding this very confusing as how to achive this.

 

I have created a QuickApp as device controller and give it a series of buttons (on the left side of page) which I would like to be able to click and send a HTTP request to make the WLED light go On or Off, or change colour, Example of VD buttons from HC2 below

 

Toggle WLED light On or Off when pressed

 

Button Name:- Toggle

 

Required action on pressing button below:-

 

HTTP = Net.FHttp("192.168.1.16")
response, status, errorCode = HTTP:GET("/win&T=2")
if ( errorCode == 0 )
then
print("OK!")
end

 

Change colour pattern and effect when pressed (LAPD effect)

 

Button Name :- LAPD 

 

Required action on pressing button below:-

 

HTTP = Net.FHttp("192.168.1.16")
response, status, errorCode = HTTP:GET("/win&FX=38&FP=16")
if ( errorCode == 0 )
then
print("OK!")
end

 

Ultimately I would like to be able to activate these buttons from a scene at certain times of day, say nightime to switch on several WLED light systems throughout the house.

 

What I need is a start or example code for the Lua editor (on the right side of page). Finding it difficult to get started with this new system in HC3.

 

Any help would be appreciated. Like many have lots of time on my hands for testing now with the current global situation.

 

Keep safe everyone

 

 

 

 

 

 

Edited by Graham

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