|
|
|
@ -5890,7 +5890,7 @@ const client = mqtt.connect('mqtt://35.207.198.4:1883');
|
|
|
|
|
|
|
|
|
|
|
|
client.on('connect', () => {
|
|
|
|
client.on('connect', () => {
|
|
|
|
console.log('Connected to MQTT broker');
|
|
|
|
console.log('Connected to MQTT broker');
|
|
|
|
client.subscribe('water/iot-data/#', (err) => {
|
|
|
|
client.subscribe('water/iot-data/+', (err) => {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
console.error('Error subscribing to topic:', err);
|
|
|
|
console.error('Error subscribing to topic:', err);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|