OH 4.2.0.M3. Shelly 3EM (EM3) not adopting

Hi, I want to and a Shelly 3EM but can’t adopt it. I get the following error message

Status: 
OFFLINE
COMMUNICATION_ERROR
Unable to connect to device - NoRouteToHostException: No route to host

What is also different than with the other Shelly devices is that I had to add it manually.
Any idea how to solve this?

The error message tells you. You have a connectivity problem, openHAB cannot reach your Shelly’s IP address.
And without giving detailed openhab.log data, noone will be able to help you or answer your question as to “what is different”.
Enable debugging on debug level on the shelly binding to get meaningful output.

I tried to only log the info from the shellyem3 with

log:set DEBUG  org.openhab.binding.shelly.device.shellyem3

but didn’t work. Then I set debug for the whole Shelly binding and extracted only the relevant lines (see below)

2024-08-20 19:55:45.295 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Status update triggered thing initialization
2024-08-20 19:55:45.295 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Status update triggered thing initialization
2024-08-20 19:55:45.296 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true
2024-08-20 19:55:45.296 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true
2024-08-20 19:55:45.296 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyRelayHandler tried updating the thing status although the handler was already disposed.

2024-08-20 19:56:18.499 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Stopping Thing
2024-08-20 19:56:18.500 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Shutting down
2024-08-20 19:56:18.500 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Shelly statusJob stopped
2024-08-20 19:56:18.501 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Shutting down

2024-08-20 19:56:24.785 [DEBUG] [shelly.internal.ShellyHandlerFactory] - Shelly warmtepomp: Create new thing of type shelly:shellyem3 using ShellyRelayHandler
2024-08-20 19:56:24.800 [DEBUG] [shelly.internal.ShellyHandlerFactory] - Thing handler for uid shelly:shellyem3:32a72b3d5f added, total things = 36

2024-08-20 19:56:26.806 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Using default userId admin from binding config2024-08-20 19:56:26.807 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Using default password from bindingConfig (userId=admin)
2024-08-20 19:56:26.826 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Config: Device address=192.168.100.49, HTTP user/password=admin/***, update interval=60
Events: Button: false, Switch (on/off): false, Push: false, Roller: trueSensor: true, CoIoT: true
Blu Gateway=false, Range Extender: true
2024-08-20 19:56:26.826 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true

2024-08-20 19:56:29.903 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Update status job started, interval=20*3=60sec.
2024-08-20 19:56:48.376 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true

2024-08-20 19:56:48.376 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyRelayHandler tried updating the thing status although the handler was already disposed.2024-08-20 19:57:28.907 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Status update triggered thing initialization
2024-08-20 19:57:28.907 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true
2024-08-20 19:57:31.983 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Enabling channel cache (20 updates / 60s)

2024-08-20 19:57:32.309 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shelly1pm-98cdac1f42a5: Channel device#heartBeat updated with 2024-08-20T19:57:32.000+0200 (type class org.openhab.core.library.types.D
2024-08-20 19:58:31.987 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true

2024-08-20 19:59:57.778 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Status update triggered thing initialization
2024-08-20 19:59:57.778 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyem3-32a72b3d5f: Start initializing for thing Shelly warmtepomp, type shellyem3, IP address 192.168.100.49, Gen2: true, CoIoT: true
2024-08-20 19:59:57.779 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler ShellyRelayHandler tried updating the thing status although the handler was already disposed.
2024-08-20 19:59:57.779 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - Shelly warmtepomp: Disconnect Rpc Socket on initialize

I hope this helps.

I made a mistake. I changed the IP address that is why I get the failure above. It is still not working but have to make the log again. I will do this tomorrow

Setting the advanced option Allow Cross-Origin Resource Sharing was solving the issue.