Octoprint with HomeAssistant plugin discovered but problematic

Hi all

I am running the latest OH (3.0) on a RPi4. Step-by-step I am enjoying the ride, and sometime even the bumps :slightly_smiling_face:

I have a 3D printer I want to include in OH. The printer runs Octroprint

and runs additional plugins

Everything seems to work, once installed these plugins OH inbox is populated with a new Thing I can add it.

Then the issue: afted being added, the thing is going repeatedly from ONLINE to OFFLINE, till OH “gives up” and put the Thing offline. Disabling/re-enablig it will set the system for another on/offline loop.

Below relevant configuration and logs. My guess is that this line below is the problem

2021-02-14 21:46:49.422 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'false' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.false

Where can I start my debugging?

Cheers
Max

Configuration

UID: mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb:Localhost:ef27c28b6ece4e10887113323bf30fcb
label: Ender 3D Pro
thingTypeUID: mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb
configuration:
  topics:
    - sensor/ef27c28b6ece4e10887113323bf30fcb_SLICING_P
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_F
    - sensor/ef27c28b6ece4e10887113323bf30fcb_SOC
    - binary_sensor/ef27c28b6ece4e10887113323bf30fcb_CONNECTED
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_E
    - switch/ef27c28b6ece4e10887113323bf30fcb_PAUSE
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_ETA
    - sensor/ef27c28b6ece4e10887113323bf30fcb_TOOL0
    - switch/ef27c28b6ece4e10887113323bf30fcb_STOP
    - binary_sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_T
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_S
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_Z
    - sensor/ef27c28b6ece4e10887113323bf30fcb_SLICING_F
    - sensor/ef27c28b6ece4e10887113323bf30fcb_BED
    - switch/ef27c28b6ece4e10887113323bf30fcb_SHUTDOWN
    - sensor/ef27c28b6ece4e10887113323bf30fcb_TOOL0_TARGET
    - sensor/ef27c28b6ece4e10887113323bf30fcb_EVENT
    - switch/ef27c28b6ece4e10887113323bf30fcb_CANCEL
    - sensor/ef27c28b6ece4e10887113323bf30fcb_PRINTING_P
    - sensor/ef27c28b6ece4e10887113323bf30fcb_BED_TARGET
  basetopic: homeassistant
bridgeUID: mqtt:systemBroker:Localhost

Log file, when I re-enable the Thing

2021-02-14 21:46:45.216 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'false' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.false
2021-02-14 21:46:49.422 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'false' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.false
2021-02-14 21:46:49.401 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb:Localhost:ef27c28b6ece4e10887113323bf30fcb' changed from OFFLINE to UNKNOWN
2021-02-14 21:46:49.427 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb:Localhost:ef27c28b6ece4e10887113323bf30fcb' changed from UNKNOWN to ONLINE
2021-02-14 21:46:51.495 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb:Localhost:ef27c28b6ece4e10887113323bf30fcb' changed from ONLINE to OFFLINE

I don’t have any experience using HA or Homie with MQTT. The error specifically means that you have a Switch Channel (probably one of those binary_sensor topics) that is reporting true and false as the message and that needs to be translated to ON and OFF. If there is no way to add a transformation to the HA MQTT Thing to do that transformation for you, you should file an issue on the binding.

Either that Home Assistant MQTT plugin on the Octoprint is not following the standard or openHAB’s binding is not following the standard.

Another place to look is in the Thing’s settings. For a Generic MQTT Thing you can configure an LWT topic to subscribe to and you can define the expected ON and OFF messages there. Perhaps the HA MQTT Thing has a similar setting.

Thanks for your first hints, @rlkoshak !

After removing the Think and setting a new Node ID in the printer plugin, I captured the log below. I have also put below the relevant MQTT messages, I could observe that switches & binary sensors have got True/False for the pl_on and pl_off tags. Tasmota devices have ON & OFF, respectivetely. Is this perhaps a inconsistency confusing OH?

Thanks
Max

==> /var/log/openhab/openhab.log <==
2021-02-16 21:14:23.141 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2' to inbox.

==> /var/log/openhab/events.log <==
2021-02-16 21:14:23.142 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2' has been added.
2021-02-16 21:14:43.665 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2' has been removed.
2021-02-16 21:14:43.673 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2' changed from UNINITIALIZED to INITIALIZING
2021-02-16 21:14:43.693 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2' changed from INITIALIZING to UNKNOWN
2021-02-16 21:14:43.753 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2' changed from UNKNOWN to OFFLINE

==> /var/log/openhab/openhab.log <==
2021-02-16 21:14:45.796 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'false' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.false
2021-02-16 21:14:45.805 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler@bdc456': java.util.ConcurrentModificationException
java.util.ConcurrentModificationException: java.util.ConcurrentModificationException

	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600) ~[?:?]
	at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678) ~[?:?]
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[?:?]
	at org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler.stop(HomeAssistantThingHandler.java:217) ~[?:?]
	at org.openhab.binding.mqtt.generic.AbstractMQTTThingHandler.dispose(AbstractMQTTThingHandler.java:253) ~[?:?]
	at org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler.dispose(HomeAssistantThingHandler.java:175) ~[?:?]
	at org.openhab.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:150) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor148.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.util.ConcurrentModificationException
	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1680) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952) ~[?:?]
	at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926) ~[?:?]
	at java.util.stream.AbstractTask.compute(AbstractTask.java:327) ~[?:?]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?]

2021-02-16 21:14:45.857 [WARN ] [.transport.mqtt.MqttBrokerConnection] - Failed subscribing to topic octoPrint/progress/printing
java.util.NoSuchElementException: null
	at com.hivemq.client.rx.FlowableWithSingle$SingleFutureSubscriber.onComplete(FlowableWithSingle.java:385) [bundleFile:?]
	at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber.onComplete(FlowableWithSingleCombine.java:183) [bundleFile:?]
	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated(FlowableObserveOn.java:199) [bundleFile:?]
	at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync(FlowableObserveOn.java:641) [bundleFile:?]
	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176) [bundleFile:?]
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) [bundleFile:?]
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

2021-02-16 21:14:45.861 [WARN ] [al.handler.HomeAssistantThingHandler] - Failed to start component mqtt:homeassistant_ef27c28b6ece4e10887113323bf30fcb2:Localhost:ef27c28b6ece4e10887113323bf30fcb2:ef27c28b6ece4e10887113323bf30fcb2_5FPRINTING_5FF
java.util.concurrent.CompletionException: java.util.NoSuchElementException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:777) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) [?:?]
	at org.openhab.core.io.transport.mqtt.MqttBrokerConnection.lambda$1(MqttBrokerConnection.java:513) [bundleFile:?]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) [?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837) [?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) [?:?]
	at com.hivemq.client.internal.mqtt.mqtt3.Mqtt3AsyncClientView.lambda$handleSubAck$0(Mqtt3AsyncClientView.java:64) [bundleFile:?]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859) [?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837) [?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) [?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) [?:?]
	at com.hivemq.client.rx.FlowableWithSingle$SingleFutureSubscriber.onComplete(FlowableWithSingle.java:385) [bundleFile:?]
	at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber.onComplete(FlowableWithSingleCombine.java:183) [bundleFile:?]
	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated(FlowableObserveOn.java:199) [bundleFile:?]
	at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync(FlowableObserveOn.java:641) [bundleFile:?]
	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176) [bundleFile:?]
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) [bundleFile:?]
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.openhab.core.io.transport.mqtt.MqttException
	... 22 more
Caused by: java.util.NoSuchElementException
	... 12 more

2021-02-16 21:14:45.899 [WARN ] [.incoming.MqttIncomingPublishService] - No publish flow registered for MqttStatefulPublish{stateless=MqttPublish{topic=octoPrint/progress/printing, payload=94byte, qos=AT_MOST_ONCE, retain=true}, packetIdentifier=-1, dup=false, topicAlias=0, subscriptionIdentifiers=[]}.

MQTT messages


homeassistant/switch/ef27c28b6ece4e10887113323bf30fcb2_STOP/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Emergency Stop", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_STOP", "cmd_t": "~hassControl/stop", "stat_t": "~hassControl/stop", "pl_off": "False", "pl_on": "True", "val_tpl": "{{False}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:alert-octagon"}
homeassistant/switch/ef27c28b6ece4e10887113323bf30fcb2_CANCEL/config {"avty_t": "~hass/is_printing", "pl_avail": "True", "pl_not_avail": "False", "~": "octoPrint/", "name": "3D Printer Cancel Print", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_CANCEL", "cmd_t": "~hassControl/cancel", "stat_t": "~hassControl/cancel", "pl_off": "False", "pl_on": "True", "val_tpl": "{{False}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:cancel"}
homeassistant/switch/ef27c28b6ece4e10887113323bf30fcb2_PAUSE/config {"avty_t": "~hass/is_printing", "pl_avail": "True", "pl_not_avail": "False", "~": "octoPrint/", "name": "3D Printer Pause Print", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PAUSE", "cmd_t": "~hassControl/pause", "stat_t": "~hass/is_paused", "pl_off": "False", "pl_on": "True", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:pause"}
homeassistant/switch/ef27c28b6ece4e10887113323bf30fcb2_SHUTDOWN/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Shutdown System", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_SHUTDOWN", "cmd_t": "~hassControl/shutdown", "stat_t": "~hassControl/shutdown", "pl_off": "False", "pl_on": "True", "val_tpl": "{{False}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:power"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_EVENT/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Last Event", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_EVENT", "stat_t": "~event/+", "val_tpl": "{{value_json._event}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_S/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Print Status", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_S", "stat_t": "~hass/printing", "json_attr_t": "~hass/printing", "json_attr_tpl": "{{value_json.state|tojson}}", "val_tpl": "{{value_json.state.text}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_P/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Print Progress", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_P", "json_attr_t": "~hass/printing", "json_attr_tpl": "{{value_json.progress|tojson}}", "stat_t": "~progress/printing", "unit_of_meas": "%", "val_tpl": "{{value_json.progress|float|default(0,true)}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_F/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Print File", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_F", "stat_t": "~progress/printing", "val_tpl": "{{value_json.path}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:file"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_T/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Print Time", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_T", "stat_t": "~hass/printing", "val_tpl": "{{value_json.progress.printTimeFormatted}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:clock-start"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_E/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Print Time Left", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_E", "stat_t": "~hass/printing", "val_tpl": "{{value_json.progress.printTimeLeftFormatted}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:clock-end"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_ETA/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Print Estimated Time", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_ETA", "stat_t": "~hass/printing", "json_attr_t": "~hass/printing", "json_attr_tpl": "{{value_json.job|tojson}}", "val_tpl": "{{value_json.job.estimatedPrintTimeFormatted}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING_Z/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Current Z", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING_Z", "stat_t": "~hass/printing", "unit_of_meas": "mm", "val_tpl": "{{value_json.currentZ|float}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:axis-z-arrow"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_SLICING_P/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Slicing Progress", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_SLICING_P", "stat_t": "~progress/slicing", "unit_of_meas": "%", "val_tpl": "{{value_json.progress|float|default(0,true)}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_SLICING_F/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Slicing File", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_SLICING_F", "stat_t": "~progress/slicing", "val_tpl": "{{value_json.source_path}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "ic": "mdi:file"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_TOOL0/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Tool 0 Temperature", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_TOOL0", "stat_t": "~temperature/tool0", "unit_of_meas": "\u00b0C", "val_tpl": "{{value_json.actual|float}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "dev_cla": "temperature", "ic": "mdi:printer-3d-nozzle"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_TOOL0_TARGET/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Tool 0 Target", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_TOOL0_TARGET", "stat_t": "~temperature/tool0", "unit_of_meas": "\u00b0C", "val_tpl": "{{value_json.target|float}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "dev_cla": "temperature", "ic": "mdi:printer-3d-nozzle"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_BED/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Bed Temperature", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_BED", "stat_t": "~temperature/bed", "unit_of_meas": "\u00b0C", "val_tpl": "{{value_json.actual|float}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "dev_cla": "temperature", "ic": "mdi:radiator"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_BED_TARGET/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Bed Target", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_BED_TARGET", "stat_t": "~temperature/bed", "unit_of_meas": "\u00b0C", "val_tpl": "{{value_json.target|float}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "dev_cla": "temperature", "ic": "mdi:radiator"}
homeassistant/sensor/ef27c28b6ece4e10887113323bf30fcb2_SOC/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer SoC Temperature", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_SOC", "stat_t": "~temperature/soc", "unit_of_meas": "\u00b0C", "val_tpl": "{{value_json.temperature|float|round(1)}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}, "dev_cla": "temperature", "ic": "mdi:radiator"}
homeassistant/binary_sensor/ef27c28b6ece4e10887113323bf30fcb2_CONNECTED/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Connected", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_CONNECTED", "stat_t": "~hass/Connected", "pl_on": "Connected", "pl_off": "Disconnected", "dev_cla": "connectivity", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}
homeassistant/binary_sensor/ef27c28b6ece4e10887113323bf30fcb2_PRINTING/config {"avty_t": "~mqtt", "pl_avail": "connected", "pl_not_avail": "disconnected", "~": "octoPrint/", "name": "3D Printer Printing", "uniq_id": "ef27c28b6ece4e10887113323bf30fcb2_PRINTING", "stat_t": "~hass/printing", "pl_on": "True", "pl_off": "False", "val_tpl": "{{value_json.state.flags.printing}}", "device": {"ids": "ef27c28b6ece4e10887113323bf30fcb2", "name": "3D Printer", "mf": "Creality", "mdl": "Ender 3 Pro", "sw": "HomeAssistant Discovery for OctoPrint 3.2.1"}}



This is exactly the problem. Switch Items require ON and OFF (case matters). Anything else needs to be transformed.

If sending True/False is within the standard for Home Assistant MQTT then the openHAB MQTT add-on is broken and needs to be fixed to support it. If it isn’t then the Octoprint MQTT add-on is broken and needs to be fixed.

Something is out of spec but I don’t know the standard so can’t tell you which.

As a work around you can skip trying to discover the device and instead use a Generic MQTT Thing. That will give you a chance to define a map from True to ON and False to OFF.