--dry-run Tutorial - virtual/dummy Things

Hi,

I’d like to set up my first home automation and am looking at options.
I’ve unzipped openHAB 3 on my FreeBSD box and played a bit, but I am still struggling a bit (Java software engineer here).
I have also looked at FHEM and loved its intro tutorial (Erste Schritte in FHEM – FHEMWiki), that works with virtual/dummy devices (switch and lamp) which help very much in playing and learning.

I have looked for a similar tutorial for openHAB, but looks like there are no dummy Things, are there?

Thanks,
Jürgen

You could perhaps install the HTTP Binding, then use it to connect to a freely available API of your choosing to extract some information which you can use in openHAB? Maybe a weather API? Or one for COVID-19 cases?

There’s also https://demo.openhab.org that you can use to explore functionality (username: demo, password: demo to login to the settings).

Guess I’ll try MQTT and play with mosquitto_pub/sub, this should not need hardware.

Sure, if you have an MQTT Broker already setup then that’s another way of feeding a Thing!

The Nibe Heat Pump binding has some simulator Things which will output various random temperatures, with some outliers and the occasional failure. I sometimes use them for testing or demoing. Also the CoronaStats binding requires no configuration.

Well, the plan is now: mosquitto_pub -> MQTT Thing -> Exec Thing -> date >> /tmp/somefile

Exec, as there seems to be no Thing to write something into openHAB’s log.

Getting this to work results to be amazingly difficult.

The location refuses to create an Item, it sees no MQTT Channels, but there are two:

UID: mqtt:broker:01a93e4b55
label: Mosquitto@nico
thingTypeUID: mqtt:broker
configuration:
lwtQos: 0
publickeypin: true
keepAlive: 60
clientid: 04f2c832-1ea4-49c1-8d39-aa8d26a32df6
qos: 0
reconnectTime: 60000
host: nico
secure: false
certificatepin: true
lwtRetain: true
enableDiscovery: true
channels:

  • id: T1
    channelTypeUID: mqtt:publishTrigger
    label: T1
    description: “”
    configuration:
    stateTopic: openhab/t1
    separator: t1#42
  • id: t2
    channelTypeUID: mqtt:publishTrigger
    label: T2
    description: “”
    configuration:
    stateTopic: openhab/t2

Any idea, what’s wrong?

You can’t use the Bindings drivers from a Java program, can you? Writing a control for some z-Wave devices in Java seems to be a lot easier to me than clicking a thousand times in the gui, if only one had the Java drivers.