Removing wmc, renamed wmc in asterisk call to wm.

Re-enabled call asterisk for weather report.
pull/25/head
Stephen Vanderwarker 7 months ago
parent 1af04358d2
commit 1259729c91
Signed by: stephen
GPG Key ID: EF429EF847868C14

@ -396,9 +396,7 @@ try {
console.log('error:', err);
} else {
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: " +
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: " +
let wm = 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";
// send weather to mqtt
client.publish('weather/temp', '' + w.main.temp + '');
@ -409,7 +407,6 @@ try {
// send weather to xmpp admin
xmpp.send(from, wm);
// call admin with latest weather report
/*
ami.action({
'action':'originate',
'channel':'SIP/' + asterisk_callfrom,
@ -418,7 +415,7 @@ try {
'data': 'googletts.agi,' + wmc,
'application': 'agi'
});
*/
}
});
debug();