Giter VIP home page Giter VIP logo

Comments (5)

kaikreuzer avatar kaikreuzer commented on May 26, 2024 1

What's a good name for it?

Not sure... "Home Builder"? "Construction Kit"?

from openhab-core.

kubawolanin avatar kubawolanin commented on May 26, 2024 1

How do you actually handle updates, (...) Is that something you plan to support (I guess this would make the whole concept pretty complex, so I doubt that this is worthwhile...)

For the MVP - I'm not :-) This is far too complex for me right now so I'll leave it for the future.
From the technical standpoint - I would need to retrieve the Items belonging to Home group and then match the existing rooms and devices with the pre-defined collection and then recreate the form basing on that.
REST API is a must for that - I'd rather avoid parsing the text file to get all the data.
But it's a discussion for the future. Baby steps 😉

from openhab-core.

kaikreuzer avatar kaikreuzer commented on May 26, 2024

The tool should be accessible at any time

How do you actually handle updates, i.e. if a structure has already been generated and the user re-enters the tool and wants to add a new room? Is that something you plan to support (I guess this would make the whole concept pretty complex, so I doubt that this is worthwhile...)

from openhab-core.

kubawolanin avatar kubawolanin commented on May 26, 2024

How do you actually handle updates, i.e. if a structure has already been generated and the user re-enters the tool and wants to add a new room? Is that something you plan to support (I guess this would make the whole concept pretty complex, so I doubt that this is worthwhile...)

@kaikreuzer getting back to the subject.
I've been thinking on embedding Monaco editor into HomeBuilder in the future. TypeFox did it successfully along with the LSP support, which is really promising. Here's their demo.

How feasible it would be to create a REST service on openHAB/ESH backend that would take a text content as a POST parameter's value, e.g.

Group    Home            "Our Home"   <house>
Group    Bedroom         "Bedroom"    <bedroom>   (Home)
Switch   Bedroom_Light   "Light"      <light>     (Bedroom, gLight)   ["Lighting"]   {channel=""}
Group:Switch:OR(ON, OFF)   gLight   "Light"   <light>   (Home)

and return a JSON structure like this?

[
  {
    "type": "Group",
    "name": "Home",
    "label": "Our Home",
    "category": "house"
  },
  {
    "type": "Group",
    "name": "Bedroom",
    "label": "Bedroom",
    "category": "bedroom",
    "groupNames": [
      "Home"
    ]
  },
  {
    "type": "Switch",
    "name": "Bedroom_Light",
    "label": "Light",
    "category": "light",
    "groupNames": [
      "Bedroom",
      "gLight"
    ],
    "tags": [
      "Lighting"
    ]
  },
  {
    "type": "Group",
    "name": "gLight",
    "label": "Light",
    "category": "light",
    "groupNames": [
      "Home"
    ],
    "groupType": "Switch",
    "function": {
      "name": "OR",
      "params": [
        "ON",
        "OFF"
      ]
    }
  }
]

Having that kind of logic on the backend would allow me to make HomeBuilder results editable.

Just an idea. Not sure if good or not 😉

I'd appreciate your expertise.

from openhab-core.

kaikreuzer avatar kaikreuzer commented on May 26, 2024

Argh, I actually responded to you already a week ago, but failed to send it as I had to board a plane :-(

So sorry for the late answer.

Embedding the monaco editor (or similar) is something that had been discussed in eclipse-archived/smarthome#1402 already.

I think this is rather a topic to discuss in the LSP discussion than for the home builder. Imho, once DSL files have been created, they should be edited by the user only, but not by a generator anymore. So I would rather suggest to implement features in the vscode extension that easily allows adding new stuff to existing files (or to create new files).

The more I think about it, the more I am of the opinion that the home builder should really only cover the initial structure creation - everything else will simply become too complex and most likely result in yet another format to keep the item information in.

from openhab-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.