openHAB 3.0 Milestone 5 discussion

I tried to start a clean installation of M5 with a docker container on a synology.
Unfortunately the startup log of the container shows an error that is doesn’t tell my anything. There is no log file in userdata/ logs. Only the directories under conf have been created.

here is the container output:

	The home directory `/openhab' already exists.  Not copying from `/etc/skel'.
	+ groupadd -g 14 uucp2
	+ groupadd -g 16 dialout2
	+ groupadd -g 18 dialout3
	+ groupadd -g 32 uucp3
	+ groupadd -g 997 gpio
	+ adduser openhab dialout
	Adding user `openhab' to group `dialout' ...
	Adding user openhab to group dialout
	Done.
	+ adduser openhab uucp
	Adding user `openhab' to group `uucp' ...
	Adding user openhab to group uucp
	Done.
	+ adduser openhab uucp2
	Adding user `openhab' to group `uucp2' ...
	Adding user openhab to group uucp2
	Done.
	+ adduser openhab dialout2
	Adding user `openhab' to group `dialout2' ...
	Adding user openhab to group dialout2
	Done.
	+ adduser openhab dialout3
	Adding user `openhab' to group `dialout3' ...
	Adding user openhab to group dialout3
	Done.
	+ adduser openhab uucp3
	Adding user `openhab' to group `uucp3' ...
	Adding user openhab to group uucp3
	Done.
	+ adduser openhab gpio
	Adding user `openhab' to group `gpio' ...
	Adding user openhab to group gpio
	Done.
	+ initialize_volume /openhab/conf /openhab/dist/conf
	+ volume=/openhab/conf
	+ source=/openhab/dist/conf
	++ ls -A /openhab/conf
	+ '[' -z '' ']'
	+ echo 'Initializing empty volume /openhab/conf ...'
	+ cp -av /openhab/dist/conf/. /openhab/conf/
	Initializing empty volume /openhab/conf ...
	'/openhab/dist/conf/./html' -> '/openhab/conf/./html'
	'/openhab/dist/conf/./html/index.html' -> '/openhab/conf/./html/index.html'
	+ initialize_volume /openhab/userdata /openhab/dist/userdata
	'/openhab/dist/conf/./html/readme.txt' -> '/openhab/conf/./html/readme.txt'
	'/openhab/dist/conf/./icons' -> '/openhab/conf/./icons'
	'/openhab/dist/conf/./icons/classic' -> '/openhab/conf/./icons/classic'
	'/openhab/dist/conf/./icons/classic/readme.txt' -> '/openhab/conf/./icons
	classic/readme.txt'
	'/openhab/dist/conf/./items' -> '/openhab/conf/./items'
	'/openhab/dist/conf/./items/readme.txt' -> '/openhab/conf/./items/readme.txt'
	'/openhab/dist/conf/./persistence' -> '/openhab/conf/./persistence'
	'/openhab/dist/conf/./persistence/readme.txt' -> '/openhab/conf/./persistence/readme.txt'
	'/openhab/dist/conf/./rules' -> '/openhab/conf/./rules'
	'/openhab/dist/conf/./rules/readme.txt' -> '/openhab/conf/./rules/readme.txt'
	'/openhab/dist/conf/./scripts' -> '/openhab/conf/./scripts'
	'/openhab/dist/conf/./scripts/readme.txt' -> '/openhab/conf/./scripts/readme.txt'
	'/openhab/dist/conf/./services' -> '/openhab/conf/./services'
	'/openhab/dist/conf/./services/addons.cfg' -> '/openhab/conf/./services/addons.cfg'
	'/openhab/dist/conf/./services/readme.txt' -> '/openhab/conf/./services/readme.txt'
	'/openhab/dist/conf/./services/runtime.cfg' -> '/openhab/conf/./services/runtime.cfg'
	'/openhab/dist/conf/./sitemaps' -> '/openhab/conf/./sitemaps'
	'/openhab/dist/conf/./sitemaps/readme.txt' -> '/openhab/conf/./sitemaps/readme.txt'
	'/openhab/dist/conf/./sounds' -> '/openhab/conf/./sounds'
	'/openhab/dist/conf/./sounds/barking.mp3' -> '/openhab/conf/./sounds/barking.mp3'
	'/openhab/dist/conf/./sounds/doorbell.mp3' -> '/openhab/conf/./sounds/doorbell.mp3'
	+ volume=/openhab/userdata
	'/openhab/dist/conf/./things' -> '/openhab/conf/./things'
	'/openhab/dist/conf/./things/readme.txt' -> '/openhab/conf/./things/readme.txt'
	'/openhab/dist/conf/./transform' -> '/openhab/conf/./transform'
	'/openhab/dist/conf/./transform/de.map' -> '/openhab/conf/./transform/de.map'
	'/openhab/dist/conf/./transform/en.map' -> '/openhab/conf/./transform/en.map'
	'/openhab/dist/conf/./transform/readme.txt' -> '/openhab/conf/./transform/readme.txt'
	+ source=/openhab/dist/userdata
	++ ls -A /openhab/userdata
	+ '[' -z 'etc
	logs
	tmp' ']'
	++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
	cmp: /openhab/userdata/etc/version.properties: No such file or directory
	+ '[' '!' -z ']'
	+ chown -R openhab:openhab /openhab
	+ sync
	+ '[' -d /etc/cont-init.d ']'
	+ sync
	+ '[' false == false ']'
	++ IFS=' '
	++ echo gosu openhab tini -s ./start.sh
	+ '[' 'gosu openhab tini -s ./start.sh' == 'gosu openhab tini -s ./start.sh' ']'
	+ command=($@ server)
	+ exec gosu openhab tini -s ./start.sh server
	Launching the openHAB runtime...
	null
	Error occurred shutting down framework: java.lang.NumberFormatException: null
	java.lang.NumberFormatException: null
		at java.base/java.lang.Integer.parseInt(Integer.java:614)
		at java.base/java.lang.Integer.parseInt(Integer.java:770)
		at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:235)
		at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:227)
		at org.apache.karaf.main.Main.main(Main.java:192)

any ideas?

What is your docker run command? Here is mine but I am mapping the http port to 8081 & https to port 8444 because I have OH2 on the same VM.

docker run --name openhab  \
-p 8081:8080  \
-p 8444:8443  \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /opt/openhab/addons:/openhab/addons \
-v /opt/openhab/conf:/openhab/conf \
-v /opt/openhab/userdata:/openhab/userdata \
-e "USER_ID=998" \
-e "GROUP_ID=997" \
-e "EXTRA_JAVA_OPTS=-Duser.timezone=America/New_York" \
--privileged \
-d \
--restart=always \
openhab/openhab:3.0.0.M5

I am running the M5 Docker container fine in a Debian VM.

++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
cmp: /openhab/userdata/etc/version.properties: No such file or directory

The etc directory is not in my container either but that does not stop it from running.

Thanks for the update and the great work on this. As Jython support is essential for me, I will have to be patient :slight_smile:

3 Likes

Great news!!

I’m pretty new at OH community as I’m moving from HA due to ZWave framework issues so still checking very basic stuff on this M5 release.

One issue I see is that if you set an item to belong to more than one group, at the Semantic Model view it is shown only in one of those groups (not able to get the pattern of which one).

Tried both methods: defining the item through text file and through GUI (Group Membership - Parent Group(s) ) with no luck at all.

Can someone else confirm it works for them? Thanks!

1 Like

What is your docker run command? Here is mine but I am mapping the http port to 8081 & https to port 8444 because I have OH2 on the same VM.

I am running on a synology in parallel with an OP 2.5
I’m setting the ports in the environment variables.

	docker run -d \
	  --name openhab30M5host \
	  --net=host \
	  -v /etc/localtime:/etc/localtime:ro \
	  -v /volume1/homes/agerdts/openhab30/data/addons:/openhab/addons \
	  -v /volume1/homes/agerdts/openhab30/data/conf:/openhab/conf \
	  -v /volume1/homes/agerdts/openhab30/data/userdata:/openhab/userdata \
	  -v /volume1/homes/agerdts/openhab30/data/userdata/tmp:/var/lib/openhab2/tmp \
	  -e "EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin" \
	  -e OPENHAB_HTTP_PORT=6000 \
	  -e OPENHAB_HTTPS_PORT=6443 \
	  openhab/openhab:3.0.0.M5

I’ve seen the same behavior and I figured that was be design. What sort of use case do you have where the same Item would be a member of more than one Group? The typical flow is an Item is a member of an Equipment Group which is a member of either another Equipment Group or a Location. In rare cases, an Item would be a member of a Location Group directly.

If an Item is a member of more than one Group it implies that the Item is in two different places at the same time.

Thank you @rlkoshak for your support.
Let’s see if I’m able to explain myself. Please, bear in mind I’m pretty new with OH (since M2) and I’m still learning :slight_smile:

My semantic model is: [Home] / [Room1] , [Room2],…
In each room my idea is to have 4 groups:

  • Devices Group
  • Power Outlet Group
  • Light Group
  • Sensor Group

Into the “Devices” group I’m putting one equipment/group per physical device.
For instance, one group per power outlet, one group per light bulb, one group per sensor.
Each group will have several points:

  • Power outlet -> Switch itself, Energy meter, Power meter
  • Light bulb -> Brightness/Color, Color temperature
  • Sensor -> Motion, Luminance, Humidity, Pressure, Battery Level, Low Battery switch

Into the “Power Outlet Group” my idea is only to have the “switches” of the power outlets I had into the “Devices” group.
Into the “Light Group” only the “Brigthness/Color” points of the “Devices” group
Into the “Sensor Group” only the points which are really sensors (not batteries, for instance).

Why this hierarchy? Because keeping only the “Devices” group, the information shown “automagically” by the new UI isn’t helpful. For instance, putting the “real sensor” information into a “Sensor Group” hanging up directly from the room it will show up in the GUI the temperature and humidity automagically. If you keep that information into a group (the physical device) inside a “Device Group” inside the “Room”, the UI won’t show that information into the widget automagically.

In summary, I’m trying to get the “Verticals” information as in here:

Reading the documentation, it is expected to have a point into several groups (you can set it through GUI and through text files) so, why aren’t shown in the semantic model tree? It doesn’t sound like an expected behavior, isn’t it? Why if not will you allow to set a point to belong to several groups?

Anyhow, any comment is welcome. Probably I misunderstood something here and I willing to learn :slight_smile:

Thanks in advance!

1 Like

I still see only M4 for download on the official page. How do I get M5 for MacOS?

I have something similar to:

Contact garageDoor1Contact
DateTime garageDoor1TimeStamp 

I’m setting the value of garageDoor1TimeStamp via a rule when garageDoor1Contact is changed to OPEN or CLOSED. When I restart the system, the value of garageDoor1Contact is restored but garageDoor1TimeStamp remains NULL. I’m using rrd4j. Shouldn’t garageDoor1TimeStamp get restored as well?

I originally tried using both timestamp-update and timestamp-change, and on restart it would set the timestamp to the system start time.

I don’t know if rrd4j stores DateTimeTypes. rrd4j is only capable of storing numerical data that can be decimated (e.g. as it gets older ten entries will get replaced with the average of those ten entries). That probably doesn’t make sense for date time values so you need something else to do restoreOnStartup. MapDB excels at this task as it only saves one value (so it never grows) and can save and restore all Item types.

That’s the point I don’t think it does. It’s also the default persistence layer installed by openHAB 3 and is providing restoreOnStartup for some data types, but not others.

Except for being the default (OH 2 didn’t come with any persistence be default) that is as it has always been. rrd4j can only store numeric data. It’s a fundamental limitation and not something that can change.

The default persistence layer shouldn’t leave the system in a half baked state at startup. I created issue Default persistence doesn't persist all data types · Issue #1902 · openhab/openhab-core · GitHub for it.

1 Like

Given that the default persistence needs to be embedded and rrdj4 and mapdb are the only two embedded databases the only solution is to not provide any default at all and require all users to pick and install one. In the mean time all the analysis functions will not work in Pages and people will complain about OH shipping with “half backed” UI functionality.

1 Like

One issue I see is that if you set an item to belong to more than one group, at the Semantic Model view it is shown only in one of those groups (not able to get the pattern of which one).

Actually for me the semantic model is capable to show the same item in two groups:Bildschirmfoto 2020-12-07 um 21.04.00

Just go into items → Group → Direct Group Members → Change and add the item to a second group.

EDIT: I notice, if you attempt to add the item into a third group it is indeed not shown in all groups.

The smal and nifty things.

If you look at the right side of your screen in main UI, you might recognize some small letters.

image

The are shortcuts to navigate faster in a large list. I really like that! @ysc Thanks

1 Like

@jensflorian I’m afraid there is no need to have item in three groups.
At least in my case it fails with 2 groups:

It fails to be shown into semantic model tree. Into new UI it seems to be able to know the item is in both groups (the “group per physical device at room” and the “group per all sensors at room”
imagen
imagen

Why do you need “Sensors del dormitorio” and, if you do need it, why does it need to be part of the model? But putting the sensor Equipment or Points into that room it’ll already be a sensor in that room. There is no need to create yet another Group to represent the sensors of the room, at least not for the model’s sake.

The way the model is designed to work is:

  • Room
    • Equipment
      • Point
        With the information presented, I think your gDL_Sensors should not be a part of the model in the first place. It is not required nor even expected that all Items and Groups will be part of the model.
1 Like

Thank you @rlkoshak for your comment. I’ll look into it but, if you don’t mind: if an item is allowed to belong to several groups (and it is allowed by “Direct Parent Groups”/“Direct Group Members” options), why is not showing them in those groups but only in one an expected behavior?

I mean, based in your comment it is clear I misunderstood the way the model is designed to work (I’ll change my layout accordingly) but still wondering the use case of having the chance in GUI (and text item definition) to have the same item in several groups if what I thought was the usecase turns out not to be the expected one.

Thank you

Because the model isn’t about Groups. It’s about meaning. You are giving meaning to your Items and that meaning is represented by tags and Group membership. To important part of the model is the relationships. And any model has to make assumptions about certain things. It seems perfectly reasonable to me that one assumption would be that a given sensor or actuator cannot belong to more than one equipment at the same time. After all, you can’t do that in the real world and the model is supposed to represent the real world. Similarly you can’t have a sensor or actuator that resides in more than one location at a time (though that becomes a little more hazy when you have a light switch that controls lots of lights in different room, but in that case the switch and the bulbs would probably most appropriately be modeled as separate Equipment).

As awesome as having the UI built for you and having the nice hierarchy of Items in the model view is, and they are super, the power of the model comes when natural language processing gets introduced (which you can play with now if you install HABot.) Then you can type in (or say with speech to text) stuff like:

  • “Turn off all the lights on the ground floor.” You don’t need a special Group for all the lights. It knows which lights are on the Ground floor because it knows which equipment are lights, which Items on the equipment control the lights, and which equipment are on the ground floor based on the model.

  • “What’s the average temperature in the house?” (I’m not positive it can calculate the average on the fly but it would be theoretically possible).

  • “What’s playing on the Master Bedroom TV?”

But beyond that, the UIs that are generated automatically don’t need the extra Groups either. For example, if I want to see the temp in a certain room I can go to the Locations tab.

If I want to see all the sensor equipment I can look at the Equipment tab (note I’ve not properly tagged my sensors in the model yet so they just show up under Equipment instead of something more meaningful.

And if I want to see all the thermometers at once I can go to the Properties tab.

I didn’t create separate Groups for these different views. The software is able to figure out what goes where based on the model. So, unless there is some rule or you have sitemaps or something that needs a separate “all sensors” Group there is no need to create one. The model can figure out all the sensors without it. And if you do have a rule or sitemap that needs such a Group, there is no need to add that Group to the model.

3 Likes