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 'start scene'.

  • 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 1 result

  1. HA-Bridge is often used for turning devices off and on or dim lights using the following API calls: On Items Command Group: http://user:[email protected]/api/callAction?deviceID=322&name=turnOn Off Items Command Group: http://user:[email protected]/api/callAction?deviceID=322&name=turnOff Dim Items Command Group: http://user:[email protected]/api/callAction?deviceID=322&name=setValue&arg1=${intensity.percent} It can also be used to set sliders on Virtual Devices, as I've done in my Alexa Heating Override VD (Topic 25381) using this API call: http://user:[email protected]/api/callAction?deviceID=358&name=setSlider&arg1=1&arg2=${intensity.percent} And another common use-case is to call a scene, which can use either of the following API calls: http://user:[email protected]/api/scenes/56/action/start http://user:[email protected]/api/sceneControl?id=56&action=start However, the Scene Action API also allows parameters (arguments) to be sent to the scene, by embedding a json message in the HTTP body as an array of values. To start a scene from HA-Bridge and send parameters, then setup the device in HA-Bridge as follows: Type: HTTP Device Target Item: http://<HC IP Address>/api/scenes/<nn>/action/start HTTP Verb: POST HTTP Body: {"args":["ABCDE", 12345]} HTTP Header: [{"name":"Authorization","value":"Basic ZGF2ZTpteXBhc3N3b3Jk"}] Content Type: application/json Where <nn> is the scene number, eg: http://192.111.111.111/api/scenes/56/action/start And the value in the HTTP Header after the word 'Basic' is your Fibaro user id and password separated by a colon, and encoded in Base64. Use a site, such as https://www.base64encode.org/ to do this encoding for you. So for example: dave:mypassword becomes: ZGF2ZTpteXBhc3N3b3Jk It seems that it's necessary to send the userid and password using this method, rather than the more commonly seen method of adding the credentials before the Fibaro IP address, otherwise an error (HTTP 405) is returned by Fibaro. The HTTP Body contains the json with the list of parameters in an array. So if you want to pass in, let's say, a device number and the 'lux' value, then you could send something like this: {"args":[345, ${intensity.percent}]} In the scene, you can fetch the parameters using the fibaro:args() function, eg: local args = fibaro:args() if (args ~= nil) then for key,value in pairs(args) do fibaro:debug(value) end end Dave
×
×
  • Create New...