HA Noob using Sonoff Zigbee Dongle P on a RPi3

Hi All,

Wondering if anyone can shed any light on my issue.

I have newly set up a RPi3 with HA. At the moment its only purpose is to control my lights where I have placed Candeo Zigbee Dimmer switches in all rooms.

The pairing mode for them is simple, press 5 times and hold on fifth and the lights flash, however they do not show in HA. ( no other zigbee devices to try yet)

Now the strange thing is in the Zigbee2MQTT Add on I have the following config:

Socat:
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: “-d -d”
log: false

MQTT:
server: mqtt://core-mosquitto:1883
base_topic: zigbee2mqtt
cert: /etc/ssl/mqtt-client.crt
user: *******
password: ********
client_id: MY_CLIENT_ID
reject_unauthorized: true
include_device_information: true
keepalive: 60
version: 4
force_disable_retain: false

Serial:
port: >-
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c6689315468eed11af4f8554b96ce6f8-if00-port0

My problem began with the MQTT step, I tried a number of different code and kept getting errors until I have the above.

However, when checking the log its all seems to show green which looks positive and the Web UI can be opened to connect devices but nothing appears when trying to pair.

See my log info here: (I have a feeling something is off with ‘socat’ but not sure what that is tbh)

[20:55:42] INFO: Preparing to start…
[20:55:42] INFO: Socat not enabled
[20:55:43] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
[2024-12-19 20:56:02] info: z2m: Logging to console, file (filename: log.log)
[2024-12-19 20:56:02] info: z2m: Starting Zigbee2MQTT version 1.42.0 (commit #unknown)
[2024-12-19 20:56:02] info: z2m: Starting zigbee-herdsman (2.1.9)
[2024-12-19 20:56:05] info: zh:zstack:znp: Opening SerialPort with {“path”:“/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c6689315468eed11af4f8554b96ce6f8-if00-port0”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2024-12-19 20:56:05] info: zh:zstack:znp: Serialport opened
[2024-12-19 20:56:05] info: z2m: zigbee-herdsman started (resumed)
[2024-12-19 20:56:05] info: z2m: Coordinator firmware version: ‘{“meta”:{“maintrel”:1,“majorrel”:2,“minorrel”:7,“product”:1,“revision”:20240710,“transportrev”:2},“type”:“zStack3x0”}’
[2024-12-19 20:56:05] info: z2m: Currently 0 devices are joined.
[2024-12-19 20:56:05] warning: z2m: permit_join set to true in configuration.yaml.
[2024-12-19 20:56:06] warning: z2m: Allowing new devices to join.
[2024-12-19 20:56:06] warning: z2m: Set permit_join to false once you joined all devices.
[2024-12-19 20:56:06] info: z2m: Zigbee: allowing new devices to join.
[2024-12-19 20:56:06] info: z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-12-19 20:56:06] info: z2m: Connected to MQTT server
[2024-12-19 20:56:06] info: z2m:mqtt: MQTT publish: topic ‘zigbee2mqtt/bridge/state’, payload ‘{“state”:“online”}’
[2024-12-19 20:56:07] info: z2m: Started frontend on port 8099
[2024-12-19 20:56:07] info: z2m:mqtt: MQTT publish: topic ‘zigbee2mqtt/bridge/state’, payload ‘{“state”:“online”}’
[2024-12-19 20:56:07] info: z2m: Zigbee2MQTT started!
[2024-12-19 20:56:12] info: z2m:mqtt: MQTT publish: topic ‘homeassistant/binary_sensor/1221051039810110150109113116116_0x00124b002e1e7c00/connection_state/config’, payload ‘{“device”:{“hw_version”:“zStack3x0 20240710”,“identifiers”:[“zigbee2mqtt_bridge_0x00124b002e1e7c00”],“manufacturer”:“Zigbee2MQTT”,“model”:“Bridge”,“name”:“Zigbee2MQTT Bridge”,“sw_version”:“1.42.0”},“device_class”:“connectivity”,“entity_category”:“diagnostic”,“name”:“Connection state”,“object_id”:“zigbee2mqtt_bridge_connection_state”,“origin”:{“name”:“Zigbee2MQTT”,“sw”:“1.42.0”,“url”:“https://www.zigbee2mqtt.io”},“payload_off”:“offline”,“payload_on”:“online”,“state_topic”:“zigbee2mqtt/bridge/state”,“unique_id”:“bridge_0x00124b002e1e7c00_connection_state_zigbee2mqtt”,“value_template”:“{{ value_json.state }}”}’

** ‘warning’ signs are there as I set the pair mode to open when testing

If anyone has any idea what the cause may be or anything different I can try it would truely be appriciated as I have been trying this for some days now scratching my head and not getting nowhere with this.

Additional info:

  • MQTT Broker is on and active
  • ZHA is Disabled
  • Flashed the dongle to the latest software as it identified the device but would not connect
  • Using a USB extention lead
  • Please let me know if you need to know anything else in my query

Thanks in advance for any responses : )

Is the device that you are trying to pair near the dongle?

FAQ | Zigbee2MQTT in

On the other side of the room.

Is the code OK? Socat and Watchdog not starting.
I haven’t seen anyone else’s log so confirm this bit.

I think so. And nothing wrong on the logs

I can post my working z2mqtt conf if you want.

Yes please, that would be great! I can check any differences and try again.
Much appricated. Thanks.

Ps. I did check the link you sent but couldnt finy anything in there.

Following this I have just raised a very similar issue. Have changed mqtt config for server and added base option but still the same. Log is also showing with no errors and I can see that it is connecting to server and I can see when I permit devices to join.

Devices are right next to the tiny pc running HAOS and I have the sonoff P usb 3 which I flashed using python script (bootloader wasnt playing ball on the button). Am trying to pair HUE dimmer V2 as it is seems the logical and simplets thing to do. Also have Aqara motion 2. Aim will be to pair the various HUE bulbs I hav scattered around that have been plain bulbs for the last couple of years.

Yes, I had to use the python script also, the RF software was not working for me too.

Anyway, after this its very strange to see the log showing everything green and good.I havent read anything with anyone with the same issue.

have you posted elsewhere and any any responses?

I cant post back here if I find anything useful.

While i say that all is green, i am not aware of all components in the chain.
The only thi g that perhaps.may havr an issue might be the stick, not sure how this would generate errors for the componemts using it.

Can’t tell. It isn’t properly formatted using code tags, so the forum editor screws the formatting up to make it unreadable.

As @mcarty says, when first setting up Zigbee devices they should be close to the dongle. That is, no router hops between the device and the dongle. It can work with intervening hops, but the amount of communications between the device and the dongle during initial setup (or update) makes every hop through a router painfully slower

Followed by…

Um, what?

This is what works for me using ZHA:

Add a device to the Zigbee Network

  • Devices and Services
  • Click on Add Integration
  • Select Add Zigbee Device
  • Put the device into the pairing mode

Home Assistant should find the device and it will be in Devices

.

For ZHA, are you adding the zigbee device direct rather tha using mqtt and selcting the device.
Which device types can use this level of connection?

@VanDerCee Who is this directed at? Either use a name or quote.

@stevemann thanks for your comment. Comment wasnt really aimed at anyone at the time that I posted. Thank you for highlighted how I can improve on my posts.

Hey @VanDerCee, sorry its been a while.

From looking at the tutorials i’ve not even thought of using ZHA and have disabled it per actions on youtube vids and forums etc.

However, I may try without the MQTT Broker and see if it just simply works with ZHA thanks to @stevemann4 advice. Im not entirley sure why I didnt try this in the first place, (unless the reason to use MQTT broker is the recognise the Sonoff dongle P to find my Candeo switches)

Hi All,

Just thought id update on my situation.

After speaking with Candeo regarding the above issue. It was a very simple fix and have my lights configured in HA using ZHA.

All I had to do was pair them properly by pressing twice on the light switch, holding on the 2nd, until it flashes twice then it was picked up in HA for me to continue configuring.

Cannot believe it was this simple and I was following incorrect info from the candeo box’s instuctions in the booklet these C202N modules came in.

Hope this info is useful else. Thanks all for your responses.