NAV Navbar
  • HomeHabit Beta
  • Configuration
  • HomeHabit Beta

    Introduction

    OpenHAB and Home Assistant platforms are supported for text-based configuration.

    Please note that text-based configuration is an experimental feature. Syntax is subject to change without backward compatibility at this stage.

    Configuration

    Config file

    Home Assistant
    <hass>/www/projectrotini.json
    
    OpenHAB 1.x
    <openhab>/webapps/static/projectrotini.json
    
    OpenHAB 2.x
    <openhab>/conf/html/projectrotini.json
    

    Text-based configuration will be automatically loaded from a JSON configuration file after either a platform has been added to the app.

    Config file will be reloaded every 10 minutes or after the app is restarted.

    Dashboards

    Example config
    {
      "dashboards": {
        "home": {
          "columns": 8,
          "rows": 6,
          "pages": [
            {
              "label": "Home",
              "icon": "home",
              "widgets": [
                {
                  "type": "clock",
                  "position": {
                    "x": 0,
                    "y": 0,
                    "width": 2,
                    "height": 1
                  }
                }
              ]
            },
            {
              "label": "Living Room",
              "icon": "sofa",
              "widgets": []
            },
            {
              "label": "Bedroom",
              "icon": "bed",
              "widgets": []
            }
          ]
        }
      }
    }
    

    Configuration must contain a dashboards property with a set of dashboard configs. Each dashboard can have up to 10 pages with at most 10 rows and columns per page.

    Properties icon and label from the first page will be used as name of a dashboard in the app.

    Layout

    Example config
    {
      "type": "clock",
      "position": {
        "x": 0,
        "y": 0,
        "width": 2,
        "height": 1
      }
    }
    
    Shorthand notation
    {
      "type": "clock",
      "position": "0-0,2-1"
    }
    

    Each dashboard page is laid out in a grid. Widget configuration determines its position on a page.

    Position should be specified as position property in a widget config.

    Bindings

    Example config
    {
      "type": "switch",
      "position": "0-0,1-1",
      "properties": {
        "label": "Bedroom",
        "icon": "lamp",
        "state": {
          "binding": "Light_Bedroom"
        }
      }
    }
    

    Some widget properties can be bound to an item. Binding is created by placing binding config with an item name as a value of a property.

    In this example, switch state is bound to a Light_Bedroom item.

    Widgets

    Action

    Example config
    {
      "type": "action",
      "position": "0-0,1-1",
      "properties": {
        "label": "Bedroom Lights",
        "icon": "light",
        "text": "Turn off",
        "value": "off",
        "state": {
          "binding": "Light_Bedroom"
        }
      }
    }
    
    Properties
    label required
    icon optional
    default is check
    text required
    value required
    state bindable

    Calendar

    Example config
    {
      "type": "calendar",
      "position": "0-0,1-1",
      "properties": {
        "events": {
          "event1": {
            "title": {
              "binding": "Calendar_Event1_Name"
            },
            "location": {
              "binding": "Calendar_Event1_Place"
            },
            "start-time": {
              "binding": "Calendar_Event1_Start"
            },
            "end-time": {
              "binding": "Calendar_Event1_End"
            }
          },
          "event2": {
            "title": {
              "binding": "Calendar_Event2_Name"
            },
            "location": {
              "binding": "Calendar_Event2_Place"
            },
            "start-time": {
              "binding": "Calendar_Event2_Start"
            },
            "end-time": {
              "binding": "Calendar_Event2_End"
            }
          }
        }
      }
    }
    
    Properties
    calendars bindable
    events config set
    events.title bindable
    events.location bindable
    events.start-time bindable
    events.end-time bindable

    Camera

    Example config
    {
      "type": "camera",
      "position": "0-0,1-1",
      "properties": {
        "video-uri": {
          "binding": "Camera_Outside_Video_Uri"
        },
        "snapshot": {
          "binding": "Camera_Outside_Snapshot_Uri"
        },
        "snapshot-image": {
          "binding": "Camera_Outside_Snapshot_Image"
        },
        "snapshot-interval": "10s",
        "scaling": "crop",
        "rotation": 0
      }
    }
    
    Properties
    label optional
    video-uri bindable
    snapshot bindable
    snapshot-image bindable
    snapshot-interval optional
    default is 10s
    Possible values are live, 1s, 2s, 5s, 10s, 30s, or 60s
    scaling optional
    default is crop
    Possible values are crop, fit, or stretch
    rotation optional
    default is 0
    Possible values are 0, 90, 180, or 270

    Clock

    Example config
    {
      "type": "clock",
      "position": "0-0,1-1",
      "properties": {
        "style": "standard"
      }
    }
    
    Properties
    style optional
    default is standard
    Possible values are standard or modern
    condition bindable
    temperature bindable

    Dimmer

    Example config
    {
      "type": "dimmer",
      "position": "0-0,1-1",
      "properties": {
        "label": "Kitchen Lights",
        "state": {
          "binding": "Dimmer_Kitchen"
        },
        "step": 1,
        "activated-always": true
      }
    }
    
    Properties
    label optional
    state bindable
    step optional
    default is 1
    activated-always optional
    default is true

    Gauge

    Example config
    {
      "type": "gauge",
      "position": "0-0,1-1",
      "properties": {
        "label": "Power",
        "style": "radial",
        "icon": "energy",
        "unit": "kW",
        "value": {
          "binding": "Power_Current"
        },
        "min": 0,
        "max": 100
      }
    }
    
    Properties
    label optional
    style optional
    default is radial
    Possible values are radial or linear
    icon optional
    default is gauge
    unit optional
    default is none
    value bindable
    thresholds config set
    thresholds.value optional
    default is 70
    thresholds.color optional
    default is 39,100,100
    min optional
    default is 0
    max optional
    default is 100

    Launcher

    Example config
    {
      "type": "launcher",
      "position": "0-0,1-1",
      "properties": {
        "label": "Music Apps",
        "show-names": true,
        "apps": {
          "play-music": "com.google.android.music",
          "pandora": "com.pandora.android",
          "plex": "com.plexapp.android"
        }
      }
    }
    
    Properties
    label optional
    show-names optional
    default is true
    apps config set

    Light

    Example config
    {
      "type": "light",
      "position": "0-0,1-1",
      "properties": {
        "label": "Light",
        "type": "color",
        "state": {
          "binding": "Light_Bedroom"
        },
        "colors": {
          "relax": "29,63,100",
          "fun": "9,72,100",
          "dark": "300,45,93"
        }
      }
    }
    
    {
      "type": "light",
      "position": "0-0,1-1",
      "properties": {
        "label": "Light",
        "type": "switch",
        "icon": "light",
        "group": false,
        "state": {
          "binding": "Light_Bedroom"
        }
      }
    }
    
    {
      "type": "light",
      "position": "0-0,1-1",
      "properties": {
        "label": "Bedroom",
        "type": "switch",
        "icon": "light",
        "group": true,
        "group-states": {
          "ceiling": {
            "binding": "Light_Bedroom_Ceiling"
          },
          "table": {
            "binding": "Light_Bedroom_Tablet"
          },
          "closet": {
            "binding": "Light_Bedroom_Closet"
          }
        }
      }
    }
    
    Properties
    label optional
    type optional
    default is color
    Possible values are color, dimmer, or switch
    icon optional
    default is light
    group optional
    default is false
    group-states bindable
    state bindable
    colors config set
    dimmer-step optional
    default is 1

    Lock

    Example config
    {
      "type": "lock",
      "position": "0-0,1-1",
      "properties": {
        "label": "Front Door",
        "state": {
          "binding": "Lock_Front_Door"
        },
        "reverse": true
      }
    }
    
    Properties
    label optional
    state bindable
    reverse optional
    default is false

    Map

    Example config
    {
      "type": "map",
      "position": "0-0,1-1",
      "properties": {
        "type": "normal",
        "style": "standard",
        "traffic": true,
        "places": {
          "home": {
            "label": "Home",
            "icon": "home",
            "coordinates": "40.7834350,-73.9662490,0.0000000,0.0"
          },
          "work": {
            "label": "Work",
            "icon": "work",
            "coordinates": "40.7954350,-73.9662490,0.0000000,0.0"
          }
        },
        "trackers": {
          "phone": {
            "label": "Phone",
            "icon": "android",
            "coordinates": {
              "binding": "Location_Phone"
            }
          },
          "car": {
            "label": "Car",
            "icon": "car",
            "coordinates": {
              "binding": "Location_Car"
            }
          }
        }
      }
    }
    
    Properties
    type optional
    default is normal
    Possible values are normal, satellite, hybrid, or terrain
    style optional
    default is standard
    Possible values are aubergine, dark, night, retro, silver, or standard
    traffic optional
    default is false
    places config set
    places.label required
    places.icon optional
    default is location
    places.coordinates required
    trackers config set
    trackers.label required
    trackers.icon optional
    default is tracker
    trackers.coordinates bindable

    Media

    Example config
    {
      "type": "media",
      "position": "0-0,1-1",
      "properties": {
        "state": {
          "binding": "Sonos_Player_State"
        },
        "artist": {
          "binding": "Sonos_Artist"
        },
        "track": {
          "binding": "Sonos_Track"
        },
        "cover": {
          "binding": "Sonos_Cover_Uri"
        },
        "cover-image": {
          "binding": "Sonos_Cover_Image"
        }
      }
    }
    
    Properties
    state bindable
    artist bindable
    track bindable
    cover bindable
    cover-image bindable

    Room

    Example config
    {
      "type": "room",
      "position": "0-0,1-1",
      "properties": {
        "label": "Living Room",
        "photo": {
          "binding": "Backdrop_Living_Room_Uri"
        },
        "photo-image": {
          "binding": "Backdrop_Living_Room_Image"
        },
        "camera-uri": {
          "binding": "Camera_Living_Room_Video_Uri"
        },
        "elements": {
          "lights": {
            "type": "switch",
            "icon": "light",
            "state": {
              "binding": "Light_Living_Room"
            }
          },
          "motion": {
            "type": "motion",
            "icon": "light",
            "state": {
              "binding": "Motion_Living_Room"
            }
          },
          "door": {
            "type": "door",
            "icon": "light",
            "state": {
              "binding": "Door_Living_Room"
            }
          },
          "tv": {
            "type": "switch",
            "icon": "light",
            "state": {
              "binding": "Theater_TV"
            }
          }
        }
      }
    }
    
    Properties
    label optional
    photo bindable
    photo-image bindable
    camera-uri bindable
    elements config set
    elements.type optional
    default is switch
    Possible values are battery, connection, door, fan, humidity, lock, motion, occupancy, presence, switch, temperature, water, or window
    elements.icon required
    elements.state bindable

    Scene

    Example config
    {
      "type": "scene",
      "position": "0-0,1-1",
      "properties": {
        "label": "House Scene",
        "style": "selector",
        "state": {
          "binding": "input_select.scene"
        }
      }
    }
    
    {
      "type": "scene",
      "position": "0-0,1-1",
      "properties": {
        "label": "Home Theater",
        "style": "selector",
        "state": {
          "binding": "Theater_State"
        },
        "options": {
          "tv": {
            "label": "TV",
            "icon": "tv",
            "state": "tv"
          },
          "chromecast": {
            "label": "Chromecast",
            "icon": "cast",
            "state": "chromecast"
          },
          "off": {
            "label": "Off",
            "icon": "switch",
            "state": "off"
          },
          "roku": {
            "label": "Roku",
            "icon": "playstation",
            "state": "roku"
          },
          "nexus": {
            "label": "Nexus",
            "icon": "gamepad",
            "state": "nexus"
          }
        }
      }
    }
    
    Properties
    label optional
    style optional
    default is selector
    Possible values are selector or switch
    state bindable
    options config set
    options.label required
    options.icon optional
    default is selector
    options.state required

    Security

    Example config
    {
      "type": "security",
      "position": "0-0,1-1",
      "properties": {
        "label": "Alarm Panel",
        "state": {
          "binding": "Alarm_Panel"
        }
      }
    }
    
    {
      "type": "security",
      "position": "0-0,1-1",
      "properties": {
        "label": "Alarm Panel",
        "state": {
          "binding": "Alarm_Panel"
        },
        "passcode": {
          "binding": "Alarm_Code"
        }
      }
    }
    
    Properties
    label optional
    state bindable
    passcode bindable

    Sensor

    Example config
    {
      "type": "sensor",
      "position": "0-0,1-1",
      "properties": {
        "label": "Living Room",
        "type": "motion",
        "icon": "motion",
        "group": false,
        "state": {
          "binding": "Motion_Living_Room"
        },
        "reverse": false
      }
    }
    
    {
      "type": "sensor",
      "position": "0-0,1-1",
      "properties": {
        "label": "Outside Motion",
        "type": "motion",
        "icon": "motion",
        "group": true,
        "group-states": {
          "front-door": {
            "binding": "Motion_Front_Door"
          },
          "yard": {
            "binding": "Motion_Yard"
          }
        },
        "reverse": false
      }
    }
    
    Properties
    label optional
    type optional
    default is motion
    Possible values are connection, door, gas, lock, motion, occupancy, presence, water, or window
    icon optional
    group optional
    default is false
    group-states bindable
    state bindable
    reverse optional
    default is false

    Shutter

    Example config
    {
      "type": "shutter",
      "position": "0-0,1-1",
      "properties": {
        "label": "Bedroom Blinds",
        "icon": "shutter",
        "mode": "shutter",
        "state": {
          "binding": "Blinds_Bedroom"
        },
        "reverse": false
      }
    }
    
    Properties
    label optional
    icon optional
    default is shutter
    mode optional
    default is shutter
    Possible values are shutter or trigger
    state bindable
    trigger bindable
    sensor bindable
    reverse optional
    default is false

    Switch

    Example config
    {
      "type": "switch",
      "position": "0-0,1-1",
      "properties": {
        "label": "Living Room",
        "icon": "light",
        "group": false,
        "state": {
          "binding": "Light_Living_Room"
        },
        "reverse": false
      }
    }
    
    {
      "type": "switch",
      "position": "0-0,1-1",
      "properties": {
        "label": "Bedroom",
        "icon": "light",
        "group": true,
        "group-states": {
          "ceiling": {
            "binding": "Light_Bedroom_Ceiling"
          },
          "table": {
            "binding": "Light_Bedroom_Tablet"
          },
          "closet": {
            "binding": "Light_Bedroom_Closet"
          }
        },
        "reverse": false
      }
    }
    
    Properties
    label optional
    icon optional
    default is switch
    group optional
    default is false
    group-states bindable
    state bindable
    reverse optional
    default is false

    Thermostat

    Example config
    {
      "type": "thermostat",
      "position": "0-0,1-1",
      "properties": {
        "mode": {
          "binding": "Thermostat_Mode"
        },
        "temperature": {
          "binding": "Thermostat_Temperature_Current"
        },
        "target-heat": {
          "binding": "Thermostat_Target_Heat"
        },
        "target-cool": {
          "binding": "Thermostat_Target_Cool"
        },
        "fan": {
          "binding": "Thermostat_Fan"
        },
        "state": {
          "binding": "Thermostat_State"
        }
      }
    }
    
    Properties
    label optional
    mode bindable
    temperature bindable
    target-heat bindable
    target-cool bindable
    fan bindable
    state bindable

    Value

    Example config
    {
      "type": "value",
      "position": "0-0,1-1",
      "properties": {
        "label": "UPS Packages",
        "state": {
          "binding": "Mail_UPS"
        },
        "unit": "none"
      }
    }
    
    Properties
    label optional
    state bindable
    unit optional
    default is none

    Weather

    Example config
    {
      "type": "weather",
      "position": "0-0,1-1",
      "properties": {
        "label": "Home",
        "mode": "current",
        "temperature": {
          "binding": "Weather_Temperature"
        },
        "condition": {
          "binding": "Weather_Condition_Id"
        },
        "condition-text": {
          "binding": "Weather_Condition_Text"
        },
        "elements": {
          "precipitation": {
            "type": "precipitation",
            "unit": "%",
            "value": {
              "binding": "Weather_Precipitation"
            }
          },
          "visibility": {
            "type": "visibility",
            "unit": "mi",
            "value": {
              "binding": "Weather_Visibility"
            }
          },
          "dewpoint": {
            "type": "dewpoint",
            "unit": "deg",
            "value": {
              "binding": "Weather_Dewpoint"
            }
          },
          "wind": {
            "type": "wind",
            "unit": "mph",
            "value": {
              "binding": "Weather_Wind"
            }
          },
          "pressure": {
            "type": "pressure",
            "unit": "mb",
            "value": {
              "binding": "Weather_Pressure"
            }
          },
          "humidity": {
            "type": "humidity",
            "unit": "%",
            "value": {
              "binding": "Weather_Humidity"
            }
          }
        }
      }
    }
    
    {
      "type": "weather",
      "position": "0-0,1-1",
      "properties": {
        "mode": "forecast",
        "forecast": {
          "today": {
            "period": "today",
            "condition": {
              "binding": "Weather_Forecast_Today_Condition_ID"
            },
            "temperature-day": {
              "binding": "Weather_Forecast_Today_Temperature_High"
            },
            "temperature-night": {
              "binding": "Weather_Forecast_Today_Temperature_Low"
            }
          },
          "tomorrow": {
            "period": "tomorrow",
            "condition": {
              "binding": "Weather_Forecast_Tomorrow_Condition_ID"
            },
            "temperature-day": {
              "binding": "Weather_Forecast_Tomorrow_Temperature_High"
            },
            "temperature-night": {
              "binding": "Weather_Forecast_Tomorrow_Temperature_Low"
            }
          },
          "day2": {
            "period": "day2",
            "condition": {
              "binding": "Weather_Forecast_Day2_Condition_ID"
            },
            "temperature-day": {
              "binding": "Weather_Forecast_Day2_Temperature_High"
            },
            "temperature-night": {
              "binding": "Weather_Forecast_Day2_Temperature_Low"
            }
          }
        }
      }
    }
    
    Properties
    label optional
    mode optional
    default is current
    Possible values are current or forecast
    temperature bindable
    condition bindable
    condition-text bindable
    elements config set
    elements.type optional
    default is humidity
    Possible values are air-quality, cloud-cover, dewpoint, humidity, precipitation, pressure, temperature, visibility, or wind
    elements.unit optional
    default is %
    elements.value bindable
    forecast config set
    forecast.period optional
    default is today
    Possible values are now, today, tomorrow, day2, day3, day4, day5, day6, day7, day8, day9, day10, day11, day12, or day13
    forecast.condition bindable
    forecast.temperature-day bindable
    forecast.temperature-night bindable

    Web

    Example config
    {
      "type": "web",
      "position": "0-0,1-1",
      "properties": {
        "uri": "http://example.com",
        "js": false,
        "storage": false,
        "desktop-mode": false,
        "refresh-interval": "never"
      }
    }
    
    Properties
    uri required
    js optional
    default is false
    storage optional
    default is false
    desktop-mode optional
    default is false
    refresh-interval optional
    default is never
    Possible values are never, 10s, 30s, 1m, 2m, 5m, 10m, 30m, or 1h

    Icons

    Extra icons

    In addition to standard icons listed below, following optional icon packs available (configurable in Settings):

    Extra icons can be used by adding pack prefix in front of an icon name: mdi:home

    Standard icons

    Units