openHAB 3.0 my getting started and notes

This post is going to serve as my running notes for installing and getting OH 3 running and migrating from my OH 2 instance. I decided to post it publicly in case it is of use to anyone.

Approach

I run OH on VMs as Docker containers launched using Ansible playbooks with the configs stored in a git repository. To test I will install OH 3 on a separate VM and store the configs in a separate git repo. I will get a stock installation of OH 3 installed and then gradually migrate my OH 2 configs to the new OH 3 instance. When the migration is complete I will remove the OH 2 production server and move the new OH 3 to that VM.

Bootstrap

I have an Ansible playbook that sets up a machine and runs OH as a docker service. So all I had to do was review it and run it on a different VM with a different set of variables. However, I discovered that Docker won’t let you run a container with devices that don’t already exist so I modified the playbook to skip attaching the devices when deploying the test instance (as denoted by a variable).

So my desktops.yml playbook is

---
# todo add portainer

# use -e "update=True"
# if we have more than just the update variable, create a JSON file and use -e "@some_file.json"

- hosts: desktops
  vars:
    - update: False
  roles:
    - { role: mount-home, when: not update }
    - common
    - firemotd
    - ansible
    - { role: vm, when: not update }
    - nut-client
    - { role: mount-data, when: not update }
    - msmtp
    - fail2ban
    - { role: calibre, calibre_type: 'desktop' }
    - { role: multitail, openhab_logs: '/opt/openhab2/userdata/logs/' }
    - { role: makemkv, when: not update }
    - { role: vscode, when: not update }
    - { role: boinc, when: not update }
    - { role: teamviewer, when: not update }
    - { role: brave, when: not update }
    - { role: docker, when: not update }
    - { role: portainer, portainer_server: True }
#    - { role: code-server, code_server_version: '3.6.0' }
    - role: openhab
      vars:
        - openhab_home: /srv/openhab
        - openhab_conf_repo: git@gitlab.koshak.net:rich/openhab3.git
        - openhab_version: 3.0.0-snapshot
        - openhab_test: True
    - docker-prune
    - tripwire

You can see how I override some of the variables. I have defaults set up in the role that provide the OH 2 values for those variables.

The openHAB role tasks file is

---
# tasks file for roles/openhab

- name: Debug
  debug:
    msg: |
      openhab_home = {{ openhab_home }} 
      repo = {{ openhab_conf_repo }} 
      version = {{ openhab_version }}

- name: Create the openhab user and group
  include_role:
    name: create-user
  vars:
    uid: "{{ openhab_uid }}"
    gid: "{{ openhab_uid }}"
    user_name: openhab
    create_home: False
    service: openHAB

- block:

  - name: Add openhab user to the dialout group
    user:
      append: True
      groups: dialout
      name: openhab

  - name: Create if necessary and set the permissions on the openHAB data folder
    file:
      path: "{{ openhab_home }}"
      state: directory
      owner: openhab
      group: openhab
      mode: u=rwx,g=rwx,o=rx

  become: True

- name: See if config is already present
  stat:
    path: "{{ openhab_home }}/userdata/etc/version.properties"
  register: conf_present

- name: Check to see if its is up
  shell: "nc -vz {{ git_host }} {{ git_port }}"
  register: git_running
  changed_when: False
  failed_when: False

- name: Checkout openHAB configs if this is a new install
  git:
    repo: "{{ openhab_conf_repo }}"
    dest: "{{ openhab_home }}"
    accept_hostkey: True
  when: (git_running['stderr'] is match(".* succeeded!")) and
        (not conf_present.stat.exists)

- name: Create missing folders
  file: 
    path: "{{ item }}"
    state: directory
    owner: openhab
    group: openhab
    mode: u=rwx,g=rwx,o=rx
  loop:
    - "{{ openhab_home }}/userdata/cache"
    - "{{ openhab_home }}/userdata/logs"
    - "{{ openhab_home }}/userdata/persistence"
    - "{{ openhab_home }}/userdata/tmp"
  become: True

- name: Change ownership of openHAB configs
  file:
    path: "{{ openhab_home }}"
    owner: openhab
    group: openhab
    recurse: yes
  become: True
  when: (git_running['stderr'] is match(".* succeeded!")) and
        (not conf_present.stat.exists)

- name: Create the InfluxDB database
  influxdb_database:
    hostname: "{{ influxdb_ip_address }}"
    database_name: "{{ openhab_influxdb_database_name }}"
    state: present
    username: "{{ influxdb_admin_user }}"
    password: "{{ influxdb_admin_password }}"

- name: Create the InfluxDB openHAB user and grant permissions
  influxdb_user:
    hostname: "{{ influxdb_ip_address }}"
    user_name: "{{ influxdb_openhab_user }}"
    user_password: "{{ influxdb_openhab_password }}"
    login_username: "{{ influxdb_admin_user }}"
    login_password: "{{ influxdb_admin_password }}"
    grants:
      - database: "{{ openhab_influxdb_database_name }}"
        privilege: 'ALL'

- name: Create InfluxDB Grafana user and grant read permissions
  influxdb_user:
    hostname: "{{ influxdb_ip_address }}"
    user_name: "{{ influxdb_grafana_user }}"
    user_password: "{{ influxdb_grafana_password }}"
    login_username: "{{ influxdb_admin_user }}"
    login_password: "{{ influxdb_admin_password }}"
    grants:
      - database: "{{ openhab_influxdb_database_name }}"
        privilege: 'READ'

- name: Check the current version of openHAB
  shell: grep openhab-distro {{ openhab_home }}/userdata/etc/version.properties | cut -d ' ' -f 4
  register: old_version
  when: conf_present.stat.exists
  changed_when: False

- name: Deploy live version
  block:
    - name: Pull/update the openHAB docker image
      docker_container:
        detach: True
        devices:
          - "/dev/ttyUSB0:/dev/ttyUSB0:rwm"
          - "/dev/ttyUSB1:/dev/ttyUSB1:rwm"
        env:
          CRYPTO_POLICY: unlimited
        hostname: "{{ ansible_fqdn }}"
        image: openhab/openhab:{{ openhab_version }}
        log_driver: syslog
        name: openhab
        network_mode: host
        pull: True
        restart: False
        restart_policy: always
        tty: True
        volumes:
          - /etc/localtime:/etc/localtime:ro
          - /etc/timezone:/etc/timezone:ro
          - "{{ openhab_home }}/conf:/openhab/conf"
          - "{{ openhab_home }}/userdata:/openhab/userdata"
          - "{{ openhab_home }}/addons:/openhab/addons"
      register: openhab_pulled
    
    - name: Restart if this is a new version
      block:
    
        - name: Wait a minute for the container to initialize
          pause:
            minutes: 1
    
        - name: Check the new version
          shell: grep openhab-distro {{ openhab_home }}/userdata/etc/version.properties | cut -d ' ' -f 4
          register: new_version
          changed_when: False
    
        - name: Print the versions
          debug:
            msg: old version = {{ old_version['stdout'] }} new version = {{ new_version['stdout'] }}
    
        - name: Restart the container
          block:
            - name: Wait for OH to finish coming up
              pause:
                minutes: 4
            
            - name: Restart the container
              shell: docker restart openhab    
    
          when: old_version['stdout'] != new_version['stdout']
    
      when: (openhab_pulled.changed) and (conf_present.stat.exists)
  when: not openhab_test 

- name: Pull/update the openHAB docker image
  docker_container:
    detach: True
    env:
      CRYPTO_POLICY: unlimited
    hostname: "{{ ansible_fqdn }}"
    image: openhab/openhab:{{ openhab_version }}
    log_driver: syslog
    name: openhab
    network_mode: host
    pull: True
    restart: False
    restart_policy: always
    tty: True
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - "{{ openhab_home }}/conf:/openhab/conf"
      - "{{ openhab_home }}/userdata:/openhab/userdata"
      - "{{ openhab_home }}/addons:/openhab/addons"
  when: openhab_test

The big problem with the above though is it assumes the openhab3 repo already exists. So before starting I had to create an empty openhab3 repo with just a README.md file in it. That gets checked out and then the role and openHAB’s entrypoint.sh script will populate the rest of the files with defaults.

Once OH came up I checked in the default configs as the git baseline.

First boot

I watched the logs and saw a flurry of exceptions. None of them point any any specific problem that I can tell so I’ll watch and see if they continue to occur.

Skipping the stack traces for now:


bundle org.apache.felix.scr:2.1.16 (49)Circular reference detected trying to get service {org.openhab.core.items.MetadataProvider}={service.id=300, service.bundleid=184, service.scope=bundle, c
omponent.name=org.openhab.core.semantics.internal.SemanticsMetadataProvider, component.id=137}
 stack of references: ServiceReference: {org.openhab.core.items.MetadataProvider}={service.id=300, service.bundleid=184, service.scope=bundle, component.name=org.openhab.core.semantics.internal.SemanticsMetadataProvider, component.id=137}
ServiceReference: {org.openhab.core.items.ItemRegistry}={service.id=295, service.bundleid=128, service.scope=bundle, component.name=org.openhab.core.internal.items.ItemRegistryImpl, component.id=203}
ServiceReference: {org.openhab.core.items.MetadataRegistry}={service.id=294, service.bundleid=128, service.scope=bundle, component.name=org.openhab.core.internal.items.MetadataRegistryImpl, component.id=208}

...

2020-10-14 12:01:25.513 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.MetadataRegistryImpl(208)] : The activate method has thrown an exception
java.lang.NullPointerException: null

...

2020-10-14 12:01:25.594 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.ItemRegistryImpl(203)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.597 [ERROR] [org.openhab.core.semantics          ] - bundle org.openhab.core.semantics:3.0.0.202010120301 (184)[org.openhab.core.semantics.internal.SemanticsMetadataProvider(137)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.668 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.ItemUpdater(205)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.737 [ERROR] [org.openhab.core.ui                 ] - bundle org.openhab.core.ui:3.0.0.202010120305 (189)[org.openhab.core.ui.internal.items.ItemUIRegistryImpl(134)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.750 [ERROR] [org.openhab.core.io.rest.sitemap    ] - bundle org.openhab.core.io.rest.sitemap:3.0.0.202010120306 (156)[org.openhab.core.io.rest.sitemap.SitemapSubscriptionService(142)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:25.766 [ERROR] [org.openhab.core.io.rest.sitemap    ] - bundle org.openhab.core.io.rest.sitemap:3.0.0.202010120306 (156)[org.openhab.core.io.rest.sitemap.internal.SitemapResource(143)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.777 [WARN ] [rd.internal.AriesJaxrsServiceRuntime] - Resource from reference CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=sitemaps, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={org.openhab.core.io.rest.RESTResource}={osgi.jaxrs.resource=true, service.id=305, service.bundleid=156, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=sitemaps, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.core.io.rest.sitemap.internal.SitemapResource, component.id=143}
} can't be got
2020-10-14 12:01:25.796 [ERROR] [org.openhab.core.ui                 ] - bundle org.openhab.core.ui:3.0.0.202010120305 (189)[org.openhab.core.ui.internal.chart.defaultchartprovider.DefaultChartProvider(131)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:25.921 [ERROR] [penhab.core.automation.module.script] - bundle org.openhab.core.automation.module.script:3.0.0.202010120308 (134)[org.openhab.core.automation.module.script.internal.defaultscope.DefaultScriptScopeProvider(153)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.956 [ERROR] [org.openhab.core.io.rest.core       ] - bundle org.openhab.core.io.rest.core:3.0.0.202010120304 (154)[org.openhab.core.io.rest.core.internal.persistence.PersistenceResource(124)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:25.969 [WARN ] [rd.internal.AriesJaxrsServiceRuntime] - Resource from reference CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=persistence, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={org.openhab.core.io.rest.RESTResource}={osgi.jaxrs.resource=true, service.id=311, service.bundleid=154, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=persistence, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.core.io.rest.core.internal.persistence.PersistenceResource, component.id=124}
} can't be got
2020-10-14 12:01:25.996 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.link.ItemChannelLinkRegistry(38)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:26.001 [ERROR] [org.openhab.core.io.rest.core       ] - bundle org.openhab.core.io.rest.core:3.0.0.202010120304 (154)[org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResource(123)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:26.005 [WARN ] [rd.internal.AriesJaxrsServiceRuntime] - Resource from reference CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=links, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={org.openhab.core.io.rest.RESTResource, org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResource}={osgi.jaxrs.resource=true, service.id=313, service.bundleid=154, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=links, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResource, component.id=123}
} can't be got
2020-10-14 12:01:26.013 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.ChannelLinkNotifier(24)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:26.018 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.ChannelStateDescriptionProvider(25)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:26.024 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.console.LinkConsoleCommandExtension(31)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:26.041 [ERROR] [org.openhab.core.io.rest.sse        ] - bundle org.openhab.core.io.rest.sse:3.0.0.202010120306 (157)[org.openhab.core.io.rest.sse.internal.SseItemStatesEventBuilder(147)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:26.043 [ERROR] [org.openhab.core.io.rest.sse        ] - bundle org.openhab.core.io.rest.sse:3.0.0.202010120306 (157)[org.openhab.core.io.rest.sse.SseResource(146)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:26.046 [WARN ] [rd.internal.AriesJaxrsServiceRuntime] - Resource from reference CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=events, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={org.openhab.core.io.rest.RESTResource, org.openhab.core.io.rest.sse.internal.SsePublisher}={osgi.jaxrs.resource=true, service.id=320, service.bundleid=157, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=events, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.core.io.rest.sse.SseResource, component.id=146}
} can't be got
2020-10-14 12:01:26.052 [ERROR] [org.openhab.core.io.rest.sse        ] - bundle org.openhab.core.io.rest.sse:3.0.0.202010120306 (157)[org.openhab.core.io.rest.sse.internal.listeners.SseEventSubscriber(148)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:26.069 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.AutoUpdateManager(22)] :  Error during instantiation of the implementation object: Unable to get service for reference $003
2020-10-14 12:01:26.071 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.MetadataRegistryImpl(208)] : The activate method has thrown an exception
java.lang.NullPointerException: null

...

2020-10-14 12:01:26.135 [ERROR] [org.openhab.core.persistence        ] - bundle org.openhab.core.persistence:3.0.0.202010120301 (183)[org.openhab.core.persistence.internal.PersistenceManagerImpl(60)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:26.177 [ERROR] [org.openhab.core.model.script       ] - bundle org.openhab.core.model.script:3.0.0.202010120311 (174)[org.openhab.core.model.script.ScriptServiceUtil(166)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:26.198 [ERROR] [rg.openhab.core.model.script.runtime] - bundle org.openhab.core.model.script.runtime:3.0.0.202010120314 (176)[org.openhab.core.model.script.runtime.internal.engine.DSLScriptEngineFactory(159)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:27.105 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.ChannelCommandDescriptionProvider(23)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:27.118 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.MetadataRegistryImpl(208)] : The activate method has thrown an exception
java.lang.NullPointerException: null

...

2020-10-14 12:01:27.129 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.MetadataCommandDescriptionProvider(207)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:27.160 [ERROR] [org.openhab.core.model.rule         ] - bundle org.openhab.core.model.rule:3.0.0.202010120312 (171)[org.openhab.core.model.rule.jvmmodel.RulesRefresher(129)] :  Error during instantiation of the implementation object: Unable to get service for reference $001
2020-10-14 12:01:27.835 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.MetadataRegistryImpl(208)] : The activate method has thrown an exception
java.lang.NullPointerException: null

...

2020-10-14 12:01:27.906 [ERROR] [org.openhab.core                    ] - bundle org.openhab.core:3.0.0.202010120255 (128)[org.openhab.core.internal.items.MetadataStateDescriptionFragmentProvider(209)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:27.940 [ERROR] [org.openhab.core.io.rest.core       ] - bundle org.openhab.core.io.rest.core:3.0.0.202010120304 (154)[org.openhab.core.io.rest.core.internal.item.ItemResource(121)] :  Error during instantiation of the implementation object: Unable to get service for reference $003
2020-10-14 12:01:27.950 [WARN ] [rd.internal.AriesJaxrsServiceRuntime] - Resource from reference CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=items, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={org.openhab.core.io.rest.RESTResource}={osgi.jaxrs.resource=true, service.id=358, service.bundleid=154, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=items, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.core.io.rest.core.internal.item.ItemResource, component.id=121}
} can't be got
2020-10-14 12:01:28.017 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.CommunicationManager(26)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:28.043 [ERROR] [org.openhab.core.io.rest.core       ] - bundle org.openhab.core.io.rest.core:3.0.0.202010120304 (154)[org.openhab.core.io.rest.core.internal.thing.ThingResource(127)] :  Error during instantiation of the implementation object: Unable to get service for reference $005
2020-10-14 12:01:28.046 [WARN ] [rd.internal.AriesJaxrsServiceRuntime] - Resource from reference CachingServiceReference {
cachedProperties={osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=things, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), osgi.jaxrs.whiteboard.target=null (cached)}
serviceReference={org.openhab.core.io.rest.RESTResource}={osgi.jaxrs.resource=true, service.id=362, service.bundleid=154, service.scope=bundle, osgi.jaxrs.application.select=(osgi.jaxrs.name=openhab), osgi.jaxrs.name=things, osgi.jaxrs.extension.select=(osgi.jaxrs.media.type=application/json), component.name=org.openhab.core.io.rest.core.internal.thing.ThingResource, component.id=127}
} can't be got
2020-10-14 12:01:28.079 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.ThingManagerImpl(28)] :  Error during instantiation of the implementation object: Unable to get service for reference $003
2020-10-14 12:01:28.081 [ERROR] [org.openhab.core.thing              ] - bundle org.openhab.core.thing:3.0.0.202010120257 (186)[org.openhab.core.thing.internal.console.ThingConsoleCommandExtension(32)] :  Error during instantiation of the implementation object: Unable to get service for reference $004
2020-10-14 12:01:28.115 [WARN ] [org.openhab.core.net.NetUtil        ] - Found multiple local interfaces - ignoring 10.10.1.138
2020-10-14 12:01:29.349 [ERROR] [org.openhab.core.io.console         ] - bundle org.openhab.core.io.console:3.0.0.202010120257 (144)[org.openhab.core.io.console.internal.extension.MetadataConsoleCommandExtension(8)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:29.364 [ERROR] [org.openhab.core.io.console         ] - bundle org.openhab.core.io.console:3.0.0.202010120257 (144)[org.openhab.core.io.console.internal.extension.SendConsoleCommandExtension(9)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:29.392 [ERROR] [org.openhab.core.io.console         ] - bundle org.openhab.core.io.console:3.0.0.202010120257 (144)[org.openhab.core.io.console.internal.extension.StatusConsoleCommandExtension(10)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:29.396 [ERROR] [org.openhab.core.io.console         ] - bundle org.openhab.core.io.console:3.0.0.202010120257 (144)[org.openhab.core.io.console.internal.extension.UpdateConsoleCommandExtension(11)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:29.410 [ERROR] [org.openhab.core.voice              ] - bundle org.openhab.core.voice:3.0.0.202010120300 (191)[org.openhab.core.voice.internal.VoiceConsoleCommandExtension(176)] :  Error during instantiation of the implementation object: Unable to get service for reference $002
2020-10-14 12:01:29.429 [ERROR] [org.openhab.core.io.console         ] - bundle org.openhab.core.io.console:3.0.0.202010120257 (144)[org.openhab.core.io.console.internal.extension.ItemConsoleCommandExtension(7)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:32.657 [ERROR] [org.openhab.core.model.lsp          ] - bundle org.openhab.core.model.lsp:3.0.0.202010120313 (167)[org.openhab.core.model.lsp.internal.ModelServer(243)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:45.999 [ERROR] [org.openhab.persistence.rrd4j       ] - bundle org.openhab.persistence.rrd4j:3.0.0.202010140355 (209)[org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService(244)] :  Error during instantiation of the implementation object: Unable to get service for reference $000
2020-10-14 12:01:46.109 [ERROR] [org.openhab.ui.basic                ] - bundle org.openhab.ui.basic:3.0.0.202010101808 (210)[org.openhab.ui.basic.internal.servlet.CmdServlet(262)] :  Error during instantiation of the implementation object: Unable to get service for reference $002
2020-10-14 12:01:46.134 [ERROR] [org.openhab.ui.basic                ] - bundle org.openhab.ui.basic:3.0.0.202010101808 (210)[org.openhab.ui.basic.internal.servlet.WebAppServlet(263)] :  Error during instantiation of the implementation object: Unable to get service for reference $002
2020-10-14 12:01:46.347 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel

The above all occurred before I attempted to bring up the UI.

Restarting the container, still without logging in yet cleared up all of the errors. Perhaps this is just a problem with the Docker container? I can’t imagine that devs would let the first boot of OH generate so many errors.

Anyway, moving on…

Now that I have a clean boot default config I updated the .gitignore file to skip the userdata cache, tmp, and logs folders and commited it to the repo. There was a bit of consternation on this step though. I had to add write permissions on all of the folders, including .git, and I had to log out and log back in as the new group membership for my login account doesn’t get picked up until you do that.

Logging in

I created an account and chose to go through the setup wizard. I set my location using the map and skipped installing addo-ons for now. My language and time zone was correctly determined from the system presumably.

Confusion # 1

I’m sure this will be addressed once we fill out the docs in the links but this page, as of right now, really leaves one scratching their head on what to do next. It is not at all clear what to do next or how to edit the layout page with the information presented. Maybe we can provide a bit more direction telling the new user to go to settings and they can start editing under “Pages”. Though they will not need to start. Maybe we can emphasize the “tutorial” button as the new user really needs to start there. As soon as they click on settings they will become overwhelmed.

Clicking on the various tabs at the bottom bring up additional blank pages. The icon at the upper right shows BasicUI and HABPanel.

Settings

Here appears to be where everything is done.

Start simple, Persistence

I see that rrd4j is installed by default. That isn’t a terrible idea but I removed it and installed MapDB and InfluxDB instead as that’s what I’m using in OH 2. Don’t uninstall rrd4j. I did install MapDB and InfluxDB. Unfortunately they do not appear to be configurable through the UI yet and there are warnings in the logs about missing .persist files. That last stement was primarily referring to the .persist files. The InfluxDB connection itself is configurable through the UI. Continuing the exploration…

Other settings

Set up other stuff on the right hand corner is mostly straight forward.

TODO: Look into Ephemeris and see if the city field can be grayed out if there are no cities in JollyDay for the selected country and region.

TODO: File issue to add more explanation of the implications of turning off remote addon installation. What happens when I turn that off? Do I have to do something outside of this UI to turn it off without errors (e.g. install openhab-addons using apt)? There is room for more inline documentation.

TODO: Why is Rule Voice Interpreter listed under Other Services instead of under Voice in the previous section?

InfluxDB settings

It’s been a long time since I set up InfluxDB so it took some looking to figure out the proper values for the connection fields. I’m running the latest from dockerhub which is version 1.8, not a version 2. And the default retention policy is autogen.

TODO: Figure out what the Tags settings are all about. The descriptions are not clear, or at least not clear to someone with my current level of knowledge. I left them alone.

Copied over my influxdb.persist file and saw it was loaded in the logs but nothing else. I assume there would be errors logged out if the connection failed? Need to verify. I also copied over my mapdb.persist file.

There were problems that have since been fixed (as of snapshot 1989 ish). If you configured the InfluxDB binding and had it connected to the same database that was populated by InfluxDB 2.x binding, you need to start over with the database.

Bindings and Things

I’m going to install just those bindings that will not interfear with my production system first. I want to get everything up as far as possible before I have to move over so that measn Zwave/Zigbee will be last.

Astro

Installed the binding and immediately Things were added to the Inbox.

~~TODO: It would be nice if we could filter the Channels to only show those that have an Item linked to them. The search is nice though. ~~

I’m taking this opportunity to clean some things up so I ignored the moon Thing and accepted the Sun Thing. Then I added offsets to various Channels rather than creating a brand new Thing for each offset. I want one Item set to 30 minutes before sunset and another 120 minutes before sunset so I use the Sunset Channel and the Astro Sunset Channel for those. Hurray! Already my config is becomming cleaner. :smiley:

I create the needed Groups and Items to link to these Channels using the UI. I could have imported them in bulk but want to review each and every Item and Channel as I add them to get rid of the stuff I don’t use any more. I did import them from my .items file using the import from text config option.

TODO: I miss the ability to copy the Channel ID fro the Things pages.

TODO: It would be nice to see the custom metadata already applied to the Item on the Item editing page.

TODO: It would be nice if bindings like OpenWeatherMap that have information that can be derived from the OH system (e.g. language) to default to that.

OpenWeatherMap

Installed the binding, accepted the Things from the Inbox, and imported the Items I’m using from my OH 2 config without problem.

This is going to take some time and I don’t need to keep writing “it worked” so I’ll come back with problems and will probably start a separate thread for Rules.

I will need to do some research on the TODOs above but expect there might be some new GitHub issues that will come out of them. I’ll also start editing the docs and tutorial as I progress.

EDIT: I’ve created a number of Issues on GitHub that reference many of the todos above. Over all I’m super impressed with the look and the utility of the new UI. It’s going to be a game changer going forward. Most of what I’m finding and filing are minor refinements to the wonderful work that is already there. Great work!

Edit: Astro problem

So I created an Astro Thing as described above and I noticed the following appearing in my logs.

2020-10-14 14:24:03.855 [WARN ] [ng.astro.internal.util.DateTimeUtils] - Can not parse astro channel configuration '0:00' to hour and minutes, use pattern hh:mm, ignoring!

It turns out that I had created offsets for three of the channels on my Astro Thing. When I saved the “not before” and “not after” fields defaulted to “0:00” which is invalid. To get rid of the error I edited the Channels again and set them to “00:00”. I’m not sure where to file the issue for this one, on the binding or on the MainUI.

Edit: Exec binding

Don’t forget to install the needed transformations!

Edit: rrd4j

Don’t uninstall rrd4j. The analysis capability in MainUI Pages depend on it.

23 Likes

I love your writeups @rlkoshak and your effort for this community! I´ll try to use the next weeks to also write down my first impressions and experiences with OH3, as it seems we all will spend a lot of time indoors this year.

2 Likes

You were just unlucky to run into an issue that very occasionally occurs (also with OH 2.5.x) :wink: :

1 Like

Thanks, this is useful. This message is temporary and I never planned to leave it as is (the first prototypes of the UI actually showed a “next steps” card with followup instructions there when it was detected that the system was brand new), it’s understandable that it could be confusing.

3 Likes

I know what I’m doing tomorrow!! Thanks for the guidance

THANK YOU! I was working away on Sites and had no idea how to view what I was creating as a sitemap. That icon up the top right might need a bit more emphasis adding. When I browse to my OH webpage I usually want to control the home rather than edit the configuration. I see that if you’re not logged in you can control it, but didn’t see an easy way to use another UI until now

one thing to note is the new UI supports role based access. When a user who is not an admin logs in only the control pages are shown and none of the administration options. The new UI can be used for both admin and as the day to day interface.

1 Like

A reminder: when trying to change the password of the first created user (which was an admin by default) the user has to be recreated AND has to be assigned the role administrator ( the shorter form isn’t doing it!)

1 Like

Hi Rich, thanks for your first tour.
I have an hybrid configuration with the items and roules on file and the things on DB. What is the best approach with openhab 3, can we leave the file approach (I love It because is more clean and easy to mantain)? is there a best practices guide?
I read somewhere that python is the best linguage for roules. Sorry, I have a lot of confusion :S

You don’t have to change anything you don’t want to (except for 1.x version bindings that don’t work). My recommendation would be to put everything you can into JSONDB. Everything works so much better when that’s the case. And I believe the getting started tutorial and the official recommendation will be to do that as well. But you need to decide what works best for you and go with that.

My current tentative plan us to discover Things, use HABApp to create Items in the JSONDB and to handle rules with Python3, That give me a rather easy way to re-create my configuration either for testing or other purposes. Worst case would be to edit the script for any different Thing IDs…

HABApp is for more advanced Linux / Python users, IMO.

Include the region field in this. I’m in Canada and when I select my country my options for region are the 50 states.

2 Likes

That sounds like more of a bug. It should show the provinces as those are in-fact defined in the XML.

2 Likes

Interesting, thank you for the info! I must admit I know very little about empheris, I never got around to implementing it.

Try saving the country as Canada first. After that the list of Regions is updated to that of your country. Not ideal, but it might be better than US States. :slight_smile:

2 Likes

@wborn Just a followup on this (I finally got back around to working on OH3) saving and returning to the Empheris menu does work as said, I see all Canadian provinces now.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.