Hooks up a quite old "WS2300"-model weather station to MQTT
- Be
root
- Install
nodejs
on jour raspberry pi - Adjust
config.json
to your needs - Change directory into the repository and run:
npm install
npm start
- Check if it works. Stop execution witch
Ctrl+C
. Adjust whatever needed if an problem occur and try again with step 4. If everything is fine, continue with step 6. - Create systemd-service-unit-file at
/etc/systemd/system/mqtt2ws2300.service
with follwing content:
[Unit]
Description=mqtt2ws2300 Bridge
After=network.target
[Service]
Type=simple
WorkingDirectory=/path/to/repository/mqtt2ws2300 #<--- adjust to match your environment
ExecStart=npm start #<--- maybe use a absolute path to npm
User=pi
SendSIGKILL=no
Restart=on-failure
[Install]
WantedBy=multi-user.target
- Reload systemd serice deamon with
systemctl daemon-reload
- Enable the mqtt2rf service with
systemctl enable mqtt2ws2300
- Start the mqtt2rf service with
systemctl start mqtt2ws2300