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


Bug in REST API [backups]


AutoFrank

Recommended Posts

Hi,

 

I found two issues with the REST API, one with the API and one with the documentation .

The two are separate issues

 

API

the /api/service/backups is not accessible over local host ip and port 

 

This will work

 

Please login or register to see this code.

but this won't return any data and throws an error

Please login or register to see this code.

yet this will work (different api call)

 

Please login or register to see this code.

 

Documentation

 

http://<HC2IP>/docs shows the call correctly to be /api/service/backups

 

Please login or register to see this attachment.

 

The Fibaro developer site shows the call to be  /api/settings/backups and doesn't work

Please login or register to see this attachment.

 

I assume it was deprecated at some stage and the documentation not updated

 

Regards

_f

 

 

 

 

 

Link to comment
Share on other sites

Yeah, Yeah...

 

Fibaro is so well documented....

 

I'll rest my case.

 

Link to comment
Share on other sites

  • Topic Author
  •  

    43 minutes ago, Bodyart said:

    I'll rest my case.

     

    LOL as it was the REST API :-)

     

    Link to comment
    Share on other sites

    • 2 months later...

    @AutoFrank, I have the same results as you. I checked it while using your HC2 Resources VD. By the way, thanks for a great VD.

     

    I noticed, that this code works also:

    Please login or register to see this code.

    Then you don't need to use IP of HC2.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, szmyk said:

    @AutoFrank, I have the same results as you. I checked it while using your HC2 Resources VD. By the way, thanks for a great VD.

     

    I noticed, that this code works also:

    Please login or register to see this code.

    Then you don't need to use IP of HC2.

    Interesting .. Thanks 

     

    What fw are you on.. 

    I'm running 4.130 

    Link to comment
    Share on other sites

    Interesting, I have T_END error while using port 11111, but when using port 80, then it is ok and i result: table: 0x847a3c0.

     

    My code:

    Please login or register to see this code.

     

     

    Link to comment
    Share on other sites

    • 2 weeks later...
    Guest pablo77

    This VD is very useful.

     

    Please, could someone write how to create this VD from the start with final LUA code.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, pablo77 said:

    This VD is very useful.

     

    Please, could someone write how to create this VD from the start with final LUA code.

     

    @pablo77

    I haven't had a chance to document it properly yet but this should get you running...

     

    It uses hometable to reference SMsgH and Smpl Log so comment out if required

     

    Three steps to get running

    Step 1

    Line 8 enter your HC2 IP and Port - for some reason the /api/services/backup is not working over localhost 

    Please login or register to see this code.

    Step 2

    Adjust triggers on line 80 onwards to what you want

     

    Step 3

    Add entry on Main Scene or move refresh code in Main Loop and set refresh interval 

     

    You should end up with this ...

     

    Please login or register to see this link.

     

     

    enjoy 

     

    _f

    Please login or register to see this link.

     

     

    Link to comment
    Share on other sites

    Guest pablo77

    I'm grateful for sharing this VD.

     

    I'm just gonna add, that to proper running should be added "HomeTable" in Variable Panel.

     

    Thanks again

    Link to comment
    Share on other sites

    Join the conversation

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

    Guest
    Reply to this topic...

    ×   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...