I’ve been working on integrating my Shelly Plus 2PM roller shutter into OpenHAB 4.0.3, and I wanted to share my journey in case it helps others facing similar issues. While most of my Shelly devices (like the dimmers and switches) are discovering without a hitch, the Plus 2PM has been a bit stubborn. Here’s what I’ve learned so far:
The Setup:
- Running OpenHAB on a Raspberry Pi 4B
- Fresh install of OpenHAB 4.0.3
- Shelly binding installed via the UI
- Plus 2PM firmware version 1.0.3 in roller shutter mode
- Device is on the same subnet and broadcast domain as my other Shelly devices
The Issue:
Despite being able to ping and connect to the device, the Shelly binding isn’t discovering it automatically. When I try to add it manually using the IP address, I run into some communication errors. The debug logs show something about WebSocket connections closing abnormally, which is a bit confusing.
What I’ve Tried So Far:
- Manual Configuration: I’ve tried adding the device manually with the correct IP and credentials. The logs show that it connects initially but then runs into communication issues.
- Port and Firewall Checks: Made sure that ports 80 and 443 are open on my network.
- Firmware Update: Confirmed that the Plus 2PM is running the latest firmware.
- Binding Version: Ensured I’m using the latest version of the Shelly binding.
**Debug Logs Highlights:**text
2023-09-23 20:52:38.151 [DEBUG] [shelly.internal.ShellyHandlerFactory] - ShellyPro 2PM Roller: Create new thing of type shelly:shellypro2pm-roller using ShellyRelayHandler
2023-09-23 20:52:38.146 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘shelly:shellypro2pm-roller:dad78c9269’ changed from UNINITIALIZED to INITIALIZING
2023-09-23 20:52:38.205 [DEBUG] [helly.internal.api2.Shelly2RpcSocket] - ShellyPro 2PM Roller: WebSocket connected /192.168.10.231:37560<-/192.168.10.230:80, Idle Timeout=2147483647
2023-09-23 20:52:38.248 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellypro2pm-roller-dad78c9269: Unable to initialize, retrying later
Next Steps:
- I’m planning to try resetting the device to factory settings and re-adding it to OpenHAB.
- I’ll also check if there’s a specific network configuration that might be causing the WebSocket issues.
- If all else fails, I might look into using MQTT as a fallback, though I’d prefer to stick with the Shelly binding for consistency.
Community Support:
I’m really grateful for the OpenHAB community and forums. If anyone has encountered similar issues or has tips on troubleshooting WebSocket connections with Shelly devices, I’d be happy to hear from you! Let’s keep the conversation going and help each other out.
Cheers,
[Your Name]