Add mqtt publish for light values.
This commit is contained in:
parent
56b593e9e8
commit
399ffeae83
@ -76,7 +76,7 @@ export default function Settings() {
|
||||
Meteor.call('mqttPublish', {
|
||||
topic: 'smartgarden/commands/' + selectedEspId + '/automatic',
|
||||
payload: JSON.stringify({
|
||||
'irrigation': "true",
|
||||
'irrigation': 'true',
|
||||
'light': 'true'
|
||||
})
|
||||
}, (err, res) => {
|
||||
@ -86,6 +86,20 @@ export default function Settings() {
|
||||
alert('success')
|
||||
}
|
||||
})
|
||||
|
||||
Meteor.call('mqttPublish', {
|
||||
topic: 'smartgarden/commands/' + selectedEspId + '/light',
|
||||
payload: JSON.stringify({
|
||||
'minLX': 500,
|
||||
'nm': 700
|
||||
})
|
||||
}, (err, res) => {
|
||||
if (err) {
|
||||
alert(err);
|
||||
} else {
|
||||
alert('success')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user