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


Search the Community

Showing results for tags 'http'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

  1. I am new with Fibaro, but worked earlier with Popp controler. I want to switch on and off the alarm of the camera by a http command (http://IPcamera/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=xxx&pw=yyy). What is the best way to do it? Please provide details (I really don't know much about programming in LUA). Thanks for your help!
  2. 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?
  3. HTTP request crashes frequently on HC3L showing below message: Unknown error occurred: LuaEnvironment: /data/vendor/avhttp/avhttp/impl/http_stream.ipp:2312: void avhttp::http_stream::handle_skip_crlf(const MutableBufferSequence&, Handler, boost::shared_array, const boost::system::error_code&, std::size_t) [with MutableBufferSequence = boost::asio::mutable_buffers_1; Handler = boost::function; std::size_t = unsigned int]: Assertion `crlf[0] == '\r' && crlf[1] == '\n'' failed. Have tried many options to catch what exactly is the problem, without success. Is anyone having same problem?
  4. When the success() function is executed after an http request, are there any constraints on what can be done within that function? I am not thinking about starting another http request, instead I wonder if I try to update my child devices as part of the function would be a problem. One thing that could happen (rarely, I hope, but still a possibility): if the child device had been deleted between iterations, my child device update procedure would create a new child device. So there is a minimal amount of overhead with simply updating the child device but probably twice as much overhead involved in the creation process. It strikes me that many of the examples of success() functions are short, sweet, and to the point. Currenty my development stores that data and deals with it on the next polling loop (about every ten seconds). But it also means that the device data is already ten seconds old when it gets updated. For my current devices the request/response time is short because it is on the same home network. I have another device I want to create that I am forced to go out to the cloud to control. That is not ideal but it is what it is. Thank you for any assistance. Peter
  5. Using code from other posts I am trying to invoke an external URL: for the time being I'm interacting with a simple RequestBin that is working perfectly fine. The following code is always returning 400 in the success and never reaches the endpoint. function call(url) net.HTTPClient():request(url, { options={ method = 'GET', }, success = function(response) print(response.status) print(response.data) end, error = function(message) print("error:", message) end }) end call("https://someurl.net?heater=0&setpoint=169&thermostat=0") The output I see from the console is the following: [20.08.2022] [18:27:15] [DEBUG] [SCENE5]: 400 [20.08.2022] [18:27:15] [DEBUG] [SCENE5]: 400 Bad Request 400 Bad Request For context, I am able to connect locally and remotely to the HC3L and I can invoke RequestBin from the same network the HC3L is on. After looking for solutions in other threads I think I am missing somethign very silly but also important. Thanks in advance!
  6. 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
  7. Hello Forum members, I am a Newbie on Fibaro HC2 / LUA and struggling with my next project: I have a Hydrawise Irrigation Controller (sister company of Hunter). This controller is already smart and adjusting the irrigation schedule based on weather data via WUnderground. My plan is to track the status of each zone in HC2 and switch the pump (wall plug) on and off. API key is available and the connection is working on browser and in LUA code. I can run and stop specific irrigation zones via code but I do not know how to get the datastring into HC2 variables. start relay 485761 / zone 3 for 600 seconds: local http = net.HTTPClient() http:request('https://api.hydrawise.com/api/v1/setzone.php?action=run&api_key=XXXXXX&period_id=999&relay_id=485761&custom=600') stop same relay: http:request('https://api.hydrawise.com/api/v1/setzone.php?action=stop&api_key=XXXXXXX&relay_id=485761') Both is working and I can see the effect on the Hydrawise controller. code for the statusschedule: https://api.hydrawise.com/api/v1/statusschedule.php?api_key=XXXXXXXXX I receive following string in the browser: {"time":1613911956,"nextpoll":60,"message":"","simRelays":1,"options":17,"master":12,"master_timer":0,"master_post_timer":0,"expanders":[],"sensors":[{"input":0,"type":1,"mode":1,"timer":0,"offtimer":0, "relays":[{"id":485761},{"id":488979},{"id":488980},{"id":488981}]}], "relays":[{"relay_id":488979,"time":1576800000,"type":110,"run":0,"relay":1,"name":"Rasen Terrasse","period":259200,"timestr":""}, {"relay_id":488980,"time":1576800000,"type":110,"run":0,"relay":2,"name":"Beete Eingang","period":259200,"timestr":""}, {"relay_id":485761,"time":1576800000,"type":110,"run":0,"relay":3,"name":"Rasen Erker","period":259200,"timestr":""}, {"relay_id":488981,"time":1576800000,"type":110,"run":0,"relay":4,"name":"Hochbeet","period":259200,"timestr":""}] Hopefully somebody can support in this topic. Hydrawise REST API.pdf
  8. My goal is to send device changes from +- 20 fibaro devices to another api system. My devices are motion sensors, door sensors, smoke sensors and wallplugs. I started to make a lua script: { operator = "any", conditions = { { type = "device", id = 21, property = "value", operator = "anyValue", isTrigger = true }, { type = "device", id = 24, property = "value", operator = "anyValue", isTrigger = true } } } How to make this script more generic, for example a script that triggers on every change in a range of devices? is that possible. For example for device 1, 2, 7 and 10 a http request must be send when data changed for motion, light or temperature? In the action i started a Quickapp, because i can't find a way to send direct http commands here: fibaro.call(25, "turnOn") How to get the ID and the VALUE this scripts is triggered from? After that i make a Quickapp: function QuickApp:turnOn() self:debug("binary switch turned on") self:updateProperty("value", true) self:fcCommands("true") end function QuickApp:turnOff() self:debug("binary switch turned off") self:updateProperty("value", false) self:fcCommands("false") end function QuickApp:fcCommands(cmd) local address = "http://USER:PWD@IP/scada-remote/request.cgi?m=json&r=grp&fn=write&alias=KNXGROUP&value=" ..cmd self.http:request(address, { options={ headers = { Accept = "application/json" }, checkCertificate = true, method = 'GET' }, success = function(response) self:debug("response status:", response.status) self:debug("headers:", response.headers["Content-Type"]) local data = json.decode(response.data) end, error = function(error) self:debug('error: ' .. json.encode(error)) end }) end function QuickApp:onInit() self:debug("onInit") self.http = net.HTTPClient({timeout=3000}) end But now i get a http 401, how to solve this? Anyone a better or more generic way to send data to another system with a api request?
  9. 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
  10. 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!
  11. I have a sliding gate, which can send http commands when its state is opened or closed. Is it possible, that the HC2 can receive such a command, so that I can trigger for example a scene?
  12. Guys, i simple need to send this command using a VD: Button1: PUT http://admin:[email protected]/ISAPI/ContentMgmt/record/control/manual/start/tracks/101 Button2:PUT http://admin:[email protected]/ISAPI/ContentMgmt/record/control/manual/stop/tracks/101 How can i do? Do u have some example? There ia also a way to check the status of the command? Regards Gianluca
  13. I need to control a Daikin VRV multi-split HVAC system which has their intelligent touch controller with the HTTP interface option installed. To control each individual indoor unit I need to send an HTTP POST. Below is an example of the information the controller is expecting the HTTP POST to contain... Here is an example to get A/C "1:1-02" current status. HTTP Request POST /cmd/ HTTP/1.1 ¥r¥n Content-Length: 32¥r¥n Content-Type: application/octet-stream¥r¥n ¥r¥n 20 000000 {Command Size;32} 74 110100 {Command ID;70004} 00 000000 {Reserved 1} 00 000000 {Reserved 2} 04 {A/C Address to get status; 1:1-00 to 1:1-07 (1:1-02 is enable)} ------- 00 {A/C Address to get status; 1:1-08 to 1:1-15} 00 {A/C Address to get status; 1:2-00 to 1:2-07} 00 {A/C Address to get status; 1:2-08 to 1:2-15} 00 {A/C Address to get status; 1:3-00 to 1:3-07} 00 {A/C Address to get status; 1:3-08 to 1:3-15} 00 {A/C Address to get status; 1:4-00 to 1:4-07} 00 {A/C Address to get status; 1:4-08 to 1:4-15} Request Command (hexadecimal) 00 {A/C Address to get status; 2:1-00 to 2:1-07} 00 {A/C Address to get status; 2:1-08 to 2:1-15} 00 {A/C Address to get status; 2:2-00 to 2:2-07} 00 {A/C Address to get status; 2:2-08 to 2:2-15} 00 {A/C Address to get status; 2:3-00 to 2:3-07} 00 {A/C Address to get status; 2:3-08 to 2:3-15} 00 {A/C Address to get status; 2:4-00 to 2:4-07} 00 {A/C Address to get status; 2:4-08 to 2:4-15} --------- I am trying to create a virtual device for each indoor unit (room) and have looked at a lot of posts and tutorials and can’t find anything similar to point me in the right direction, so any ideas how to get this up and running appreciated...
  14. Dear forum readers, I wanted to make HTTP request to an IP device of mine. to make it possible to send a body to a Url so that the variables wil change. i have 4 buttons in my virual device and each have to send its one variables to the ip device the Data of the body has to go to this link and de body variables are : <"eec0c0b41b4c43119d33e2bdafe1fc08"><name>Woonkamer</name><type>livingroom</type><preset>asleep</preset></location></locations> I know that i have to use the put command but i don't know how i exactly will put all the variables in the body. plugwise = Net.FHttp("ip", 80) plugwise:setBasicAuthentication("Username", "pass") fibaro:log(response) Can someone help me. on how i can do this on the best way.
  15. Hello, I'm trying to modify a already define global variable using the REST API for the HC2. This is done from a ESP2866 (nodeMCU-isch) board. I can do a http.get towards the HC" and I get the correct JSON information. When I do http.put I seem not to be able to set the variable. My message headers contains a basic auth, and I have payload that looks like this {"value":"On"} The address looks like this http://1.2.3.4/api/globalVariables/thevariable According to the httpclient i'm using i seem to get return code 200 but no result and the variable is not changed. Using the hc2ip/docs link I can test this out with the correct payload and it works fine. However I'm logged in as an Admin then. Trying to change the user from my ESP2866 I just got that the HC" banned me for 30 min. So is there a problem using normal users when trying to modify a global variable ? Do I need to be admin ? Or is there something else I need to check ? Regards P
  16. Can someone help me with Node-Red? I need to tell node-Red to change a global value in HC2. Thanks for the Help
  17. Hi all, I have an issue trying to make and HTTPS POST request from my LUA scnene in Fibaro HC. I am getting "short read" error with the URL "https://api2.magicair.tion.ru/idsrv/oauth2/token" This is my scene: ============================================= --[[ %% properties %% events %% globals --]] local authData = "username=XXX&password=YYY" function doTest() print('Test!') local requestUrl = "https://api2.magicair.tion.ru/idsrv/oauth2/token" local httpClient = net.HTTPClient() httpClient:request(requestUrl, { options = { method = "POST", headers = { ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = tostring(authData:len()) }, data = authData, timeout = 5000 }, success = function (response) fibaro:debug (response.data) end, error = function (err) fibaro:debug ("Error: " .. err) end }) setTimeout(doTest, 5*1000) end print('Script start...') doTest() ============================================= I am getting the following in my log: [DEBUG] 15:16:52: Script start... [DEBUG] 15:16:52: Test! [DEBUG] 15:16:52: Error: short read I have been trying to play with headers, data format, timeouts and all parameters I could find, however I always get the same error with the provided URL. Other HTTPS URLS I tried with GET method works just fine. Also I have been trying to do the same with cURL and it works fine with the exact same set of headers and payload (with full credentials string, of course). So the issue is somehow connected with this specific URL: "https://api2.magicair.tion.ru/idsrv/oauth2/token" The Internet is saying that short read problem in HTTPClient request might be related to ciphering protocols mismatch between the client and server. So there could be some parameter regulating this? 2 main versions, which I see: 1. Some tricky param is required to form the correct HTTPS request. 2. Some bug / missing feature in HTTPClient implementation in HC2. Anyway I am stuck and need the help from the community and HC developers. Has anyone seen something similar? Any clues? Please help! Many thanks in advance. PS Using the latest FW 4.51 of Fibaro Come Center 2
  18. I have an issue trying to make and HTTPS POST request. I am getting "short read" error with the URL "https://api2.magicair.tion.ru/idsrv/oauth2/token" This is my scene: ============================================= --[[ %% properties %% events %% globals --]] local authData = "username=XXX&password=YYY" function doTest() print('Test!') local requestUrl = "https://api2.magicair.tion.ru/idsrv/oauth2/token" local httpClient = net.HTTPClient() httpClient:request(requestUrl, { options = { method = "POST", headers = { ["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Length"] = tostring(authData:len()) }, data = authData, timeout = 5000 }, success = function (response) fibaro:debug (response.data) end, error = function (err) fibaro:debug ("Error: " .. err) end }) setTimeout(doTest, 5*1000) end print('Script start...') doTest() ============================================= I am getting the following in my log: [DEBUG] 15:16:52: Script start... [DEBUG] 15:16:52: Test! [DEBUG] 15:16:52: Error: short read I have been trying to play with headers, data format, timeouts and all parameters I could find, however I always get the same error with the provided URL. Other HTTPS URLS I tried with GET method works just fine. Also I have been trying to do the same with cURL and it works fine with the exact same set of headers and payload (with full credentials string, of course). So the issue is somehow connected with this specific URL: "https://api2.magicair.tion.ru/idsrv/oauth2/token" The Internet is saying that short read problem in HTTPClient request might be related to ciphering protocols mismatch between the client and server. So there could be some parameter regulating this? 2 main versions, which I see: 1. Some tricky param is required to form the correct HTTPS request. 2. Some bug / missing feature in HTTPClient implementation in HC2. Anyway I am stuck and need the help from the community and HC developers. Help!
  19. Hi all, I have an Itho Eco RFT ventilation box, wich can be controlled by a wifi interface. You can make api requests, wich work fine i.e. a browser. Here are te requests that are available: http://192.168.x.x/api?action=Low http://192.168.x.x/api?action=Medium http://192.168.x.x/api?action=High http://192.168.x.x/api?action=Timer http://192.168.x.x/api?action=Learn http://192.168.x.x/api?action=reset&value=true I want to put this in a VD. 3 buttons for "Low, medium and high". How can I put these URL's under the buttons? Thanks!
  20. DonZap

    IFTTT HC2

    Hi I am new here, so sorry if I post this at the wrong forum I'm using fibaro HC2 together with google home by ifttt. I have created a user who only has access to a virtual device that I send the http command to. It works fine when I using device ID directly: http://User:Password@/api/callAction?deviceID=93&name=turnOn but when i usen the button indside the virtual device, it dose not work at all: http://User:Password@/api/callAction?deviceID=201&name=pressButton&arg1=button0 and I am getting the virtual device ID from the http link: /fibaro/en/devices/virtual_edit.html?id=201 I have no idea why it dose not work, its pretty Straight froward? thanks in advance for your inputs
  21. http://admin:[email protected]/api/devices/15/action/pressButton=1 http://admin:[email protected]/api/callAction?deviceID=15&name=pressButton&arg1=Button11 I tried a lot of links like these and got only {} response. Please can anyone write how to trigger VD button with http? VD with ID : 15 Button ID : Button11 +also tried with postman basic auth didnt work.
  22. Hi, i got a HCL a few hours ago. I added a VD with 2 buttons. 1-on 2-off First button "on": GET /0/true HTTP/1.1 Second button "off": GET /0/false HTTP/1.10x0D0x0A0x0D0x0A Do i have to add Host:xxx.xxx.xxx.xxx because it works fine without Host Buttons work with this hex "0x0D0x0A0x0D0x0A" and without hex... How to get status of device? Normally when i wrote http://ip/0/status response is : {"id":0,"state":1} I want to set VD on-off position from this response any help please?
  23. Hello Fibaro team, Internet as we speak is transforming towards more and more use of HTTPS and TSL. My question is simply, is there a timeplan for HC2 to transfer from HTTP to HTTPS also on the local site access solution? I understand there can be difficulties with the certificates...... For example, I would prefer to send an HTTPS request to HC2 for starting scenes or altering status on a device, where username and password are protected with TSL transmission. Kindly, DrPepper
  24. Hey Guys, Trying to send a HTTP String from my HCL VD but it's not working.. anyone see what I'm doing wrong, String I'm trying to send is http://marantz-sr5010.local./MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOn&cmd1=aspMainZone_WebUpdateStatus%2F&ZoneName=ZONE2 I tried with this VD GET /MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOn HTTP/1.1 Host:marantz-sr5010.local does not work. Any help?
  25. Hey Guys, Trying to send a HTTP String from my HCL VD but it's not working.. anyone see what I'm doing wrong, String I'm trying to send is: GET https://api.thingspeak.com/update?api_key=MYKEY&field1=
×
×
  • Create New...