No announcement yet.

Zigbee2MQTT on Windows

  • Filter
  • Time
  • Show
Clear All
new posts

  • IanIreland
    Fell at the first hurdle; Click image for larger version

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

    Leave a comment:

  • Richel
    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.

    Leave a comment:

  • Michael McSharry
    started a topic Zigbee2MQTT on Windows

    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.