From 1259729c91f38007fb77b3b239102967d6c7bec2 Mon Sep 17 00:00:00 2001 From: stephen Date: Wed, 27 Apr 2022 16:35:53 -0400 Subject: [PATCH] Removing wmc, renamed wmc in asterisk call to wm. Re-enabled call asterisk for weather report. --- index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 20788af..9a19adb 100755 --- a/index.js +++ b/index.js @@ -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();