No announcement yet.

Zigbee2MQTT on Windows

  • Filter
  • Time
  • Show
Clear All
new posts

    Zigbee2MQTT on Windows

    I have been communicating with ptvo on for a Windows port of zigbee2mqtt. I have had success. A few pieces of information are needed to make the port.

    1. Need to install driver for CC2531. It is available at . Unzip to someplace on the computer. Plug the USB dongle into available USB port. It should show up as an "Other Device" TI CC2531 USB CDC. Right click on this device and select option to install driver. Browse to "\driver" subfolder of the unzip. Device should now show up under Ports (COM & LPT) as a COMXX where XX was 15 in my case.

    Restart the computer to remove access dependencies.

    Note that I was using a bluetooth mouse on W7 and when this driver was installed it made the mouse non-operational. I had to uninstall/remove the driver for the CC2531 before the mouse was operational.

    2. Install node.js from I used the Windows Installer (.msi).

    3. Create folder to place zigbee2MQTT. I used C:\opt\zigbee2mqtt, but likely can be anywhere. The remaining instructions use this location.

    4. Open command window as administrator (Windows search for "cmd", right click, run as administrator)

    5. Clone zigbee2MQTT from git repository from command window. (git clone C;\opt\zigbee2mqtt). If git is not yet installed on Windows then it can be from . It likely is possible to just download the zip and expand it into a Windows folder, but I did not try this approach.

    6. Edit the C:\opt\zigbee2mqtt\data\configuration.yaml. One line to provide the MQTT broker IP address. One line for the USB Dongle port (e.g. COM15). You can also change the base topic from zigbee2mqtt if you desire. I have a different topic for each computer where I have the USB Dongle installed.

    7. Navigate to the install folder (CD C:\opt\zigbee2mqtt) in Command Window

    7a. (added after initial post). Install zigbee2mqtt dependencies. From command prompt run "npm install"

    8. Run zigbee2mqtt from Command Window (npm start). Feedback will be in the Command Window. You should also observe the MQTT LWT message being online on your MQTT client, such as mcsMQTT. If it does not work then it is possible that there is feedback telling you reset the USB dongle using the button nearest the USB connector. With the case I provided installed it is possible with a small non-metalic probde angled to the button. One can also drill a hole in the top of the case above the button. If the case is removed then the plastic latch may break. I provided a flexible top should the case latch break. One could also use tape as another alternative.

    9. To run on windows startup I followed the following process. While it may not be the most elegant it does work:
    9a. Install PM2 from Command Window (npm install pm2 -g)
    9b. Create batch file that will be used to start the js application. I called it z.bat with one line contents or "pm2 start c:\opt\zigbee2mqtt\index.js"
    9c. Create shortcut to the bat file (right click, create shortcut)
    9d. Copy/Paste shortcut into Windows startup folder. In my case it was at C:\Users\Dell\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup for user Dell
    9e. Restart computer
    9f. Observe the node process in Windows Task Manager or observe the LWT MQTT message on a MQTT client.

    Originally posted by Michael McSharry View Post
    I have been communicating with ptvo on for a Windows port of zigbee2mqtt. I have had success. A few pieces of information are needed to make the port.....
    Thanks for doing this.


      Fell at the first hurdle; Click image for larger version

Name:	Inf.PNG
Views:	2743
Size:	93.0 KB
ID:	1268203


        With thanks to Mr Google and a little knowledge I now have a signed driver. If anybody else has the same problem give me a shout.


          I'm working through the instructions.

          In 6 how should the com port appear in the configuration file? I currently have;
          # Location of CC2531 USB sniffer
          port: /dev/ttyACM0

          My com port is 6


            Here is my configuation.yaml file that I used for testing on Windows. In your case it would be COM6 rather than COM15

            # Home Assistant integration (MQTT discovery)
            homeassistant: false

            # allow new devices to join
            permit_join: true

            # MQTT settings
            # MQTT base topic for zigbee2mqtt MQTT messages
            base_topic: zigbeeWindows
            # MQTT server URL
            server: 'mqtt://'
            # MQTT server authentication, uncomment if required:
            # user: my_user
            # password: my_password

            # Serial settings
            # Location of CC2531 USB sniffer
            #port: /dev/ttyACM0
            #port: TI CC2531 USB CDC
            port: COM15


              Superstar - thank you.


                I am beginning to think this is more complex than I thought!
                Click image for larger version

Name:	js.PNG
Views:	2758
Size:	22.9 KB
ID:	1268429


                  my install on Windows has semver.cmd and semver.js at C:\opt\zigbee2mqtt\node_modules. I have not used node.js before so don't really know the process to debug based upon the error reported. Another idea is the PATH as I see you are using P rather than C. Another idea is to ask on the github link I posted at the top or start your own issue on that forum.

                  Using Windows puts you on the road least traveled.


                    Thanks for the reply. I will play when I have time. I may have to download again as I don't have that directory!!


                      I ran into the same issue as IanIreland on Windows Server 2012 r2.

                      I came across this thread (, so I tried the following:

                      1. Installed nodejs LTS 10.15.0 x64
                      2. Installed Git (x64)
                      3. Created new registry dword32 for 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
                      4. Rebooted PC
                      5. Opened a cmd & cd to c:\zigbee2mqtt
                      6.Run command: npm i semver
                      Some bits about node_modules flashed past, eventually semver was installed.
                      The node_modules folder was then available inside c:\zigbee2mqtt

                      7.Run command: npm start
                      Zigbee looked like it started but spat out errors about resetting USB.
                      I'm waiting for my ebay order of the CC USB, so I can't test any further past this point.

                      This is my first time playing with any of the node.js etc stuff, so I don't have any idea of what I'm doing. Seems promising so far!
                      Normally I wouldn't register to a forum just to post a reply, but I know how frustrating it is to find a forum thread with no answer to the problem you're having!

                      Good luck all


                        Originally posted by IanIreland View Post
                        With thanks to Mr Google and a little knowledge I now have a signed driver. If anybody else has the same problem give me a shout.
                        I ran into the same problem... Giving you shout :-)
                        RJ_Make On YouTube


                          I added a 7a step to the instructions I posted at the top of this thread. I suspect it will help the problem Ian had, but not certain. I also sent Ian an email about the signed driver. Hopefully is listening in.


                            I'm dead in the water, without a signed driver. Windows 10 will NOT allow an un-signed driver installation anymore. It appears they have removed every method of disabling the driver signing verification system.

                            Ian PM'd me his driver, but it would not install for me. Has the same un-signed error as the original.
                            RJ_Make On YouTube


                              The zigbee2mqtt thread referenced in the first post has subsequent discussion including success by clockbrain. Perhaps you could engage in that discussion to get some help. Using a RPi for special purpose interfaces is also not a bad idea as most of the emerging HA world seems to be Linux based.