Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Home-brew Install
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- # Home-brew MQTT Install
- brew install mosquitto
- # Update mosquito.conf
- sudo nano /opt/homebrew/etc/mosquitto/mosquitto.conf
- # Add the below
- listener 1883
- allow_anonymous true
- # Run Service
- /opt/homebrew/opt/mosquitto/sbin/mosquitto -c /opt/homebrew/etc/mosquitto/mosquitto.conf
- # Restart Computer
- # Check MQTT Connection
- # Zigbee 2 MQTT Install
- # Install Node.Js- https://nodejs.org/en/
- # Check Adapter
- ls /dev/
- # Clone Z2M Repository
- git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /Applications/zigbee2mqtt
- # Execute Libraries
- cd /Applications/zigbee2mqtt
- npm ci
- # Configuration YAML
- frontend:
- # Optional, default 8080 or you can use your own as well.
- port: 8083
- # IP address of the device running Zigbee2MQTT
- host: 192.168.86.189
- advanced:
- network_key: GENERATE
- # Execute Zigbee2MQTT service
- npm start
- # Running as a service
- cd /Library/LaunchDaemons
- # Create Application Plist
- sudo nano zigbe2mqtt.application.plist
- # Add the below
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>Label</key>
- <string>zigbe2mqtt.application.plist</string>
- <key>EnvironmentVariables</key>
- <dict>
- <key>PATH</key>
- <string><![CDATA[/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin]]></string>
- </dict>
- <key>WorkingDirectory</key>
- <string>/Applications/zigbee2mqtt</string>
- <key>ProgramArguments</key>
- <array>
- <string>/usr/local/bin/npm</string>
- <string>start</string>
- </array>
- <key>RunAtLoad</key>
- <true/>
- <key>KeepAlive</key>
- <true/>
- </dict>
- </plist>
- # Enable & Start Application
- sudo launchctl load /Library/LaunchDaemons/zigbe2mqtt.application.plist
- sudo launchctl start /Library/LaunchDaemons/zigbe2mqtt.application.plist
- # Stop the application
- sudo launchctl stop /Library/LaunchDaemons/zigbe2mqtt.application.plist
- # Unload the applicaiton to modify the plist file
- sudo launchctl unload /Library/LaunchDaemons/zigbe2mqtt.application.plist
Add Comment
Please, Sign In to add comment