Shelly Motion - Error: Socket error on client <unknown>, disconnecting

I’m very new to Home Assistant and Shelly devices. There seems to be several different strategies to implement Home Automation. I’ve chosen to use Home Assistant on a Raspberry PI, Node Red and MQTT.

I have gotten some of my gear working. I have a functioning door/window switch and some shelly plugs working in Node Red. I’m having trouble getting my Shelly Motion sensor to work. I’ve updated it’s firmware version to: 20210226-072307/v1.1.0@f31e1d2b. I’ve gotten the wifi on the same subnet with a static IP and I’ve set the MQTT settings the same as I have don on the working devices.
My Mosquito error logs give this same message over and over again. 192.168.1.29 is the IP of my motion sensor. What is this socket error? Thanks!

618547135: New connection from 192.168.1.29 on port 1883.
1618547136: Socket error on client <unknown>, disconnecting.
1618547138: New connection from 192.168.1.29 on port 1883.
1618547138: Socket error on client <unknown>, disconnecting.

Hi @roger21 did you have any luck since then? I’m also facing the same with freshly bought SHMotion.

Edit:
I think I got it finally.
It seems Shelly MQTT client doesn’t work with Home Assistant users, you need to specify a username/password in MQTT config, and use that and ONLY that in the MotionSensor config panel.

For future googlers: I had the same issue and almost got insane looking for a solution. Turned out that the error was caused by a special char contained in the MQTT password I chose. I configured the same password without that character and everything works fine now. I got a bunch of other Shelly devices and all worked fine with the same config. Only the Shelly Motion seems to have this limitation/bug.