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
Search the Community
Showing results for tags 'api'.
-
Hello I noticed that API calls using updateProperty are no more working. But if I use setProperty,it is back ok. Questions : is this permanent change ? should I change all my QA where I'm using self:updateProperty("...", ...) by self:setProperty("...",...) is this change only for physical z-wave devices or for all devices, including QA Are there other API changes ? Thank you for your feedback
-
- api
- updateproperty
-
(and 1 more)
Tagged with:
-
Hi guys! I would like to say that I am a beginner on Fibaro. I would like to integrate my LED strip on HC3. I have the API Key, I downloaded the fqa file (from here https://marketplace.fibaro.com/items/govee-colorled-controller-qa) but I don't know how to proceed. I have created the Quick App, but I don't know what I have to do to configure it. Can anyone help me?
-
Error 403 on QuickApp http request
edouardc posted a question in Other Devices / Third-party devices
Hi Team, I try to develop some QuickApp on my HC3, but I have an problem with the http request : When I call an API (here switchbot api), the external API respond me an 403 error... The probleme isn't the API because the same request with an little php script works... I have tried much methods but I get only the response code 403. Recently, I have downloaded an quickapp on the marketplace. All review on it are good but for me, it's doesn't work. When I see the console logs, I can see the 403 error code from this downloaded QuickApp too. Do you have an idea for my problem ? You can find my function code here : function QuickApp:GetDeviceList() self.http = net.HTTPClient({timeout=10*1000}) local apikey = self:getVariable("apikey"); self:debug(apikey); --For debug an my token is successfuly loaded local address = "https://api.switch-bot.com/v1.0/devices" --local address = "http://10.0.10.10:1880/debug" self.http:request(address, { options = { headers = { ["Authorization"] = apikey, ["Content-Type"] = "application/json; charset=utf8", ["Accept"] = "application/json", ["User-agent"] = "Mozilla/5.0" --For try but no change }, checkCertificate = false, method = 'POST' }, success = function(response) self:debug(response.status); --return : 403 self:debug(response.data); --return: nothing self:debug(response.headers);--return: array self:debug(message); --return: nil end, }); end -
I am trying to start a boiler and a heater from an URL that has a lot of prices and timestamps. I am using Home Center 2. I have no idea where to start from, I understand I need VD (Virtual Devices) and Scenes, but anything I have tried hasn't worked sadly. How can I start a boiler and a heater during the lowest prices with JSON timestamp values from an URL? If required, I can post the URL here. Can anyone help me?
-
Hello. I have written a code in LUA 5.4 which gives me a list of prices and timestamps through a URL, and on FIBARO HC2 it wont work. I understand that FIBARO HC2 uses Lua 5.1 or something like that. I am trying to start a boiler and a heater using HC2, but I have no idea how to start with that. How can I start the boiler and a heater at the time when prices are low on HC2 using a website URL? If required, I will provide more information in the comments. Thanks in advance.
- 1 reply
-
- automation
- api get
- (and 4 more)
-
Im trying to turn on my AC using a http request. I am able to turn lights on and off as well as other things no worries, but turning the AC on isn't working. I have a remotec ZXT-600, I am assuming it has to do with not having the right arguments in there. The back end of the url is /api/devices/58/action/setThermostatMode with the arguments as blank { "args": [ "{}", "{}" ], "delay": 0, "integrationPin": "1234" } My question is how and where do I pass in an argument with an action for it to turn to cool or heat. Below is the device data. Any help is appreciated. { "id": 58, "name": "AC Lounge", "roomID": 219, "view": [ { "assetsPath": "/dynamic-plugins/com.fibaro.hvacSystem/assets", "jsPath": "/dynamic-plugins/com.fibaro.hvacSystem", "name": "com.fibaro.hvacSystem", "translatesPath": "/dynamic-plugins/com.fibaro.hvacSystem/i18n", "type": "ts" } ], "type": "com.fibaro.hvacSystem", "baseType": "com.fibaro.device", "enabled": true, "visible": true, "isPlugin": false, "parentId": 57, "viewXml": false, "configXml": false, "interfaces": [ "battery", "coolingThermostatSetpoint", "fibaroFirmwareUpdate", "heatingThermostatSetpoint", "thermostatFanMode", "thermostatMode", "zwave" ], "properties": { "parameters": [ { "id": 27, "lastReportedValue": 17, "lastSetValue": 17, "size": 2, "value": 17 } ], "pollingTimeSec": 0, "zwaveCompany": "Remotec", "zwaveInfo": "3,4,33", "zwaveVersion": "1.7", "batteryLevel": 92, "batteryLowNotification": true, "categories": [ "climate" ], "configured": true, "coolingThermostatSetpoint": 19, "coolingThermostatSetpointCapabilitiesMax": 31, "coolingThermostatSetpointCapabilitiesMin": 16, "coolingThermostatSetpointFuture": 19, "coolingThermostatSetpointStep": { "C": 0.5, "F": 1 }, "dead": false, "deadReason": "", "defInterval": 0, "deviceControlType": 1, "deviceIcon": 70, "deviceRole": "Other", "endPointId": 0, "firmwareUpdate": { "info": "", "progress": 0, "status": "UpToDate", "updateVersion": "1.7" }, "heatingThermostatSetpoint": 28, "heatingThermostatSetpointCapabilitiesMax": 31, "heatingThermostatSetpointCapabilitiesMin": 16, "heatingThermostatSetpointFuture": 28, "heatingThermostatSetpointStep": { "C": 0.5, "F": 1 }, "log": "", "logTemp": "", "manufacturer": "", "markAsDead": true, "maxInterval": 0, "minInterval": 0, "model": "", "nodeId": 9, "parametersTemplate": "0", "productInfo": "82,84,1,2,132,144,1,7", "saveLogs": true, "serialNumber": "", "setpointExpiryDate": 0, "stepInterval": 0, "supportedDeviceRoles": [ "Other" ], "supportedThermostatFanModes": [ "AutoLow", "Low", "High", "Medium" ], "supportedThermostatModes": [ "Off", "Heat", "Cool", "Auto", "Resume", "Fan", "Dry" ], "supportsThermostatFanOff": true, "thermostatFanMode": "High", "thermostatFanOff": false, "thermostatMode": "Cool", "thermostatModeFuture": "", "thermostatModeManufacturerData": [], "unit": "C", "updateVersion": "", "useTemplate": false, "userDescription": "" }, "actions": { "abortUpdate": 1, "reconfigure": 0, "retryUpdate": 1, "setCoolingThermostatSetpoint": 1, "setHeatingThermostatSetpoint": 1, "setInterval": 1, "setThermostatFanMode": 1, "setThermostatMode": 1, "startUpdate": 1, "updateFirmware": 1 }, "created": 1646027026, "modified": 1646027026, "sortOrder": 24 }
- 13 replies
-
- api-commands
- api call
-
(and 2 more)
Tagged with:
-
At the moment I'm working on trying to integrate the Somfy Tahoma/Switch IO system. At my local system (with TQAE) I can connect to the API to get a access token. When I run exactly the same code on the HC3 I get a HTTP 404 error (Page Not Found). The code isn't that complicated: function QuickApp:GetAuth() local url = "https://accounts.somfy.com/oauth/oauth/v2/auth?response_type=code&client_id=o59WTNp303e1ABRg1j4bJ8COYGGmEZdc6N8X1_CRDyyWE6&grant_type=authorization_code" self.http:request(url, { options = { headers = {["Content-Type"] = "application/x-www-form-urlencoded"}, method = 'GET', }, success = function(response) self:debug(response.status) --self:debug(response.headers) local csrf_token = string.match(response.data, "value=\"(.-)\"") self:debug(csrf_token) print(response.data:gsub("<","<")) --self:getToken(csrf_token) end , error = function(message) self:debug("error:", message) end }) end The HC3 doesn't show me the body or headers when an error occurs. In the message variable only the error code is shown (404). Has someone experience with this? I tried everything, it looks like they are blocking traffic from the HC3. I tried to add another User-Agent string, but no luck.
-
hi, i need to send this command "https://IP/api/callAction?deviceID=136&name=pressButton&arg1=1" to HC3 but the answer is "Class does not have pressButton function defined - action ignored". To do this I created a quick app of the type "remote controller" but i think is not the same as a "virtual device" https://forum.fibaro.com/topic/12399-beta-api-http-commands-3341/page/5/ so I would like to know how to create a virtual device who responds to the action call. thanks
-
Hello, I have just installed a AirSend box. With the AirSend you can send Operate all devices with a 433Mhz protocol like gates, blinds, garage doors etc. After installation you can operate your devices by the use of their APP , a cloud application or by just open a website (for every device/command a different) I have been trying to do this from my HC2 but even with the use of many examples i have found I didn't succeed to get it to work. Has anyone already interfaced with the AirSend. A typic webcall would look like "https://airsend.cloud/device/16199/command/4/?session=ddf1352a983e717fcee0c8c4fe78289c2a19c8e5a2786be77868fd15f41017653bfe55dfce2b47d90487d3f0d2eeb4b16fba053b139f91071444e1d8cb821de7" There is also an other way of interfacing through a API (https://airsend.cloud/api-docs) I don't know what the better option would be. Any one can give some help please
-
Cześć, Mam zagwózdkę z komendą api.put Chcę zmianić parametr urządzenia (nie VD, nie sceny) (np. ikony) Jeśli chodzi o zmianę nazwy urządzenia to rozwiązałem to w ten sposób: --[[ %% autostart %% properties %% weather %% events %% globals --]] function main() local jHome = json.decode(fibaro:getGlobalValue("jMyHomeIDs")) end api.put('/devices/118', {name='pompa'}) działa (może komuś przy okazji się przyda bo przykładów jak używać api.put jak na lekarsto (zwłaszcza odnośnie urządzeń a nie VD) natomiast już: api.put('/devices/118', {"properties": {"deviceIcon":1022}}) niestety nie działa, mimo iż po wpisaniu {"properties": {"deviceIcon":1022}} w http://192.168.1.2/docs/ daje pożądany rezultat i zmienia ikonę proszę o ewenetualne nakierowanie gdzie błąd!? Z góry dziękuję PS. Chcę wykorzystać zmianę ikony (jak i innych parametrów) w ten sposób że do jednego gniazdka streowanego przy pomocy relay switch podłączam rózne urządzenia w zależności od pory roku.
- 2 replies
-
- deviceicon
- api.put
-
(and 3 more)
Tagged with:
-
HC3, version: 5.050.13 API endpoint: /events/history Parameter: lastId (Description: requests with id<=lastId will be skipped (only more recent entries then lastId will be returned) Test call: https://HC3-IP/api/events/history?lastId=330776&numberOfRecords=2 Result: [ { "data": { "id": 78, "newValue": 23.5, "oldValue": 23.6, "property": "value" }, "id": 330775, "objects": [ { "id": 78, "type": "device" } ], "sourceId": 0, "sourceType": "system", "timestamp": 1606766914, "type": "DevicePropertyUpdatedEvent" }, { "data": { "id": 27, "newValue": false, "oldValue": true, "property": "value" }, "id": 330774, "objects": [ { "id": 27, "type": "device" } ], "sourceId": 0, "sourceType": "system", "timestamp": 1606766874, "type": "DevicePropertyUpdatedEvent" } ] It seems data are returned in wrong order, not recent but older entries are returned.
-
Need help on how to login to UNFI API on UDM-PRO
Brunanchon posted a question in Scenes and Interface
Hello, Just migrated from a ClouKey to the new UniFi Dream Machine Pro. I’m using the API for presence monitoring. I can’t manage to login to the new API from HC2. It's easy to login from POSTMAN: But the following code on HC2 doesn't work: local username = "XXXXXXXXX" local password = "YYYYYYYYY" local httpClient = net.HTTPClient() httpClient:request("https://192.168.0.254:443/api/auth/login", { success = function(response) print(json.encode(response.data)) end, error = function(err) print('httpClient:request() : Error : ' .. err) end, options = { method = 'POST', checkCertificate = false, data = json.encode({username=username, password=password}) } }) It returns a 401 error: { "data" : [ ] , "meta" : { "msg" : "api.err.LoginRequired" , "rc" : "error"}} More info here: https://ubntwiki.com/products/software/unifi-controller/api Has any of you an idea on how to manage this? Thx! -
HC2 i rekuperator Polski reQnet jest API
vikizgoda posted a question in Other Devices / Third-party devices
Witajcie forumowicze, Rozpoczynam wątek połączenia HC2 z rekuperatoremp polskiej firmy reQnet. Dostałem od działu progrmistuów REST API do tego rekuperatora. Na tą chwilę czekam na wszystkie zabawki jak dojadą. Jeśli ktoś z Was posiada rekuperator reqnet proszę o info. Razem raźniej. https://reqnet.pl *** Hello forum members, I am starting the topic of connecting HC2 with an air ventilation unit from the Polish company reQnet. I got a REST API for this unit from the programming department. At the moment I am waiting for all the toys when they arrive. If any of you have a reqnet air unit, please let me know. Better together. https://reqnet.pl- 5 replies
-
- rekuperacja
- hc2
-
(and 2 more)
Tagged with:
-
Hi all, I am trying to create a virtual light switch which will fire out an on and off command to a network interface from a third party. I already have a server on the network listening for the commands for example the on command is http://(server ip address:port)/commands for on off command is http://(server ip address:port) commands for off Can it be done? any help would be super appreciated
-
Hello everybody, I was wondering is it possible to develop a plugin for HC2, I'd like to connect my Sonoff devices to my HC. But i have to use ewelink-API but i can't import it into the Lua code. I've successfully that API into Homey app on Homey pro. I was hoping to do the same with Fibaro Home center. anyone has an idea how this could be done. Thanks in advance
-
Hi, I have a FGRM222 and I'm using REST API to read the properties of the device. I think that property called "value" is the raise/lower percentage. I suppose that property "value2" contains the information about the positioning of lamellas... but in my system it's always 0. I'm able to open and close lamellas but this value doesn't change. Is there anyone who knows why?
-
I am building a small app (in Flutter) that needs to get data from the API of my HC3. I am not quite sure how to log in programmatically from within this app. Does the API provide a token to use with all requests, or do I need to provide username and password with each request? An how do the header have to look? Many thanks!
-
I am trying to get a list of sections in house, to use in a QA. From my browser I can do a http request like: http://IP_HC3/api/sections to get this list. Is there a way to do this directly with a fibaro function? Can't find anything in the API docs.
-
Hello, I'm trying to make a method in my C# application which either turns on or off a Wall Plug. If I'm using the POST method/devices/{deviceID}/action/{actionName} on the "FibaroIpAddress/docs" API website, it works e.g. when I type in 11 as deviceId and turnOn/turnOff in actionName. the website then tells me that the request URL will look like this: http://IpAddress/api/devices/11/action/turnOff or http://IpAddress/api/devices/11/action/turnOn In my application I then use the same request URL with the code: try { var endPoint = new Uri(url); //stores credentials for the API access var cache = new CredentialCache { { endPoint, "Basic", new NetworkCredential(userName, password) } }; // Create a new request to the URL endpoint. var request = WebRequest.Create(endPoint); // Adds credentials to the WebRequest. request.Credentials = cache; //Assign the response object of 'WebRequest' to a 'WebResponse' variable using (var response = request.GetResponse()) { //Reads everything from the API call and stores it. using (var reader = new StreamReader(response.GetResponseStream())) { toReturn = reader.ReadToEnd(); } } } catch (UriFormatException e) { Console.WriteLine("Error:" + e); } But nothing happens when this runs. I've also tried this code: // Creates a endpoint to the url. var endpoint = new Uri(url); // Creates credentials for the endpoint. var cache = new CredentialCache { { endpoint, "Basic", new NetworkCredential(userName, password) } }; // Creates a new request and sets credentials. var request = (HttpWebRequest)WebRequest.Create(endpoint); request.Credentials = cache; // Specifies request. request.Method = "POST"; request.ContentType = "application/json"; request.Timeout = 5000; // Gets a streamObject to use to write request data. var dataStream = request.GetRequestStream(); // Sends the data. dataStream.Flush(); But nothing happens here either. I've use the same code for different GET requests or PUT requests (e.g. change name of device) and it works. I've also tried to just run the request URL directly into my browser, but nothing happens there either. Does someone know what I'm doing wrong?
-
Hi I'm trying to access the Fibaro API from a M5Stack-device. I'm already interfacing a Homey to my HC2 using "embedded user/password" in the url...and this works. On on the M5Stack i get a 401/(unauthorized access) in return when using the "embedded username/password" approach, so I guess that this is not a feasible way. It seems that i need to enter the url (which should be ok), and some information in as "headers" and "data". It's probably in there I need to enter the username and password....as well as "Content-type"?? Can anyone point me in the correct direction...what information to put where?
-
Hi Everyone. So, firstly a bit of background. I am playing with improving the current SONY TV control. Currently there is only one working control and that is the current VD, but there is a PLUGIN that doesn't work for the newer Android tv's So after a lot of head scratching and googling i have figured that the Sony TV has a REST API that can be connected to with a HTTP request. The Sony actually has three ways to control it IRCC (IR codes over IP), Serial and REST API. the current VD uses IRCC and cant go directly to say HDMI3 or an app you have installed. This is where the REST API is far better. I have figured out the syntax for the HTTP call to get it work with the help of a program called POSTMAN and i can do all sorts of control. End background..... But here is where i am falling short, the trick with the HTTP string is in the header (it must be in the header AFAIK) it needs to have, at least: Header KEY = x-auth-psk Value = 0000 KEY = host Value = 192.168.1.12 (IP of the originating unit) in the body you send (no quotes) "{"method":"setPowerStatus","version":"1.0","id":1,"params":[{"status":true}]}" That will turn the TV on. So playing with a few other Virtual Drivers for other integration I somewhat understand the GET command. (this is from the "control by web" web relay driver) GET /state.xml?relay1State=1&noReply=1 HTTP/1.1 0x0D0x0A0x0D0x0A So i understand the GET part of the statement, but then i run into the HTTP/1.1 part. I cant find anything that explains the HTTP/1.1 and what it needs what options it has and how I need to use it. For instance, why does it need a HEX string that says (no quotes) 'Carriage return 'newline' 'carriage return 'new line' So can anyone point me at the correct learning section or help me out with a command that can integrate x-auth-psk as the key and 000 as the value into the header of a HTTP request? That command will just turn the TV on, but you can string them together. Why? Imagine this: while sitting on you couch watching TV, your CCTV/IPC NVR closes one of its alarm contacts on say motion detection. I would like to know that there is motion on my security cameras while i am at home...... So a scene could be run in combination with the Virtual Driver to: Test if the TV power is on. Test if the PLEX or NETFLICK app is running Record current state Pause current state ( ie pause video or movie) Change the input to HDMI3 (to view the cameras directly from the NVR output.) wait till alarm is cleared (lets say motion) return to Plex or netflicks All of that would very VERY hard to do with IR codes. Fodder.
-
I'm hoping someone can assist me in working out why the API is incorrect when using the Fibaro Alarm. When Disarmed, the API call http://192.168.1.223:80/api/panels/fibaroAlarm returns the correct status (note this is just the last section of the result) ...."armed": false, "fibaroAlarm": false, "alarmEnabled": true When Armed, the API call also returns the same "armed":false value I also have a HCL, which is working as expected with the API. See the attached screen shots.
- 1 reply
-
- alarmpanel
- alarm
-
(and 1 more)
Tagged with:
-
Greetings, I see there is a value "atHome" for every user on HC2. Can be changed by API? It looks very promising for alarm functionality.
-
Witam, mam problem z jedną sceną, chciałem żeby akcja wykonywała się tylko kiedy jestem w domu, niestety nie działa. Jedną z rzeczy jakie próbowałem to poprawienie lokalizacji domu na mapie. Nie wiele to daje, ale w związku z tą mapą to dlaczego widnieje na niej napis że jest tylko do celów developerskich? Fibaro nie zapłaciło licencji dla Google? To tak można? Spróbowałem zaktualizować lokalizację z api i tu kolejne rozczarowanie, fibaro ma nowy typ odpowiedzi na request w postaci restartu centralki. Ręce opadają. Może ktoś miał podobne problemy z scenami z lokalizacją? Czego jeszcze spróbować?
-
- lokalizacja
- scena
-
(and 2 more)
Tagged with:
-
I try to build a scene that can search by the ip address of VD and return the device id. I have the following code just to display all the VDs that have IP but I do get nothing.... any help? --[[ %% properties %% events %% globals --]] local devs = api.get('/devices') for k,v in ipairs (devs) do -- fibaro:debug("01") local v2 =api.get("/devices/"..v.id) -- fibaro:debug(v2.id) for m,n in ipairs (v2.properties) do fibaro:debug(n.ip) if n.ip=="192.168.13.12" then fibaro:debug("device IP found") else fibaro:debug("Not Found!") end end end
- 5 replies
-
- api
- virtual device
-
(and 1 more)
Tagged with: