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 api'.

  • 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

Found 4 results

  1. i need to do an http request, put method with a JSON command in the body. Error 400. why? how i can fix the error? function QuickApp:instantArm() self:debug ("function instant arm called") local kseniaip = self:getVariable("IP_PORTIOT"); local kseniaport = self:getVariable("PORT_PORTIOT") function putMethod(requestUrl, data, successCallback, errorCallback) local http = net.HTTPClient() self:debug(requestUrl) http:request(requestUrl, { options = { method = 'PUT', headers = { ["Content-Type"] = "application/json", ["Accept"] = "application/json" }, data = data }, success = successCallback, error = errorCallback }) return args end local url = 'http://' .. kseniaip .. ':' .. kseniaport .. '/partitions/5' local data = [[ <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> .. "{\n\"mode\": \"disarm\"\n}" .. --JSON COMMAND TO INSERT IN THE BODY { "mode": "disarm" } </s:Body> </s:Envelope> ]] putMethod( url, data, function(resp) print('Status: ' .. resp.status) end, function(err) print('error' .. err) end ) end
  2. Hello, I have an empty QA device (temperature device). What's the easiest way to set the value (temperature) using HTTP call (from outside HC3) to the API? Or do I need to provide some method in QA that i.e. the `callAction` REST API will use? I'd prefer to have empty QA and do everything via REST API.
  3. Hi, Hopefully this will be replaced in a few months with direct control of Sonos from Alexa through a native skill supplied by Sonos themselves In the meantime if you are using the http-api and have the HA bridge running then this may provide a stop gap for you if you require one This compilation builds on work from a number of people including @morpheus75, @lennypenny, @matt1981 and others. This solution has two parts and both will be needed for each zone you have. 1 - A simple sonos VD to provide limited control over a player. (volume, mute, play, pause, favorites and playlist access) There is no main loop code (as we are not displaying status) and should be light enough on your system 2 - The commands for the VD that will need to be entered into the bridge There are three files included below The sonos VD ( required for step 1 below) A summary of the commands that with a simple find/replace will work for you (required for step 2 below) A outline of how to structure the entries in the HA bridge and what the alexa verbal commands are for each function (required for step 3) Lets get started.... Step 1 Import the VD and add a name (should match the name of player in sonos) IP address (of sonos-api) and Port (normally 5005) You will need to customise the VD for your favorites and playlists. Modify and confirm all is working, Make note of the VD id number Screenshot of VD and a suggested icon Step 2 Open Commands file attached in your preferred editor Replace the text user with your email (something like auto.frank%40gmail.com) Replace the text password with your password, (something like JackBox$) Replace the text hc2ipaddress with the ip of your HC2 (something like 192.168.1.45) Replace the text VDid with the id of your VD created above (something like 245) You will also need to modify the HA bridge entry names (#8 to # 13) to match the favorite and playlist changes you made in step 1 This will then give you the command strings that you will need for your system that need to be entered into your HA bridge Step 3 Enter the commands into the HA bridge. @morpheus75 has an excellent video on how to add entries to the HA Bridge I have added a link to the youtube video below - skip to timeslot 27:00 for the part that outlines how to add an entry to the bridge. Files Step 1 Virtual device : Roomname.vfib Step 2 document: HA bridge commands.txt Step 3 document: HA bridge entry instructions.txt Adding HA Entries: Youtube link.txt Hope this will be of use to forum users _f
  4. Hello, I have been on 4.120 and now 4.130 almost since the respective firmware was released by Fibaro. However, it was only as of today that I adopted the FibaroID fully by completing the HC Wizard that from what I understand erased my previous admin account and replaced it with my FibaroId. All good so far. However, previously (i.e. on 4.130) I have been accessing scenes by using the following format: http://admin:[email protected]/api/sceneControl?id=56&action=start (For the security minded person: Yes, I am aware I am using my password in clear text above.) However, with adoption of FibaroId the user name in the string above is now containing an @-character and so I decided to create a new user (not the super user). I did that and I changed it also in the client that is making the HTTP-call to my HCLite (and yes I enabled the corresponding scenes for the new user). I have tried both of these formats http://newuser:[email protected]/api/scenes/56/action/start http://newuser:[email protected]/api/sceneControl?id=56&action=start None of the above is working. When entering the same string in my webbrowser I get error 501, connection refused. When using http://192.168.1.1/docs/#!/scenes/sceneAction by filling in scene 56 and action start I get the expected result from the scene. So I am quite sure that it is some sort of access issue Can someone point me in any direction? Thanks, Erik
×
×
  • Create New...