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
Dman568 2
Hi All
I have setup my aircon to be controlled via a virtual device over IP and it is working well, I am now creating scenes to do certain things. One of the things i want to do is set a certain temperature with certain scenes in the right conditions. This is the code for the virtual device to change the temp down, this works well
local selfId = fibaro:getSelfId()
local selfIp = fibaro:get(selfId, "IPAddress")
local selfPort = fibaro:get(selfId, "TCPPort")
local TempDec = tonumber(fibaro:getValue(237, "ui.Temp.value")) - 1
local aircon= Net.FHttp(selfIp,selfPort)
response,status,errorCode = aircon:GET('/setAircon?json={"ac1":{"info":{"order":0,"setTemp":'.. TempDec.. '.0},"zones":{}}}')
If I type IPAddress:Port//setAircon?json={"ac1":{"info":{"order":0,"setTemp":23.0},"zones":{}}} into a web browser it will set the temp to 23, the question is what code do i use in a LUA scene to send this to the aircon
Any help appreciated
2 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.