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. 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
  2. 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
  3. 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:[email protected]/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?
  4. 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
  5. 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!
  6. 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?
  7. 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
  8. 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...
  9. 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.
  10. 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
  11. Can someone help me with Node-Red? I need to tell node-Red to change a global value in HC2. Thanks for the Help
  12. 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
  13. 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!
  14. 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!
  15. 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:[email protected]/api/callAction?deviceID=93&name=turnOn but when i usen the button indside the virtual device, it dose not work at all: http://User:[email protected]/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
  16. 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.
  17. 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?
  18. 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
  19. 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?
  20. 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=
  21. 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=
  22. Hi, Simple Control (Roomie) is a great iOS app to integrate Audio/Video in your smart home. Simple Hub supports starting activities and executing device commands over a standard HTTP interface made available on port 47147 (HTTPS is available on port 47148). The HTTP interface sends and receives JSON payloads for each API. More information: https://www.simplecontrol.com/wp-conten ... erface.pdf I would like to create a Virtual Device in HC2 for the Simple Control scenes. Is this possible? How? Thank you in advance
  23. robd

    http module

    to make a connection between the HC2 and other IP base units like a raspberry PI you need to use the LUA code local name = Net.FHttp("IP adress", port) in my case this leads to a error message telling me that I am trying to index or assign a nil value to the variable "Net". some investigation leads to the assumption that my HC2 is missing a HTTP module. to test this I used the lines if Net == nil then fibaro:debug("no net") end alternatively if Net ~= nil then fibaro:debug("net") end I get "no net" as result. then I read that I should install the network module with local name require ("socket.http") see http://w3.impa.br/~diego/software/luasocket/http.html the require function should take care of all the dependencies and install the network module. unfortunately this also leads to a error saying that I am trying to assign a nil value to a variable. where am I going wrong? HC2 with latest software version
  24. Morning all! i am looking to send a plain text command from Fibaro into other systems; however I am struggling getting the command to send. From my understanding you cannot put the username/password in the string that is inside the 'Virtual Device' button. The command I want to send from a VD button is - http://Username:[email protected]:50000/dev/sps/HallLight/Pulse It works using web browsers and applications like Postman. Any ideas?
  25. ZXT-120 is an IR extender for air conditioners, but it can be learned up to 20 defferent ir code for multimedia. The process of learning of zxt-120 is written in its manual, but i want to show a way to use that codes in fibaro HC. For this purpose we have to make a virtual device, and fill its IP Address with your HC ip, and write 80 in TCP port box: Then make buttons according to your multimedia device: Now you have to write commands for corresponding buttons. For example for first button: We can learn up to 20 code according to this list: Use this command for changing mode : /api/callAction?deviceID=107&name=setMode&arg1=0 For setting temperature (in cooling mode): /api/callAction?deviceID=107&name=setThermostatSetpoint&arg1=2&arg2=23 For setting temperature (in heating mode): /api/callAction?deviceID=107&name=setThermostatSetpoint&arg1=1&arg2=21
×
×
  • Create New...