Hey everyone, I’m diving into the world of MQTT and OpenHAB, and I’m encountering some challenges that I thought I’d share and see if others have encountered similar issues.
I recently migrated from an OpenHABian setup on a Raspberry Pi 3 to Docker containers on a Pi 4. The setup includes OpenHAB, Node-Red, Influx, Grafana, Mosquitto, zigbee2mqtt, and zigbee2mqttGUI. Everything seemed to be running smoothly until I started getting this error related to MQTT messages:
2019-11-24 23:34:06.182 [thome.event.ItemStateEvent] - Bathroom1_Fan updated to OFF
…
java.lang.StringIndexOutOfBoundsException: String index out of range: 10
At first glance, it’s clear that there’s an issue with how MQTT messages are being processed, particularly with DateTimeType conversions. However, the logs aren’t giving me enough information to pinpoint the exact cause. I suspect it might be related to specific items or devices, but I’m not sure which ones are causing the problem.
I’ve tried narrowing it down by checking the state updates for each item and looking for patterns, but it’s been a bit of a guessing game. Has anyone else encountered similar issues with MQTT and DateTimeType? Any tips on how to isolate the problematic item or device would be greatly appreciated!
On a more positive note, I’ve found that integrating MQTT with Node-Red has been a breeze, and seeing data flow into Grafana is really satisfying. It’s just these occasional hiccups that are keeping me from fully enjoying the setup.
If anyone has experienced something similar or has some troubleshooting steps they’d be willing to share, I’d be grateful! Let’s keep the discussion going and help each other overcome these challenges. Happy coding and scripting!