Hi, I am trying to get the MQTT binding to work with openHAB2.5.0 Build 1568, on windows
I have turned off all persistence in my openHAB2 configuration. I just want to get MQTT working!!
Any assistance would be very much appreciated.
I have read through this URL (https://www.openhab.org/blog/2018-12-16-mqtt-arrives-in-the-modern-openhab-2-x-architecture.html) and other forum topics but I am still confused on some aspects of getting this to work.
Here is my problem, I have 18 devices I want to talk to via MQTT topics.
I want to install the MQTT embedded broker “moquette” to be the MQTT broker on my local system.
I, also, want to configure openHAB2.5.0 via configuration files but it appears that the system will not read these config files and automatically connect up the MQTT channels to the MQTT embedded broker.
So I believe my setup must be wrong. That is why I am here asking for assistance.
Question 1, if I am using the embedded moquette broker do I need a moquette.cfg file defined in c:/openHAB2/conf/services??
Here is how I presently have my moquette.cfg file:
service.pid="org.eclipse.smarthome.mqttembeddedbroker"
name="moquette"
username=""
password=""
clientID=""
host="192.168.0.12"
secure=false
From c:/openHAB2/conf/services here is my addons.cfg file:
# The installation package of this openHAB instance
# Note: This is only regarded at the VERY FIRST START of openHAB
# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal"
# as otherwise your definition might be in conflict with what the installation package defines.
#
# Optional. If not set, the dashboard (https://<yourserver>:8080/) will ask you to choose a package.
#
# Valid options:
# - minimal : Installation only with dashboard, but no UIs or other add-ons. Use this for custom setups.
# - simple : Setup for using openHAB purely through UIs - you need to expect MANY constraints in functionality!
# - standard : Default setup for normal users, best for textual setup
# - expert : Setup for expert users, especially for people migrating from openHAB 1.x
# - demo : A demo setup which includes UIs, a few bindings, config files etc.
#
# See https://www.openhab.org/docs/configuration/packages.html for a detailed explanation of these packages.
#
package = standard
# Access Remote Add-on Repository
# Defines whether the remote openHAB add-on repository should be used for browsing and installing add-ons.
# This not only makes latest snapshots of add-ons available, it is also required for the installation of
# any legacy 1.x add-on. (default is true)
#
remote = true
# Include legacy 1.x bindings. If set to true, it also allows the installation of 1.x bindings for which there is
# already a 2.x version available (requires remote repo access, see above). (default is false)
#
legacy = true
# A comma-separated list of bindings to install (e.g. "binding = sonos,knx,zwave")
binding = wemo,ntp,hue,expire1,wifiled,mqtt
# A comma-separated list of UIs to install (e.g. "ui = basic,paper")
ui = dashboard,habpanel,basic,classic,habmin,paper
# A comma-separated list of persistence services to install (e.g. "persistence = rrd4j,jpa")
#persistence = jdbc-mysql
# A comma-separated list of actions to install (e.g. "action = mail,pushover")
#action =
# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath")
#transformation =
# A comma-separated list of voice services to install (e.g. "voice = marytts,freetts")
#voice =
# A comma-separated list of miscellaneous services to install (e.g. "misc = myopenhab")
#misc = openhabcloud
and my runtime.cfg file:
##################### LOCALE ####################
# The default language that should be used. If not specified, the system default locale is used.
# The ISO 639 alpha-2 or alpha-3 language code (if there is no alpha-2 one).
# Example: "en" (English), "de" (German), "ja" (Japanese), "kok" (Konkani)
#
org.eclipse.smarthome.core.localeprovider:language=en
# The region that should be used.
# ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code.
# Example: "US" (United States), "DE" (Germany), "FR" (France), "029" (Caribbean)
#
org.eclipse.smarthome.core.localeprovider:region=US
################ PERSISTENCE ####################
# The persistence service to use if no other is specified.
#
#org.eclipse.smarthome.persistence:default=jdbc
################### AUDIO #######################
# This parameter defines the default audio source to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.audio:defaultSource=
# This parameter defines the default audio sink to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.audio:defaultSink=
##################### VOICE ####################
# This parameter defines the default text-to-speech service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultTTS=
# This parameter defines the default speech-to-text service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultSTT=
# The default voice to use if no specific TTS service or voice is specified.
#
#org.eclipse.smarthome.voice:defaultVoice=
# The default human language interpreter to use if no other is specified.
#
#org.eclipse.smarthome.voice:defaultHLI=
################ MISCELLANOUS ####################
# The karaf sshHost parameter configures the bind address for the ssh login to karaf.
# Default is 127.0.0.1 (localhost), so it is only possible to login from the local machine.
#
# Setting this to the address of another network interfaces will allow login from this network.
# Setting this to 0.0.0.0 will allow login from all network interfaces.
#
# !!! Security warning !!!
# Remember to change default login/password, if you allow external login.
# See https://www.openhab.org/docs/administration/console.html for details.
#
org.apache.karaf.shell:sshHost = 0.0.0.0
# Setting this to true will automatically approve all inbox entries and create Things for them,
# so that they are immediately available in the system (default is false)
#
org.eclipse.smarthome.inbox:autoApprove=false
# This setting allows to switch between a "simple" and an "advanced" mode for item management.
# In simple mode (autoLinks=true), links and their according items are automatically created for new Things.
# In advanced mode (autoLinks=false), the user has the full control about which items channels are linked to.
# Existing links will remain untouched. (default is true)
#
org.eclipse.smarthome.links:autoLinks=false
Now to the file that defines the connection between the Moquette Embedded broker and the Generic MQTT thing and its corresponding MQTT channels:
My mqtt.things file located on my shared google drive:
Here is my mqtt.items file, also located on my shared google drive:
Here is my mqtt.rules file, also located on my shared google drive:
Can some help me figure out what I am doing wrong, I would hate to have to type in all these again manually through the paper UI.