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

Scene upload from IDE or other means


theoV

Question

Hi,

 

I am using and maintaining some 50s scene on my HC2. I am developing mostly in ZeroBrane. Well so far so good. But the most anoying thing is that there is no way to "upload" scene to the HC2.

 

Ideally this could be done from the development environment.

So my question is: Is anybody using such a feature? And if yes, how?

 

If not, I am currently looking into integrating such a feature in a GIT workflow, as git hook.

So if there is any interst I would look further into it.

 

While I have already a plan (REST/put with a decent JSON content, retrieving information from the lua script) I have still some questions, or could need some help. Even if it is just "testing".

 

So if you there are any comments on this, just contact me.

 

Best regards, Theo

Edited by theoV
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

No upload feature as far as a know. One solution is to use notepad and copy/paste an externally made scene to a Fibaro lua scene on the Homecenter2.

Link to comment
Share on other sites

  • 0
6 hours ago, theoV said:

Hi,

 

I am using and maintaining some 50s scene on my HC2. I am developing mostly in ZeroBrane. Well so far so good. But the most anoying thing is that there is no way to "upload" scene to the HC2.

 

Ideally this could be done from the development environment.

So my question is: Is anybody using such a feature? And if yes, how?

 

If not, I am currently looking into integrating such a feature in a GIT workflow, as git hook.

So if there is any interst I would look further into it.

 

While I have already a plan (REST/put with a decent JSON content, retrieving information from the lua script) I have still some questions, or could need some help. Even if it is just "testing".

 

So if you there are any comments on this, just contact me.

 

Best regards, Theo

 

@theoV You can take a look at HC2-Toolkit. There is a import function for lua scenes. However I only use export to files, which works perfect.

 

Link to comment
Share on other sites

  • 1

1) you may upload a scene via another LUA script

2) you may upload  scene via for example python script

 

API here /docs/#!/scenes/modScene

or

 

Please login or register to see this code.

 

PS: creating a new scene should be done via two (2) steps.

1) create an empty scene and getting id

2) upload scene by new Id from 1st step

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 20 hours ago, Thomasn said:

    No upload feature as far as a know. One solution is to use notepad and copy/paste an externally made scene to a Fibaro lua scene on the Homecenter2.

    Yes, this is exactly my problem. Instead of notepad I am using ZeroBran as editor, which even let's me execute some scripts. But not all features are working with it. So currently I am also stuck in the copy and paste loop. ;-)

    19 hours ago, AndyY said:

     

    @theoV You can take a look at HC2-Toolkit. There is a import function for lua scenes. However I only use export to files, which works perfect.

     

    Unfortunately I am not on windows, but on mac. And running it in an VM is not really nice. So I took a look at it, quite a while ago, but stopped evaluating it further, because of the VM situations.

    6 hours ago, 10der said:

    1) you may upload a scene via another LUA script

    2) you may upload  scene via for example python script

     

    API here /docs/#!/scenes/modScene 

    or

     

    Please login or register to see this code.

     

    PS: creating a new scene should be done via two (2) steps.

    1) create an empty scene and getting id

    2) upload scene by new Id from 1st step

    Cool!!! With this I can work, and create something for to upload it from "outside". As said, I am anyhow version controlling my scenes, so I could add a hook into git, to upload whenever I commit something.

    For this, this doc is very helpful, as I was reverse engineering it, with wireshark. Haven't noticed that there are documented functions to do this. So like so often I should say to myself: RTFM ! ;-)

     

    Thank you for this!

     

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