Skip to content
Snippets Groups Projects
Select Git revision
  • 0af50e07ac91a861f167ee7f49d55c48b9ffd0cc
  • main default protected
  • 48-replace-mqtt-handling-with-ragconnect
  • dev protected
  • 40-add-mqtt-username-and-password-to-mqttreceiver-java
  • learner
  • Integration_KB_L
  • 0.1
8 results

DSL.md

Blame
  • The eraser-DSL

    Find a general description in the Model description page, and the parser (dev, master) and printing (dev, master).

    The DSL is line-based, so on each line, one model element will be defined. All shown specifications for one element are optional and can be reordered, but at least id must be present to identify the element. References to other elements are done by using their IDs as strings, and can be forward references. The following elements can be described (in the master branch if not otherwise noted):

    ChannelType

    ChannelType: id="" label="" description="" itemType="" category="" readyOnly;

    Channel

    Channel: id="" type="" links=["ITEM_ID", "ITEM_ID"];

    Group

    Group: id="" groups=["GROUP_ID", "GROUP_ID"] items=["ITEM_ID", "ITEM_ID"] aggregation=AGG;
    • groups must reference other groups
    • items must reference items
    • AGG in aggregation can either be one of EQUALITY, AVG, MAX, MIN, SUM; or one of AND, OR, NAND, NOR, followed by a list of arguments surrounded by round brackets, e.g., aggregation = AVG or aggregation = AND ("off", "on"). The semantics are described in the openHAB docs

    Item

    ITEM_TYPE Item: id="" label="" state="" category="" topic="" controls=["ITEM_ID", "ITEM_ID"] metaData={"key":"value"};
    • ITEM_TYPE can be one of the following: Color, Contact, DateTime, Dimmer, Image, Location, Number, Player, RollerShutter, String, Switch. If left out, the item will behave as if String was used.
    • state is given as a string and will be interpreted depending on the type of the item
    • topic implicitely defines a MQTT topic which is used to update the item in both directions. The full topic is prefixed with incoming-prefix if receiving updates from openHAB, and outgoing-prefix if sending updates to openHAB
    • category is currently not used
    • controls is only available on dev. It defines connection of one item controls the state of another item as the state of the first item changes.
    • metaData contains key-value-pairs comprising its meta data

    Parameter

    Parameter: id="" label="" description="" type="" default="" required;
    • type has to be one of the following: Boolean, Decimal, Integer, Text
    • default is currently an arbitrary String, thus it is not checked whether it matches the type

    ThingType

    ThingType: id="" label="" description="" parameters=["PARAM_ID", "PARAM_ID"] channelTypes=["CHANNEL_TYPE_ID", "CHANNEL_TYPE_ID"];

    Thing

    Thing: id="" label="" type="" channels=["CHANNEL_ID", "CHANNEL_ID"] ;

    Mqtt

    Mqtt: incoming="" outgoing="" host="";
    • MQTT is used to communicate/synchronize with openHAB
    • incoming defines the prefix for received MQTT messages, see topic description in item. Defaults to an empty string, which should be avoided.
    • outgoing defines the prefix for sent MQTT messages, see topic description in item. Defaults to an empty string, which should be avoided.
    • host defines the URL of the host running an MQTT broker. The port will be set to 1883 and cannot be changed.

    Influx

    Influx: user="" password="" dbName="" host="" ;
    • Influx is used to store historical item states
    • user and password define connection credentials
    • dbName defines the name of the database to use
    • host defines the URL of the host running an InfluxDB. The port will be set to 8086 and cannot be changed.