Hey guys,
So I wanted to try the Shelly Binding after manually adding many Shelly things via MQTT. Unfortunately after adding the binding my openhab.log gets flushed with errors and is basically unusable (no access to Web UI).
There is a brief period during bootup which allows me to remove the binding in the Web UI and after a subsequent restart of the container everything is back to normal
I’m running OH 4.3.2 in a docker container and nginx as reverse proxy
I installed a fresh copy of OH4 in another container but with same settings (to rule out any docker or nginx configuration errors), this works just fine
Here is the log entry after adding the binding and before the flooding:
2025-02-05 08:32:13.278 [INFO ] [nternal.manager.ShellyManagerServlet] - Shelly Manager gestartet und erreichbar unter http(s)://172.21.0.4:8080/shelly/manager
2025-02-05 08:32:20.345 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:21.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:22.346 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:23.345 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:24.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:25.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:26.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:27.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:28.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:29.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:30.344 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:31.345 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:32.345 [ERROR] [.handler.AbstractScriptModuleHandler] - Script execution of rule with UID 'varta-1' failed: An error occurred during the script execution: Cannot invoke "org.openhab.core.model.rule.scoping.RulesClassCache.get(Object)" because "cache" is null in varta
2025-02-05 08:32:32.496 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusIPSlaveEndpoint [address=192.168.103.9, port=502] -- aborting request ModbusReadRequestBlueprint [slaveId=255, functionCode=READ_MULTIPLE_REGISTERS, start=1000, length=79, maxTries=3] [operation ID 767df9e8-81fe-4f4b-b1f5-9a82ce676cbb]
2025-02-05 08:32:33.470 [WARN ] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected: io client disconnect
2025-02-05 08:32:33.613 [INFO ] [.influxdb.InfluxDBPersistenceService] - InfluxDB persistence service stopped.
2025-02-05 08:32:37.512 [INFO ] [org.openhab.core.Activator ] - Starting openHAB 4.3.2 (Release Build)
2025-02-05 08:32:37.693 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2025-02-05 08:32:37.717 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '48.22690267490003,12.61110305786133'.
2025-02-05 08:32:37.718 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2025-02-05 08:32:37.718 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'SI'.
2025-02-05 08:32:37.755 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab.mydomain.net/rest/events's Observer
2025-02-05 08:32:37.786 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab.mydomain.net/rest/addons/services's Observer
2025-02-05 08:32:37.786 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab.mydomain.net/rest/services/org.openhab.i18n/config's Observer
2025-02-05 08:32:37.789 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab.mydomain.net/rest/addons/suggestions's Observer
2025-02-05 08:32:41.203 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'homematic.items'
2025-02-05 08:32:41.507 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'shelly.items'
2025-02-05 08:32:41.728 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sml2mqtt.items'
2025-02-05 08:32:41.750 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'zigbee.items'
2025-02-05 08:32:41.834 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'groups.items'
2025-02-05 08:32:42.022 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'dreame.items'
2025-02-05 08:32:42.083 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'gasmeter.items'
2025-02-05 08:32:42.106 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'utility.items'
2025-02-05 08:32:42.131 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'modbus.items'
2025-02-05 08:32:42.153 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'gps.items'
2025-02-05 08:32:42.172 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'weather.items'
2025-02-05 08:32:42.251 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heating.items'
2025-02-05 08:32:42.488 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mapdb.persist'
2025-02-05 08:32:42.539 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2025-02-05 08:32:42.580 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'jdbc.persist'
2025-02-05 08:32:42.888 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
2025-02-05 08:32:45.613 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2025-02-05 08:32:45.848 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'startup.rules'
2025-02-05 08:32:47.064 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'varta.rules'
2025-02-05 08:32:47.336 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'smartmeter.rules'
2025-02-05 08:32:47.869 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'shelly.rules'
2025-02-05 08:32:50.855 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'gasmeter.rules'
2025-02-05 08:32:51.198 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'homematic.rules'
2025-02-05 08:32:52.834 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heating.rules'
I’d rather avoid adding the error message inline, as one [ERROR] is about 1200 lines, but of course I can add the message if needed. Basically it gets down to this:
2025-02-05 08:32:53.247 [ERROR] [xtext.validation.CompositeEValidator] - Error executing EValidator
java.lang.UnsupportedOperationException: Missing type computation for expression type: QuantityLiteral / ExpressionTypeComputationState: ExpressionAwareStackedResolvedTypes: [
I already converted my items to QuantityTypes (or at least I think I did) and also converted the comparison, so in this case all my items look like this:
Number:Temperature HMCCRTDN_EG_Wintergarten_Heizung_Current_Temperature "EG Wintergarten Heizung IST-Temperatur [%.1f °C]" <temperature> (g_device_hm, g_alexa_eg_wg_thermo, g_sensor_temperature) { channel="homematic:HM-CC-RT-DN:fb607e5bc5:QEQ1460678:4#ACTUAL_TEMPERATURE", alexa="CurrentTemperature" }
and all my rules look like this:
if( HMCCRTDN_UG_Flur_Heizung_Target_Temperature.state > 15|°C ) {
or
if( HMCCRTDN_EG_Esszimmer_Heizung_Target_Temperature.state > 4.5|°C ) {
So it seems it has anything to do with QuantityTypes but I can’t figure out where the problem is and why the shelly binding is causing these errors
I hope anyone of you can help me solve this and if you need any more information, let me know
Thanks in advance
Edit: I forgot to add, disabling the affected rules still get’s me loads of errors
Edit2: For anyone interested, I uploaded the log file here: https://filebin.net/9h30xmh1pj7r9z1r