Removing wmc, renamed wmc in asterisk call to wm.

Re-enabled call asterisk for weather report.
This commit is contained in:
Stephen Vanderwarker 2022-04-27 16:35:53 -04:00
parent 1af04358d2
commit 1259729c91
Signed by: stephen
GPG Key ID: EF429EF847868C14

View File

@ -396,9 +396,7 @@ try {
console.log('error:', err); console.log('error:', err);
} else { } else {
let w = JSON.parse(body); let w = JSON.parse(body);
let wm = weather_city_name + " Weather: \r\n Tempature: " + w.main.temp + " degrees. \r\n Conditions: " + w.weather[0].main + "\r\n Pressure: " + let wm = weather_city_name + " Weather: Tempature: " + w.main.temp + " degrees. Conditions: " + w.weather[0].main + ". Pressure: " +
w.main.pressure + " \r\n Wind Direction: " + getDirection(w.wind.deg) + "\r\n Wind Speed: " + w.wind.speed + " m.p.h. \r\n";
let wmc = weather_city_name + " Weather: Tempature: " + w.main.temp + " degrees. Conditions: " + w.weather[0].main + ". Pressure: " +
w.main.pressure + ". Wind Direction: " + getDirection(w.wind.deg) + ". Wind Speed: " + w.wind.speed + " miles per hour \r\n"; w.main.pressure + ". Wind Direction: " + getDirection(w.wind.deg) + ". Wind Speed: " + w.wind.speed + " miles per hour \r\n";
// send weather to mqtt // send weather to mqtt
client.publish('weather/temp', '' + w.main.temp + ''); client.publish('weather/temp', '' + w.main.temp + '');
@ -409,7 +407,6 @@ try {
// send weather to xmpp admin // send weather to xmpp admin
xmpp.send(from, wm); xmpp.send(from, wm);
// call admin with latest weather report // call admin with latest weather report
/*
ami.action({ ami.action({
'action':'originate', 'action':'originate',
'channel':'SIP/' + asterisk_callfrom, 'channel':'SIP/' + asterisk_callfrom,
@ -418,7 +415,7 @@ try {
'data': 'googletts.agi,' + wmc, 'data': 'googletts.agi,' + wmc,
'application': 'agi' 'application': 'agi'
}); });
*/
} }
}); });
debug(); debug();