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


  • 0

Switch on WallPlug from cloud server


Question

Posted

Hello, I'm using Home Center 2 and would like to script my own remote server to control wall plugs. So using REST API to connect with my HC2 and change the state of a wall plug. I looked at manual and forum, but can't find a way to do it. Can anyone help me ? Cheers / Olive.

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

seems more like your looking to "hire" someone to write you script, then looking for help with an existing script.. dont hold your breath on your "request."

when i am looking to have custom script written, i hire @morpheus75 to assist me when i am looking for something a bit more tailor-made thats outside of my experience level.  his rates are very competitive and responds fast to any questions.  

Edited by matt1981
edit
  • 0
  • Inquirer
  • Posted (edited)
    14 minutes ago, matt1981 said:

    seems more like your looking to "hire" someone to write you script, then looking for help with an existing script.. dont hold your breath on your "request."

    when i am looking to have custom script written, i hire @morpheus75 to assist me when i am looking for something a bit more tailor-made thats outside of my experience level.  his rates are very competitive and responds fast to any questions.  

    actually not. I have developers working on my server apps on AWS. They can request REST API from the HC2, if it was technically possible for everyone, and not only for selected partners like IFTT. The only option that I see if to set a VPN but this opens a lot more complexity. I don't understand Fibaro's strategy here of having REST API only for local network. It needs to be accessible from the cloud. Any thought anyone ?

    Edited by miloli
    • 0
    Posted
    2 hours ago, miloli said:

    Any thought anyone

    NO.

    if you open develop box in your browser - turning on/off is very easy... but. for calling you should 

    1) logged in Fibaro "dom"

    2) save session id (idk how it generated... cookie? idk!)

    3) for calling - your should make a call via internal Fibaro proxy and pass api request as a query

     

    POST

     

    Request URL:

    Please login or register to see this link.

     
    user = IMHO is your 

    Please login or register to see this link.

    hc = serial NO
    temp - as I said before temporary session id.
     
    • 0
  • Inquirer
  • Posted
    1 hour ago, 10der said:

    NO.

    if you open develop box in your browser - turning on/off is very easy... but. for calling you should 

    1) logged in Fibaro "dom"

    2) save session id (idk how it generated... cookie? idk!)

    3) for calling - your should make a call via internal Fibaro proxy and pass api request as a query

     

    POST

     

    Request URL:

    Please login or register to see this link.

     
    user = IMHO is your 

    Please login or register to see this link.

    hc = serial NO
    temp - as I said before temporary session id.
     

    Nice one. It works with a little change in the end 

    Please login or register to see this link.

    [user]&hc=[serial]&temp=[temp-sessionid]&req=/api/callAction?deviceID=[deviceID]&name=turnOn

    But this is not a stable and secure solution. The token will probably expire under 60min or so, hopefully.

     

    Is there any official Fibaro support people who could advise us here ? I'm sure there is a oAuth API somewhere that could be requested, no ?

     

     

    • 0
    Posted (edited)

    Temp token look like part of User Agent ;) 

    Well, I'd hate to guess and be wrong.. but Fibaro never open this secret ;) but otherwise you can send to Fibaro asking to sign NDA ;) 

    Edited by 10der
    • 0
    Guest Sav
    Posted (edited)

    So, nobody reversed how to get temp for now? Protocol for newProxyLite can solve many problems and close need of dyndns and insecure portforwarding.

     

    For now: It begins on id.cloud.fibaro.com... We need post data username=$USERNAME, password=$PASSWORD to

    Please login or register to see this link.

     (don't see where to get and set csrf for now) then, if one have right PHPSESSID in cookies (yes, cookies) one can get user and temp (as tempKey) from 

    Please login or register to see this link.

     (other interesting

    Please login or register to see this link.

    , api/default)

    Edited by Sav

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...