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. 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?
  2. 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=
  3. 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
  4. 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=
  5. 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
  6. 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?
  7. 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
  8. Hi, I am looking for help in decode a http success message If I issue the following through a browser it works.... http://192.168.1.89:5005/bed5_office/say/Hello/Amy/30 and the response in the browser is {"status":"success"} now, if I run this in a scene http = net.HTTPClient({ timeout = 3000 }) url = 'http://192.168.1.89:5005/bed5_office/say/Hello/Amy/30' controlHeaders = {['content-type'] = 'application/json; charset=utf-8'} http:request(url, { options = { headers = controlHeaders, method = 'GET', }, success = function(param) if param.status == 200 then print('Success STATUS: ', param.status) print('Param Data: ', param.data) else print('STATUS: ', param.status) end end, }) It also works but I cannot find way to display the success message ( I want to trigger another action if not successful) I tried removing the " ==200 " if-then loop as I can't see any 200 or 201 result. Could somebody explain what the success = function(param) is doing and I may be able to figure out why I may not be seeing the success message Thanks -f
  9. Hi, I have two functions in a scene that I call one after the other function1 - create global variable if it doesn't exist (through the api) function2 - write some data to the global variable the second function will fail as the 'create variable' hasn't been completed by the time I try to write to it. I can add a delay or a check that the 'variable is not nill' (ie it exists) in function2 but it still fails to execute correctly I think I recall seeing that a http request in a scene will not always run in the order of the scene ? is this correct or something else here at play. If so has anybody found a way within a single scene to create a variable on the fly and then save data to it successfully. As a last resort I was thinking about having the scene run once to create the table, call a second instance of itself and kill the first instance. I'm not sure if this would even work but it seemed like a very inefficient workaround even if possible I have seen many virtual device examples of creating a variable on the fly and saving data to it but none from a scene Thanks -f @jompa68, @petergebruers, @Sankotronic
  10. Hi, Trying to create a VD button to set my alarm. I already have it in a scene but am trying to clean things up.. I'm getting an error as I think the virtual device syntax is incorrect Working Scene function function tempFunc() fibaro:debug("setting night mode") http = net.HTTPClient({timeout=2000}) local controlUrl = 'https://192.168.XX.XX:XXXX/XXX/XXX/XXX/set' http:request(controlUrl, { options = { method = 'PUT', timeout = 5000 }, success = function(status) local result = json.decode(status.data) if result and result.status == 'success' then print ("Request OK: " .. status.data) else print ("Error ") if (result) then print(result.data) end end end, error = function(error) print "ERROR" print(error) end }) end Virtual device code that is not working http = Net.FHttp({timeout=2000}) local controlUrl = 'https://192.168.XX.XX:XXXX/XXX/XXX/XXX/set' http:request(controlUrl, { options = { method = 'PUT', timeout = 5000 }, success = function(status) local result = json.decode(status.data) if result and result.status == 'success' then print ("Request OK: " .. status.data) else print ("Error ") if (result) then print(result.data) end end end, error = function(error) print "ERROR" print(error) end }) or is it that https requests are not permitted in a virtual device any help appreciated Thanks -frank
  11. Hi all, I am looking to build out my understanding of the HC2 Rest API. Specifically its capacity to execute a lot of calls (as opposed to what functions are available) and what else leverages the API and battles for capacity. I have two reasons for posting the topic - (a) I may be having an issue and am trying to debug and (b) increasing my systems knowledge. My understand is that the API is used the following... If an http request is made to the HC2 from an external system If a http request is made from a browser to the HC2 .. but is it used for ... The android app I run on my tablets/phones ( yes ? ) The iOS app running on some ipads/phones ( yes ? ) If the HC2 scene makes a http request to an external system ( assume no ? ) Does the HC2 FW itself leverage the API in anyway ( assume not ?) If a scene executes a http request to localhost / 127.0.0.1 (assume yes ?) .. what else uses it ? now if I send a lot of API calls.. What would people expect to be a resonable number before thresholds are hit (100 per second, 400 per second, 1000 per second ?) ----- assuming the are basic calls, (ie return a sensor state, true-false, return, global variable value,etc What starts to happen to system resources ? ---- Do I start to run out of memory ----- Do I see my CPU utilisation start to peak close to 100% ------ or does the system stay stable and the eveything start to slow down ? Thanks Frank
  12. CANCEL THIS - I SOLVED IT WITH A VD USING THE MAIN LOOP Hi, This is prob not a huge mystery and something basic I'm missing. If I remove the While true do loop from the code below and execute it manually it works okay but once I add the while loop to get it check all the time the scene doesn't run Could somebody take a look and tell me where I'm being stupid Thanks -F --[[ %% autostart %% properties %% events %% globals --]] -- Configuration - Scene Info sceneName = "Sonos State tracker" sceneVersion = "1.0.1" -- Scene Description -- Track and stores the state of three of the sonos -- zones so the respective amp can be switched on -- Configuration - Device IDs -- none for this scene -- Validate Number of Scene Instance if (fibaro:countScenes()>1) then --fibaro:debug("stop scene") fibaro:abort() end -- read playroom state function StateFunc() while true do fibaro:sleep(2000) -- execute this every 2 seconds if fibaro:getGlobal("G_SPC_AREA_STATUS_1") == "UNSET" then -- don't check if we are not at home http = net.HTTPClient({ timeout = 3000 }) url = 'http://192.168.1.89:5005/Playroom/state' controlHeaders = {['content-type'] = 'application/json; charset=utf-8'} http:request(url, { options = { headers = controlHeaders, method = 'GET', }, success = function(response) if response.status == 200 then local responds = json.decode(response.data) local zPRState = responds.zoneState fibaro:debug(zPRState) fibaro:setGlobal("Sonos_PRState", zPRState); end end, }) -- read living room state http = net.HTTPClient({ timeout = 3000 }) url = 'http://192.168.1.89:5005/Living_Room/state' controlHeaders = {['content-type'] = 'application/json; charset=utf-8'} http:request(url, { options = { headers = controlHeaders, method = 'GET', }, success = function(response) if response.status == 200 then local responds = json.decode(response.data) local zLRState = responds.zoneState fibaro:debug(zLRState) fibaro:setGlobal("Sonos_LRState", zLRState); end end, }) -- read dining room state http = net.HTTPClient({ timeout = 3000 }) url = 'http://192.168.1.89:5005/Dining_Room/state' controlHeaders = {['content-type'] = 'application/json; charset=utf-8'} http:request(url, { options = { headers = controlHeaders, method = 'GET', }, success = function(response) if response.status == 200 then local responds = json.decode(response.data) local zDRState = responds.zoneState fibaro:debug(zDRState) fibaro:setGlobal("Sonos_DRState", zDRState); end end, }) end -- end if statement end -- end while loop end -- end function -- Main Scene execution code StateFunc()
  13. Hi, I was wondering if anybody had tried this before. I am looking to ping a device on my home network to see if it is 'online' and then store something like an online/offline in a variable that I can display. I use static IP's for all the devices I am looking to monitor I was thinking about using the arp approach and see if the device is returned as part of the list Has anybody tried this before .. or do people think it may be possible or is there another route ? Thoughts appreciated Thanks Frank
  14. hi I thought I read somewhere that multiple http commands are not executed in the order that they are listed in the scene. I have a scene and it doesn't work 100% of the time and I think this may be the issue I tried grouping 3 or 4 commands into one http request and added a few sleep but with limited success sample script... function tempFunc() -- music on local http1 = net.HTTPClient() -- ungroup bed lauren-ethan from other rooms http1:request('http://192.168.1.89:5005/Landing/ungroup/Bed_LE') http1:request('http://192.168.1.89:5005/Bed_MasterR/ungroup/Bed_LE') http1:request('http://192.168.1.89:5005/Bed_MasterL/ungroup/Bed_LE') http1:request('http://192.168.1.89:5005/Bed_Guests/ungroup/Bed_LE') http1:request('http://192.168.1.89:5005/Bed5_Office/ungroup/Bed_LE') fibaro:sleep(200) local http2 = net.HTTPClient() -- ungroup bed frank from other rooms http2:request('http://192.168.1.89:5005/Landing/ungroup/Bed_Frank') http2:request('http://192.168.1.89:5005/Bed_MasterR/ungroup/Bed_Frank') http2:request('http://192.168.1.89:5005/Bed_MasterL/ungroup/Bed_Frank') http2:request('http://192.168.1.89:5005/Bed_Guests/ungroup/Bed_Frank') http2:request('http://192.168.1.89:5005/Bed5_Office/ungroup/Bed_Frank') fibaro:sleep(200) -- select radio favourite local http3 = net.HTTPClient() http3:request('http://192.168.1.89:5005/BED_FRANK/Favorite/Calm%20Radio') http3:request('http://192.168.1.89:5005/BED_LE/join/BED_FRANK') fibaro:sleep(1000) -- clean up to make sure master room spaekers remain joined and volume is correct local http4 = net.HTTPClient() http4:request('http://192.168.1.89:5005/BED_MASTERL/join/BED_MASTERR') http4:request('http://1922168.1.89:5005/BED_FRANK/Volume/14') http4:request('http://192.168.1.89:5005/BED_LE/Volume/14') fibaro:sleep(1000) -- setup music for kids at night local http5 = net.HTTPClient() http5:request('http://192.168.1.89:5005/BED_FRANK/Favorite/Calm%20Radio') http5:request('http://192.168.1.89:5005/BED_LE/join/BED_FRANK') fibaro:sleep(1000) -- clean up to make sure master room speakers remain joined and volume is correct local http6 = net.HTTPClient() http6:request('http://192.168.1.89:5005/BED_MASTERL/join/BED_MASTERR') http6:request('http://1922168.1.89:5005/BED_FRANK/Volume/14') http6:request('http://192.168.1.89:5005/BED_LE/Volume/14') end BACKGROUND I am using the nodejs sonos bridge and need to be to execute http commands in a certain sequence of commands ie ungroup RoomA, RoomB, RoomC Group Room B with RoomZ Set station to Fav1 and play Adjust volume to 18% Complications arise when they are executed out of sequence Has anybody experienced this and have a solution...
  15. Hi, I am leveraging a bridge to interact with my sonos systems The command to invoke is simple.... http://192.168.1.89:5005/Bed5_Office/SAY/Hi but if I want to have more than one word i need to separate them with a %20 in the url ..like http://192.168.1.89:5005/Bed5_Office/SAY/Hi%20there Now if I drop the following url into a browser (note space between 'hi' and 'there') http://192.168.1.89:5005/Bed5_Office/SAY/Hi there It works !!!... ..but if i use it in a scene it doesn't I had this working from a scene before so I asked the developer of the sonos bridge and he said .. the last part is the important bit.....so my question is how can I get the http request in the scene to invoke the url so I don't have to add the %20 as spaces I tried a number of options but can only seem to find a way to encode headers or data but not the url I am 99% sure I had this working but in a recent overzealous clean up of my code I must have deleted the sample code that worked for me. Could anybody help ? Thanks -Frank
  16. Hi Folks, I have just started to use openremote and cant even get a simple switch to work. It seem to required the following Power On command - http://192.168.1.90/api/callAction?deviceID=720&name=turnOn Power Off command - http://192.168.1.90/api/callAction?deviceID=720&name=turnOff Sensor Does anybody know what the sensor http request should be This is what is required Thanks Frank
  17. I'm guessing it's not currently possible to set a virtual device icon to a url as of 4.082? Gave it a shot and was a little amazed this isn't possible. Since custom plugins have been disabled, I guess it leaves virtual devices as the only method for controlling 3rd party systems and devices. Not very easy to work with FIbaro. Making a nice Squeezebox remote has been a headache and looks pretty nasty. Was hoping to at least use the cover art for the icon. Is there any other workarounds? (or a way to "inject" custom plugins? )
  18. Hi Trying to learn a little more about http requests and api. I'm looking for a little help here and sorry if it's a rookie question.... I have the following code (thanks peterb) local zoneID = 5 function call(api) local HC2 = net.HTTPClient() HC2:request("https://192.168.1.95:8088"..api, { success = function(status) local result = status.data fibaro:debug("Re: " .. result) end, error = function(err) fibaro:debug("HTTP call error: " .. err) end, options = {method = "GET" } }) end call('/spc/zone/'..zoneID) it creates the following output [DEBUG] 20:57:12: table: 0x8ac1c78 [DEBUG] 20:57:12: Re: {"status":"success","data":{"zone":{"id":"5","type":"0","zone_name":"Landing PIR","area":"1","area_name":"Home","input":"0","logic_input":"0","status":"0","proc_state":"0","inhibit_allowed":"1","isolate_allowed":"1"}}} I am trying to display the zone data in the array such as id, type I thought it should be something like fibaro:debug("zone.type: " .. result.zone.type) but I don't know enough about how to extract the various parts from an array I tried to find a good post on the forum but couldn't but if there is one I don't mind picking my way through it. any help (including an explanation) would be really appreciated... Thanks -F
  19. Hi folks, I'm trying to read the value of a temp sensor and display in a webpage I was trying to use a http call (the device is is 871) If I drop the following into a browser I get all the data back http://HC2IP/api/871 but I want to just display the 'value' field which contains the actual temp value I tried the following and some versions http://HC2IP/api/871?field=value but it didn't seem to work Alternatively if somebody has some webpage code that reads some value thought the API and displays it, I could work with that as well Any suggestions ? Thanks -F
  20. Hi folks, I'm looking for some help or some directing. I've searched the forum but can't find what I'm looking for even though it has to be there and tried before. I am trying to create a scene to read and adjust my heating system through the API The steps would be - login over http passing username and password. (this would activate a session) - read back the authentication code to use in next step - issue a post to the API to read or adjust the heating (over http) any help or pointing me to other forum posts would be appreciated Thanks Frank Edit: I've attached a wireshark trace export of the transaction requesting a 1 deg decrease. I blanked out some email addresses and site specific information for privacy. This is essentially what I am trying to replicate through a scene if it's possible. ws trace export.txt
  21. I wonder if there is any plans on expanding the functionality of the virtual device in Fibaro HC2. As it works now it´s most suitable to use for controlling some other device with buttons, slider etc, and if you want to display data from another device all you can use is the label. My wish is that you should be able to choose the type of the virtual device. For example, if you want it to appear as a thermometer or humidity device, and be able to set the value of this device via http api and lua. This would open up the possibility to add virtual devices that gets updated via for example node-red or http from other sources. And in the user interface they will show up as a "common" sensor. That would be really nice. I think this functionality would make the platform more attractive for many people, and open up the integration between different protocols and vendors. Is it just me or is anybody else missing this functionality?
  22. Im trying to control my foscam IP camera (PTZ and other) over the http commands. From any regular browser its a pice of cake. I would like to create virtual device where each button will represent specific command for camera control. I succeeded to create a scene with LUA to execute the commands: --[[ %% properties %% globals --]] local httpClient = net.HTTPClient(); httpClient:request('http://192.168.1.51:88/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Vchod&usr=AAA&pwd=BBB') However when I use the same code in VD with LUA, it doesn't work. I would like to avoid creating 10 scenes and call the scenes from VD, I would like to execute the code directly from VD. Is it possible? Thanx for any advice.
  23. Hello, I'm trying to get the PushOver-scene working. But i get error "[ERROR] 20:55:45: line 11: attempt to index global 'net' (a nil value) at the line 'local selfhttp = net.HTTPClient({timeout=2000}) " My HC2 is running at version 3.590. Can some tell me what is wrong here? Thnx! John
  24. Hi All, I am seeing a fair few posts mentioning HTTP commands. Is it possible to control any Fibaro device outside of the Iphone apps, using browser http:// commands? If so what is the syntax please? Will it work from all browsers? ie Chrome, Firefox, etc Thanks
×
×
  • Create New...