[Solved] Need HELP! OpenHab It does not receive or send data MQTT

How do downgrade my openhab?

This is my openhab debug! The status isn’t being updated in openHAB.

Last login: Tue Oct 11 20:16:56 on ttys000
LaSpencias-MacBook-Air:~ laspencia$ /opt/openhab/runtime/start_debug.sh ; exit;
Launching the openHAB runtime in debug mode

Listening for transport dt_socket at address: 8001
osgi> 20:20:33.296 [DEBUG] [.s.internal.SchedulerActivator:36 ] - Scheduler has been started.
20:20:33.342 [INFO ] [uartz.impl.StdSchedulerFactory:1175 ] - Using default implementation for ThreadExecutor
20:20:33.365 [INFO ] [rtz.core.SchedulerSignalerImpl:61 ] - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
20:20:33.366 [INFO ] [rg.quartz.core.QuartzScheduler:243 ] - Quartz Scheduler v.2.1.7 created.
20:20:33.368 [INFO ] [org.quartz.simpl.RAMJobStore :154 ] - RAMJobStore initialized.
20:20:33.370 [INFO ] [rg.quartz.core.QuartzScheduler:268 ] - Scheduler meta-data: Quartz Scheduler (v2.1.7) ‘openHAB-job-scheduler’ with instanceId ‘NON_CLUSTERED’
Scheduler class: ‘org.quartz.core.QuartzScheduler’ - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool ‘org.quartz.simpl.SimpleThreadPool’ - with 2 threads.
Using job-store ‘org.quartz.simpl.RAMJobStore’ - which does not support persistence. and is not clustered.

20:20:33.371 [INFO ] [uartz.impl.StdSchedulerFactory:1324 ] - Quartz scheduler ‘openHAB-job-scheduler’ initialized from specified file: ‘./etc/quartz.properties’
20:20:33.372 [INFO ] [uartz.impl.StdSchedulerFactory:1328 ] - Quartz scheduler version: 2.1.7
20:20:33.372 [INFO ] [rg.quartz.core.QuartzScheduler:534 ] - Scheduler openHAB-job-scheduler_$_NON_CLUSTERED started.
20:20:33.376 [DEBUG] [o.config.core.ConfigDispatcher:146 ] - Processing openHAB default configuration file ‘/opt/openhab/runtime/configurations/openhab_default.cfg’.
20:20:33.438 [DEBUG] [o.config.core.ConfigDispatcher:168 ] - Processing openHAB main configuration file ‘/opt/openhab/runtime/configurations/openhab.cfg’.
20:20:33.464 [DEBUG] [.o.core.internal.CoreActivator:93 ] - UUID file already exists at ‘/opt/openhab/runtime/webapps/static/uuid’ with content ‘2045263c-1f04-489e-9dfe-53693766ffb8’
20:20:33.466 [DEBUG] [.o.core.internal.CoreActivator:115 ] - Created file ‘/opt/openhab/runtime/webapps/static/version’ with content ‘1.8.3’
20:20:33.466 [INFO ] [.o.core.internal.CoreActivator:61 ] - openHAB runtime has been started (v1.8.3).
20:20:33.507 [DEBUG] [a.internal.AutoUpdateActivator:31 ] - AutoUpdate binding has been started.
20:20:35.013 [DEBUG] [.p.i.PersistenceModelActivator:23 ] - Registered ‘persistence’ configuration parser
20:20:35.041 [DEBUG] [.c.t.i.TransformationActivator:38 ] - Transformation Service has been started.
20:20:35.096 [DEBUG] [m.internal.MultimediaActivator:34 ] - Multimedia I/O bundle has been started.
20:20:35.123 [DEBUG] [.s.i.DiscoveryServiceActivator:27 ] - Discovery service has been started.
20:20:35.128 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl:93 ] - mDNS service has been started
20:20:35.147 [DEBUG] [.io.transport.mqtt.MqttService:123 ] - Starting MQTT Service

20:20:35.171 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl:53 ] - Service Discovery initialization completed.
20:20:35.298 [DEBUG] [.i.internal.ItemModelActivator:24 ] - Registered ‘item’ configuration parser
20:20:35.414 [DEBUG] [o.o.c.i.items.ItemRegistryImpl:137 ] - Item provider ‘GenericItemProvider’ has been added.
20:20:36.388 [DEBUG] [.o.m.s.i.SitemapModelActivator:23 ] - Registered ‘sitemap’ configuration parser
20:20:36.489 [DEBUG] [io.rest.internal.RESTActivator:33 ] - REST API has been started.
20:20:36.550 [INFO ] [org.atmosphere.util.IOUtils :370 ] - META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
20:20:36.573 [INFO ] [sphere.cpr.AtmosphereFramework:2601 ] - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
20:20:36.575 [INFO ] [cpr.DefaultAnnotationProcessor:138 ] - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
20:20:36.586 [WARN ] [cpr.DefaultAnnotationProcessor:178 ] - Unable to detect annotations. Application may fail to deploy.
20:20:36.612 [INFO ] [sphere.cpr.AtmosphereFramework:1891 ] - Auto detecting atmosphere handlers /WEB-INF/classes/
20:20:36.628 [INFO ] [sphere.cpr.AtmosphereFramework:639 ] - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path /* and Broadcaster Class org.atmosphere.jersey.JerseyBroadcaster
20:20:36.628 [INFO ] [sphere.cpr.AtmosphereFramework:1945 ] - Auto detecting WebSocketHandler in /WEB-INF/classes/
20:20:36.629 [INFO ] [sphere.cpr.AtmosphereFramework:1602 ] - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
20:20:36.657 [INFO ] [.a.h.ReflectorServletProcessor:103 ] - Installing Servlet com.sun.jersey.spi.container.servlet.ServletContainer
20:20:36.763 [INFO ] [c.s.j.s.i.a.WebApplicationImpl:815 ] - Initiating Jersey application, version ‘Jersey: 1.18.1 02/19/2014 03:28 AM’
20:20:36.766 [INFO ] [c.s.j.s.i.a.WebApplicationImpl:826 ] - Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration:
class org.atmosphere.jersey.AtmosphereResourceConfigurator
20:20:36.818 [INFO ] [j.s.i.a.DeferredResourceConfig:101 ] - Instantiated the Application class org.openhab.io.rest.RESTApplication
20:20:37.569 [INFO ] [sphere.cpr.AtmosphereFramework:2435 ] - AtmosphereInterceptor CORS Interceptor Support will always be executed first
20:20:37.572 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT
20:20:37.573 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Default Response’s Headers Interceptor with priority AFTER_DEFAULT
20:20:37.575 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT
20:20:37.576 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT
20:20:37.577 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT
20:20:37.580 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT
20:20:37.581 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT
20:20:37.587 [INFO ] [sphere.cpr.AtmosphereFramework:935 ] - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
20:20:37.589 [WARN ] [sphere.cpr.AtmosphereFramework:941 ] - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache
20:20:37.589 [INFO ] [sphere.cpr.AtmosphereFramework:949 ] - Default Broadcaster Class: org.atmosphere.jersey.JerseyBroadcaster
20:20:37.590 [INFO ] [sphere.cpr.AtmosphereFramework:950 ] - Broadcaster Polling Wait Time 100
20:20:37.590 [INFO ] [sphere.cpr.AtmosphereFramework:951 ] - Shared ExecutorService supported: true
20:20:37.593 [INFO ] [sphere.cpr.AtmosphereFramework:958 ] - Messaging Thread Pool Size: 10
20:20:37.594 [INFO ] [sphere.cpr.AtmosphereFramework:968 ] - Async I/O Thread Pool Size: 10
20:20:37.595 [INFO ] [sphere.cpr.AtmosphereFramework:979 ] - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
20:20:37.595 [INFO ] [sphere.cpr.AtmosphereFramework:980 ] - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
20:20:37.595 [INFO ] [sphere.cpr.AtmosphereFramework:990 ] - Invoke AtmosphereInterceptor on WebSocket message true
20:20:37.596 [INFO ] [sphere.cpr.AtmosphereFramework:991 ] - HttpSession supported: false
20:20:37.597 [INFO ] [sphere.cpr.AtmosphereFramework:993 ] - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
20:20:37.597 [INFO ] [sphere.cpr.AtmosphereFramework:994 ] - Atmosphere is using async support: org.atmosphere.container.JettyAsyncSupportWithWebSocket running under container: jetty/8.1.3.v20120522 with WebSocket enabled.
20:20:37.599 [INFO ] [sphere.cpr.AtmosphereFramework:996 ] - Atmosphere Framework 2.2.5 started.
20:20:37.599 [INFO ] [sphere.cpr.AtmosphereFramework:998 ] -

For Atmosphere Framework Commercial Support, visit 
http://www.async-io.org/ or send an email to support@async-io.org

20:20:37.603 [INFO ] [penhab.io.rest.RESTApplication:144 ] - Started REST API at /rest
20:20:37.605 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:66 ] - Registering new service _openhab-server._tcp.local. at port 8080
20:20:42.914 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:66 ] - Registering new service _openhab-server-ssl._tcp.local. at port 8443
20:20:44.336 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.sitemap’
20:20:44.563 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.script’
20:20:44.660 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘db4o.persist’
20:20:44.678 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘exec.persist’
20:20:44.684 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘logging.persist’
20:20:44.689 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘rrd4j.persist’
20:20:44.720 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.items’
20:20:44.735 [DEBUG] [i.internal.GenericItemProvider:154 ] - Processing binding configs for items from model ‘demo.items’
20:20:44.737 [DEBUG] [i.internal.GenericItemProvider:133 ] - Read items from model ‘demo.items’
20:20:45.577 [INFO ] [.o.u.w.i.servlet.WebAppServlet:80 ] - Started Classic UI at /classicui/openhab.app
20:20:46.003 [DEBUG] [.r.internal.RuleModelActivator:42 ] - Registered ‘rules’ configuration parser
20:20:46.019 [DEBUG] [m.r.internal.engine.RuleEngine:77 ] - Started rule engine
20:20:50.096 [DEBUG] [.a.mqtt.internal.MqttActivator:34 ] - Mqtt action has been started.
20:20:50.101 [DEBUG] [.o.b.ntp.internal.NtpActivator:31 ] - NTP binding has been started.
20:20:50.114 [INFO ] [.service.AbstractActiveService:169 ] - NTP Refresh Service has been started
20:20:50.115 [DEBUG] [inding.ntp.internal.NtpBinding:78 ] - There is no existing NTP binding configuration => refresh cycle aborted!
20:20:50.117 [DEBUG] [xecPersistenceServiceActivator:33 ] - Exec persistence bundle has been started.
20:20:50.126 [DEBUG] [.p.internal.PersistenceManager:146 ] - Initializing exec persistence service.
20:20:50.151 [DEBUG] [.p.internal.PersistenceManager:428 ] - Scheduled strategy exec.everyMinute with cron expression 0 * * * * ?
20:20:50.167 [DEBUG] [.rrd4j.internal.RRD4jActivator:31 ] - RRD4j persistence bundle has been started.
20:20:50.180 [DEBUG] [.p.rrd4j.internal.RRD4jService:395 ] - Unknown property name : org.openhab.persistence.rrd4j
20:20:50.180 [DEBUG] [.p.rrd4j.internal.RRD4jService:364 ] - config ‘objectClass’ should have the format ‘name.configkey’
20:20:50.181 [DEBUG] [.p.rrd4j.internal.RRD4jService:405 ] - Created default_numeric = GAUGE heartbeat = 60 min/max = NaN/NaN step = 60 6 archives(s) = [ AVERAGE xff = 0.5 steps = 1 rows = 480 AVERAGE xff = 0.5 steps = 4 rows = 360 AVERAGE xff = 0.5 steps = 14 rows = 644 AVERAGE xff = 0.5 steps = 60 rows = 720 AVERAGE xff = 0.5 steps = 720 rows = 730 AVERAGE xff = 0.5 steps = 10080 rows = 520] 0 items(s) = []
20:20:50.182 [DEBUG] [.p.rrd4j.internal.RRD4jService:405 ] - Created default_other = GAUGE heartbeat = 3600 min/max = NaN/NaN step = 1 6 archives(s) = [ MAX xff = 0.999 steps = 1 rows = 3600 MAX xff = 0.999 steps = 10 rows = 1440 MAX xff = 0.999 steps = 60 rows = 1440 MAX xff = 0.999 steps = 900 rows = 2880 MAX xff = 0.999 steps = 21600 rows = 1460 MAX xff = 0.999 steps = 86400 rows = 3650] 0 items(s) = []
20:20:50.182 [INFO ] [.p.rrd4j.internal.RRD4jService:407 ] - Removing invalid defintion component = null heartbeat = 0 min/max = 0.0/0.0 step = 0 0 archives(s) = [] 0 items(s) = []
20:20:50.185 [DEBUG] [.p.internal.PersistenceManager:146 ] - Initializing rrd4j persistence service.
20:20:50.211 [DEBUG] [.p.internal.PersistenceManager:315 ] - Item ‘DemoSwitch’ does not exist.
20:20:50.212 [DEBUG] [.p.internal.PersistenceManager:315 ] - Item ‘NoOfLights’ does not exist.
20:20:50.213 [DEBUG] [.p.internal.PersistenceManager:315 ] - Item ‘Window_GF_Toilet’ does not exist.
20:20:50.213 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item group ‘Heating’ does not exist.
20:20:50.214 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item group ‘Temperature’ does not exist.
20:20:50.215 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item group ‘Weather_Chart’ does not exist.
20:20:50.217 [DEBUG] [.p.internal.PersistenceManager:428 ] - Scheduled strategy rrd4j.everyMinute with cron expression 0 * * * * ?
20:20:50.222 [DEBUG] [p.r.i.charts.RRD4jChartServlet:118 ] - Starting up rrd chart servlet at /rrdchart.png
20:20:50.224 [DEBUG] [.i.LoggingPersistenceActivator:31 ] - Logging persistence bundle has been started.
20:20:50.231 [DEBUG] [.p.internal.PersistenceManager:146 ] - Initializing logging persistence service.
20:20:50.234 [DEBUG] [.b.http.internal.HttpActivator:34 ] - HTTP binding has been started.
20:20:50.246 [INFO ] [.service.AbstractActiveService:169 ] - HTTP Refresh Service has been started
20:20:50.248 [DEBUG] [.b.mqtt.internal.MqttActivator:34 ] - MQTT binding has been started.
20:20:50.262 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘itm_garage_dist (Type=NumberItem, State=Uninitialized)’ with ‘MqttGenericBindingProvider’ reader.
20:20:50.264 [DEBUG] [b.mqtt.internal.MqttItemConfig:72 ] - Loaded MQTT config for item ‘itm_garage_dist’ : 1 subscribers, 0 publishers
20:20:50.271 [DEBUG] [m.internal.MqttEventBusBinding:68 ] - MQTT: Activating event bus binding.
20:20:54.869 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.rules’

So I recently just upgraded from OH1.7 to OH1.8.3 and had this same issue where mqtt binding have stopped working. I attempted the solution suggested (ensureing that both the mqtt bindings are installed, as i did not have them both installed) and that did not work. I removed the 1.8.3 binding jar file, I have just copied the 1.7 binding jar file into the 1.8 installation, gave it a reboot and things are working again! Hope this can help someone else too

@mrwhale: Would you have success with the latest MQTT binding JAR? If not, what exactly isn’t working?

I’m not too sure, I will have to try the latest binding and test. I went from a manual install 1.7 to apt-get install of 1.8.3, so using the version of the binding included in the repo. Whats not working is what is described here, after upgrade and copy over of items it seems that OH isn’t sending out messages to the mqtt queue. I’ve manually subscribed to the queue and that’s fine, also manually published something to the queue and that came through fine. I’ll turn on debug for the mqtt binding and drop the 1.8.3 binding back in to see if it gives me an error in where it’s going wrong. I forgot to do that before I downgraded

To try the 1.9.0-SNAPSHOT of the MQTT binding under openHAB 1.8.3, you could:

cd  /usr/share/openhab/addons/
sudo mv org.openhab.binding.mqtt-1.8.3.jar ~
sudo wget https://openhab.ci.cloudbees.com/job/openHAB1-Addons/lastSuccessfulBuild/artifact/bundles/binding/org.openhab.binding.mqtt/target/org.openhab.binding.mqtt-1.9.0-SNAPSHOT.jar

Regardless of which version of the binding you are using, to turn on DEBUG logging under openHAB 1.8.3, add this line to /etc/openhab/logback.xml:

<logger name="org.openhab.binding.mqtt" level="DEBUG"/>