Coder Social home page Coder Social logo

homebridge-weather's Issues

Error with newest version

Installed the newest version today, and receiving following errors when starting HomeBridge now:

[2019-10-4 5:27:19 PM] ---
[2019-10-4 5:27:20 PM] Loaded plugin: homebridge-weather
/usr/lib/node_modules/homebridge-weather/node_modules/googleapis/build/src/apis/adsense/v1.4.js:71
static const struct bandInfoStruct bandInfo[9] = {
^^^^^^

SyntaxError: Unexpected strict mode reserved word
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/googleapis/build/src/apis/adsense/index.js:17:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/googleapis/build/src/apis/index.js:24:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/googleapis/build/src/googleapis.js:15:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/googleapis/build/src/index.js:19:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/fakegato-history/lib/googleDrive.js:7:18)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/fakegato-history/fakegato-storage.js:11:19)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/fakegato-history/fakegato-history.js:6:25)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/coffeescript/lib/coffee-script/register.js:45:36)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Plugin.module.exports [as initializer] (/usr/lib/node_modules/homebridge-weather/index.js:12:30)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:171:14)
    at Array.forEach (<anonymous>:null:null)
    at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:145:22)
    at new Server (/usr/lib/node_modules/homebridge/lib/server.js:57:24)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:32:16)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

not working

I've got some errors using this project lately.
qq 20180128202010

Multiple Cities?

Hi, Thank you for this plugin. It is working well.
Is it possible to add two cities using this plugin? I am suspecting there is something going wrong when there are two accessories named "Weather".

Thanks!

Unit Imperial - not correct

I am using imperial units as spelled out in the docs but the value is too high (currently reading 183). Any ideas why this is happening?

Cloudiness is steady at 75%

For the last few days or maybe one week the cloudiness value is 75% all the time... sometimes it updates to another value, but in most cases when I look it up it is 75% which does not reflect the actual status of the sky in my location.
Is there any issue with fetching the value for cloudiness? All other data is polled correctly and updates / changes. See log file:

[Homebridge] [1/3/2020, 22:50:29] [Wetter] Fetched temperature value 5.08deg of type 'current' for accessory Wetter
[Homebridge] [1/3/2020, 22:50:29] [Bewölkung] Fetched cloudiness value 75% of type 'clouds' for accessory Bewölkung
[Homebridge] [1/3/2020, 22:50:29] [Wetter] Fetched humidity value 93% of type 'current' for accessory Wetter

configuration file section:
{
"accessory": "Weather",
"name": "Wetter",
"locationByCoordinates": "lat=51.000000&lon=6.000000",
"apikey": "this_is_secret",
"pollingInterval": 5,
"plugin_map": {
"plugin_name": "homebridge-weather",
"index": 0
}
},
{
"accessory": "Weather",
"name": "Bewölkung",
"type": "clouds",
"locationByCoordinates": "lat=51.000000&lon=6.000000",
"apikey": "this_is_secret",
"pollingInterval": 5,
"plugin_map": {
"plugin_name": "homebridge-weather",
"index": 0
}
},

Any idea or anyone experiencing the same?

Christian

Failed to update to 1.12.3 on Hoobs

Hi,
Hoobs is indicating that an update is available, but upon installation the log shows:

...
17.6.2020, 12:58:27 - npm
17.6.2020, 12:58:27 - ERR! code EEXIST
npm ERR! path /home/hoobs/.hoobs/node_modules/gtoken/node_modules/.bin/mime
17.6.2020, 12:58:27 - npm
17.6.2020, 12:58:27 - ERR! Refusing to delete /home/hoobs/.hoobs/node_modules/gtoken/node_modules/.bin/mime: is outside /home/hoobs/.hoobs/node_modules/gtoken/node_modules/mime and not a link
npm ERR! File exists: /home/hoobs/.hoobs/node_modules/gtoken/node_modules/.bin/mime
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
17.6.2020, 12:58:27 -
17.6.2020, 12:58:27 - npm ERR! A complete log of this run can be found in:
npm ERR! /home/hoobs/.npm/_logs/2020-06-17T10_58_27_717Z-debug.log
17.6.2020, 12:58:27 - Plugin "homebridge-weather" updated.
17.6.2020, 12:58:27 - Got SIGINT, shutting down Bridge...
...

it doesn't update... so what can I do?

Thanks,
Christian

Fetch Temperature 30 log by second

Hy

the log "fetch temerature and humidity" show in homebridge increase with time.

at startup its show 1 or tow log by 10minutes.
With more day to run its show log 30 times by seconds and slow dowon homebridge update accessory.

Log in eve APP

Hi
The historical data is not saved since one day ago.

I have defined polling and enable history vars.

I split temp and humidity in two sensors like this
60
},
{
"accessory": "Weather",
"apikey": "xxxxxxxx",
"location": "Xxxxxc",
"name": "Temperatura Exterior",
"showHumidity": false,
"pollingInterval": 10,
"enableHistory": true
},
{
"accessory": "Weather",
"apikey": "xxxxxxxx",
"location": "xxxxxxxc",
"name": "Humedad Exterior",
"showTemperature": false,
"pollingInterval": 10,
"enableHistory": true
},

Split Temperature and Humadity in two Devices

Das Plugin funktioniert super, bin begeistert :)

Ich würde mir gerne die Luftfeuchtigkeit und die Temperatur jeweils als einzelnes Gerät darstellen lassen, damit ich die Werte direkt in der Home-Übersicht sehe; Aktuell steht hier nur „2 Sensoren“. Am einfachsten wäre wohl eine Option in der config:
showtemperature:false. Hiermit ließe sich ein Gerät zur Temperatur uns eins für die Luftfeuchtigkeit hinzufügen.

showHumidity not working!

Have look at index.js
...
function WeatherAccessory(log, config) {
...
this.showHumidity = config["showHumidity"] || true; <---
that is always true!

Wind sensor doesn't work

I don't know why but my wind sensor is not showing any data.

Here is my configuration for this sensor :
{
"accessory": "Weather",
"apikey": "**********",
"location": "Paris,fr",
"name": "Wind",
"type": "windspeed"
}

Logs :
[Wind] Server response: {"cod":"200","message":0,"cnt":40,"list":[{"dt":1588593600,"main":{"temp":18.24,"feels_like":17.3,"temp_min":18.24,"temp_max":20.66,"pressure":1018,"sea_level":1017,"grnd_level":1012,"humidity":61,"temp_kf":-2.42},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":85},"wind":{"speed":1.64,"deg":24},"sys":{"pod":"d"},"dt_txt":"2020-05-04 12:00:00"},{"dt":1588604400,"main":{"temp":19.19,"feels_like":16.72,"temp_min":19.19,"temp_max":20.09,"pressure":1016,"sea_level":1016,"grnd_level":1011,"humidity":55,"temp_kf":-0.9},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":98},"wind":{"speed":3.57,"deg":45},"sys":{"pod":"d"},"dt_txt":"2020-05-04 15:00:00"},{"dt":1588615200,"main":{"temp":17.39,"feels_like":14.36,"temp_min":17.39,"temp_max":17.49,"pressure":1016,"sea_level":1016,"grnd_level":1011,"humidity":64,"temp_kf":-0.1},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":99},"wind":{"speed":4.59,"deg":61},"sys":{"pod":"d"},"dt_txt":"2020-05-04 18:00:00"},{"dt":1588626000,"main":{"temp":14.79,"feels_like":11.2,"temp_min":14.78,"temp_max":14.79,"pressure":1017,"sea_level":1017,"grnd_level":1012,"humidity":69,"temp_kf":0.01},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":97},"wind":{"speed":4.87,"deg":64},"sys":{"pod":"n"},"dt_txt":"2020-05-04 21:00:00"},{"dt":1588636800,"main":{"temp":13.3,"feels_like":9.22,"temp_min":13.3,"temp_max":13.3,"pressure":1018,"sea_level":1018,"grnd_level":1012,"humidity":68,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":99},"wind":{"speed":5,"deg":72},"sys":{"pod":"n"},"dt_txt":"2020-05-05 00:00:00"},{"dt":1588647600,"main":{"temp":12.19,"feels_like":7.26,"temp_min":12.19,"temp_max":12.19,"pressure":1015,"sea_level":1015,"grnd_level":1010,"humidity":68,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":100},"wind":{"speed":5.87,"deg":74},"sys":{"pod":"n"},"dt_txt":"2020-05-05 03:00:00"},{"dt":1588658400,"main":{"temp":12.01,"feels_like":7.35,"temp_min":12.01,"temp_max":12.01,"pressure":1015,"sea_level":1015,"grnd_level":1010,"humidity":65,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":100},"wind":{"speed":5.23,"deg":78},"sys":{"pod":"d"},"dt_txt":"2020-05-05 06:00:00"},{"dt":1588669200,"main":{"temp":14.47,"feels_like":9.84,"temp_min":14.47,"temp_max":14.47,"pressure":1016,"sea_level":1016,"grnd_level":1010,"humidity":55,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":100},"wind":{"speed":5.17,"deg":87},"sys":{"pod":"d"},"dt_txt":"2020-05-05 09:00:00"},{"dt":1588680000,"main":{"temp":13.96,"feels_like":11.02,"temp_min":13.96,"temp_max":13.96,"pressure":1016,"sea_level":1016,"grnd_level":1011,"humidity":67,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":3.51,"deg":92},"rain":{"3h":0.89},"sys":{"pod":"d"},"dt_txt":"2020-05-05 12:00:00"},{"dt":1588690800,"main":{"temp":14.46,"feels_like":12,"temp_min":14.46,"temp_max":14.46,"pressure":1017,"sea_level":1017,"grnd_level":1012,"humidity":71,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":99},"wind":{"speed":3.3,"deg":51},"rain":{"3h":1.6},"sys":{"pod":"d"},"dt_txt":"2020-05-05 15:00:00"},{"dt":1588701600,"main":{"temp":14.96,"feels_like":12.07,"temp_min":14.96,"temp_max":14.96,"pressure":1017,"sea_level":1017,"grnd_level":1012,"humidity":68,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":93},"wind":{"speed":3.86,"deg":73},"sys":{"pod":"d"},"dt_txt":"2020-05-05 18:00:00"},{"dt":1588712400,"main":{"temp":13.39,"feels_like":11.16,"temp_min":13.39,"temp_max":13.39,"pressure":1019,"sea_level":1019,"grnd_level":1014,"humidity":71,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":48},"wind":{"speed":2.6,"deg":37},"sys":{"pod":"n"},"dt_txt":"2020-05-05 21:00:00"},{"dt":1588723200,"main":{"temp":11.81,"feels_like":8.68,"temp_min":11.81,"temp_max":11.81,"pressure":1020,"sea_level":1020,"grnd_level":1015,"humidity":69,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":52},"wind":{"speed":3.26,"deg":45},"sys":{"pod":"n"},"dt_txt":"2020-05-06 00:00:00"},{"dt":1588734000,"main":{"temp":10.44,"feels_like":6.79,"temp_min":10.44,"temp_max":10.44,"pressure":1020,"sea_level":1020,"grnd_level":1015,"humidity":58,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":1},"wind":{"speed":2.95,"deg":58},"sys":{"pod":"n"},"dt_txt":"2020-05-06 03:00:00"},{"dt":1588744800,"main":{"temp":10.42,"feels_like":6.54,"temp_min":10.42,"temp_max":10.42,"pressure":1021,"sea_level":1021,"grnd_level":1016,"humidity":50,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":1},"wind":{"speed":2.8,"deg":62},"sys":{"pod":"d"},"dt_txt":"2020-05-06 06:00:00"},{"dt":1588755600,"main":{"temp":15.1,"feels_like":11.14,"temp_min":15.1,"temp_max":15.1,"pressure":1022,"sea_level":1022,"grnd_level":1016,"humidity":42,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":3.33,"deg":56},"sys":{"pod":"d"},"dt_txt":"2020-05-06 09:00:00"},{"dt":1588766400,"main":{"temp":19.07,"feels_like":14.4,"temp_min":19.07,"temp_max":19.07,"pressure":1022,"sea_level":1022,"grnd_level":1017,"humidity":31,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":4.18,"deg":59},"sys":{"pod":"d"},"dt_txt":"2020-05-06 12:00:00"},{"dt":1588777200,"main":{"temp":19.86,"feels_like":15.73,"temp_min":19.86,"temp_max":19.86,"pressure":1021,"sea_level":1021,"grnd_level":1016,"humidity":33,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":3.78,"deg":56},"sys":{"pod":"d"},"dt_txt":"2020-05-06 15:00:00"},{"dt":1588788000,"main":{"temp":17.77,"feels_like":14.06,"temp_min":17.77,"temp_max":17.77,"pressure":1021,"sea_level":1021,"grnd_level":1016,"humidity":42,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":3.6,"deg":63},"sys":{"pod":"d"},"dt_txt":"2020-05-06 18:00:00"},{"dt":1588798800,"main":{"temp":14.54,"feels_like":11.69,"temp_min":14.54,"temp_max":14.54,"pressure":1023,"sea_level":1023,"grnd_level":1018,"humidity":57,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":2.79,"deg":45},"sys":{"pod":"n"},"dt_txt":"2020-05-06 21:00:00"},{"dt":1588809600,"main":{"temp":12.42,"feels_like":10.05,"temp_min":12.42,"temp_max":12.42,"pressure":1023,"sea_level":1023,"grnd_level":1018,"humidity":68,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":2},"wind":{"speed":2.28,"deg":43},"sys":{"pod":"n"},"dt_txt":"2020-05-07 00:00:00"},{"dt":1588820400,"main":{"temp":11,"feels_like":8.76,"temp_min":11,"temp_max":11,"pressure":1023,"sea_level":1023,"grnd_level":1017,"humidity":68,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":39},"wind":{"speed":1.68,"deg":42},"sys":{"pod":"n"},"dt_txt":"2020-05-07 03:00:00"},{"dt":1588831200,"main":{"temp":11.3,"feels_like":8.89,"temp_min":11.3,"temp_max":11.3,"pressure":1022,"sea_level":1022,"grnd_level":1017,"humidity":62,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":65},"wind":{"speed":1.63,"deg":54},"sys":{"pod":"d"},"dt_txt":"2020-05-07 06:00:00"},{"dt":1588842000,"main":{"temp":16.83,"feels_like":13.81,"temp_min":16.83,"temp_max":16.83,"pressure":1022,"sea_level":1022,"grnd_level":1017,"humidity":39,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":66},"wind":{"speed":2.12,"deg":67},"sys":{"pod":"d"},"dt_txt":"2020-05-07 09:00:00"},{"dt":1588852800,"main":{"temp":21.03,"feels_like":17.66,"temp_min":21.03,"temp_max":21.03,"pressure":1021,"sea_level":1021,"grnd_level":1016,"humidity":28,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":63},"wind":{"speed":2.38,"deg":63},"sys":{"pod":"d"},"dt_txt":"2020-05-07 12:00:00"},{"dt":1588863600,"main":{"temp":21.48,"feels_like":18.24,"temp_min":21.48,"temp_max":21.48,"pressure":1020,"sea_level":1020,"grnd_level":1015,"humidity":30,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":100},"wind":{"speed":2.53,"deg":65},"sys":{"pod":"d"},"dt_txt":"2020-05-07 15:00:00"},{"dt":1588874400,"main":{"temp":19.26,"feels_like":17.04,"temp_min":19.26,"temp_max":19.26,"pressure":1020,"sea_level":1020,"grnd_level":1014,"humidity":41,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":100},"wind":{"speed":1.76,"deg":67},"sys":{"pod":"d"},"dt_txt":"2020-05-07 18:00:00"},{"dt":1588885200,"main":{"temp":16.46,"feels_like":14.81,"temp_min":16.46,"temp_max":16.46,"pressure":1020,"sea_level":1020,"grnd_level":1015,"humidity":51,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":100},"wind":{"speed":1.14,"deg":62},"sys":{"pod":"n"},"dt_txt":"2020-05-07 21:00:00"},{"dt":1588896000,"main":{"temp":14.52,"feels_like":12.87,"temp_min":14.52,"temp_max":14.52,"pressure":1020,"sea_level":1020,"grnd_level":1015,"humidity":57,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":66},"wind":{"speed":1.07,"deg":46},"sys":{"pod":"n"},"dt_txt":"2020-05-08 00:00:00"},{"dt":1588906800,"main":{"temp":13,"feels_like":11.11,"temp_min":13,"temp_max":13,"pressure":1019,"sea_level":1019,"grnd_level":1014,"humidity":62,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.35,"deg":41},"sys":{"pod":"n"},"dt_txt":"2020-05-08 03:00:00"},{"dt":1588917600,"main":{"temp":13.72,"feels_like":11.9,"temp_min":13.72,"temp_max":13.72,"pressure":1020,"sea_level":1020,"grnd_level":1014,"humidity":60,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":9},"wind":{"speed":1.32,"deg":39},"sys":{"pod":"d"},"dt_txt":"2020-05-08 06:00:00"},{"dt":1588928400,"main":{"temp":19.07,"feels_like":16.85,"temp_min":19.07,"temp_max":19.07,"pressure":1019,"sea_level":1019,"grnd_level":1014,"humidity":44,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":49},"wind":{"speed":2.02,"deg":57},"sys":{"pod":"d"},"dt_txt":"2020-05-08 09:00:00"},{"dt":1588939200,"main":{"temp":22.87,"feels_like":19.92,"temp_min":22.87,"temp_max":22.87,"pressure":1018,"sea_level":1018,"grnd_level":1013,"humidity":33,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":31},"wind":{"speed":2.82,"deg":68},"sys":{"pod":"d"},"dt_txt":"2020-05-08 12:00:00"},{"dt":1588950000,"main":{"temp":23.36,"feels_like":20.49,"temp_min":23.36,"temp_max":23.36,"pressure":1017,"sea_level":1017,"grnd_level":1012,"humidity":36,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":69},"wind":{"speed":3.25,"deg":73},"sys":{"pod":"d"},"dt_txt":"2020-05-08 15:00:00"},{"dt":1588960800,"main":{"temp":21.14,"feels_like":18.5,"temp_min":21.14,"temp_max":21.14,"pressure":1015,"sea_level":1015,"grnd_level":1010,"humidity":46,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":80},"wind":{"speed":3.48,"deg":72},"sys":{"pod":"d"},"dt_txt":"2020-05-08 18:00:00"},{"dt":1588971600,"main":{"temp":17.93,"feels_like":15.74,"temp_min":17.93,"temp_max":17.93,"pressure":1016,"sea_level":1016,"grnd_level":1010,"humidity":58,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":72},"wind":{"speed":3.02,"deg":73},"sys":{"pod":"n"},"dt_txt":"2020-05-08 21:00:00"},{"dt":1588982400,"main":{"temp":15.85,"feels_like":13.42,"temp_min":15.85,"temp_max":15.85,"pressure":1014,"sea_level":1014,"grnd_level":1009,"humidity":65,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":82},"wind":{"speed":3.27,"deg":61},"sys":{"pod":"n"},"dt_txt":"2020-05-09 00:00:00"},{"dt":1588993200,"main":{"temp":14.5,"feels_like":12.29,"temp_min":14.5,"temp_max":14.5,"pressure":1012,"sea_level":1012,"grnd_level":1007,"humidity":70,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":100},"wind":{"speed":2.88,"deg":70},"sys":{"pod":"n"},"dt_txt":"2020-05-09 03:00:00"},{"dt":1589004000,"main":{"temp":14.78,"feels_like":12.12,"temp_min":14.78,"temp_max":14.78,"pressure":1010,"sea_level":1010,"grnd_level":1005,"humidity":68,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":100},"wind":{"speed":3.46,"deg":107},"sys":{"pod":"d"},"dt_txt":"2020-05-09 06:00:00"},{"dt":1589014800,"main":{"temp":15.44,"feels_like":13.21,"temp_min":15.44,"temp_max":15.44,"pressure":1009,"sea_level":1009,"grnd_level":1004,"humidity":70,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":3.25,"deg":78},"rain":{"3h":0.62},"sys":{"pod":"d"},"dt_txt":"2020-05-09 09:00:00"}],"city":{"id":2988507,"name":"Paris","coord":{"lat":48.8534,"lon":2.3488},"country":"FR","population":2138551,"timezone":7200,"sunrise":1588566274,"sunset":1588619402}}

[Wind] Returning cached data undefined

Temperature Sensor not showing in automation tab in Home App

Thanks a lot for this plugin! I really like it a lot, since there is no need for a real sensor to check the temperature outside. The sensor is showing up at the Room i created, but I can't use it for automation purpose in Home App - the sensor option is still greyed out. I thought it would act like an actual sensor so I could make an automation like "temperature >30°C close blinds".

Bridge collapse

Breaking the internet due the bridge to collapse, sometimes there are no networks at home,but wifi is still well, lots of equipment work well,but when need to update temperature date,the bridge will collapse.

different query parameters

Hi,
great stuff this!

I just wonder if you could include different query parameters for more accurate results? Like city ID; zip code or (better) geo coordinates?

Also is there a way to get other info returned by weathermap especially rain and wind data?

Regards
Christian

Enhancement: Noon value

Thanks for adding the high/low forecast. I have yet another idea for an enhancement, may be a little harder to implement though.

I recently upgraded my window shades to be motorized and HomeKit controlled. So far, they’re pretty dumb - they go up in the morning and down when the sun sets. I’ve been thinking about adding a light sensor to the mix, but I know from experience that it gets pretty annoying because on cloudy summer days, they go up and down all the time.

Sunrise and sunset are pretty reliable, but HomeKit doesn’t have a trigger value for noon. In most cases, this would go a long way. For east oriented windows, the sun won’t hit them after noon, and for west oriented windows, it won’t hit it before.

I know even openweathermap doesn’t provide a specific noon value, though I guess adding the Unix time for sunrise and sunset, then dividing by 2 would give the average. So that wouldn’t be tricky.
Publishing it to HomeKit though would. Some plugins use a door sensor (calendar for example), if the event is triggered, the door is „open“. Not the cleanest solution imo. Another idea would be a humidity sensor - pretty much displaying the value of how high the sun is currently - 50% would reflect noon in this case. Or another „temperature“ sensor reaching from 0 to 180 degrees with 90 being mid day.
The last two would require a little more math, but give the option for an offset (e.g. 40% as „noon“ value)

Let me know what you think - I don’t know if this fits into the intended purpose for your plugin or seems reasonable for you to implement. Unfortunately, I don’t know enough about java to do my own plugin, though it may be worth learning.

No polling?

Looks like the plugin doesn't work as a source for trigger rules. I created a rule that switches on a heater when it's too cold. That rule is only executed when I open the Home app, but not in the background.

This actually works with the homebridge-wunderground plugin which has a configurable polling interval.

Can you add a polling mechanism as well?

Windspeed shows as % and not m/s

my sensor for windspeed shows up like humidity in HomeKit and not as m/s how do i change that ? i used the config examples in the description and used Type: windspeed

This plugin slows down Homebridge

-Current setup is running on an rPi4, 4GB ram,
homebridge-weather v1.13.1
homebridge-config-ui-x v4.50.1
-Homebridge weather is not running on it's own child-bridge (can't seem to this anyways?)
-Looks like relative humidity doesn't respond at all currently.

Homebridge Logs
[15/10/2022, 19:02:38] [homebridge-weather] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[15/10/2022, 19:02:38] [homebridge-weather] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[15/10/2022, 19:02:38] [homebridge-weather] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[15/10/2022, 19:02:40] [Outside Temp] Fetched humidity value 78% of type 'current' for accessory Outside Temp
[15/10/2022, 19:02:40] [Outside Temp] Fetched temperature value 14.89deg of type 'current' for accessory Outside Temp
[15/10/2022, 19:02:44] [homebridge-weather] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[15/10/2022, 19:02:45] [Cloudiness] Fetched cloudiness value 100% of type 'clouds' for accessory Cloudiness

Weather JSON settings (2 accessories)

{
"accessory": "Weather",
"apikey": "functioningkey",
"name": "Outside Temp",
"locationById": "functioninglocation",
"showHumidity": true,
"nameHumidity": "Outside Humidity",
"showTemperature": true,
"type": "current",
"pollingInterval": 5
}
{
"accessory": "Weather",
"apikey": "functioningkey",
"locationById": "functioninglocation",
"name": "Cloudiness",
"type": "clouds",
"pollingInterval": 5,
"showHumidity": false,
"showTemperature": false
}

Windspeed is still broken

As mentioned in issue #22 (in this comment) winspeed is (still) broken.

if (!error && value != null {humidityService.setCharacteristic(Characteristic.CurrentRelativeHumidity, value);

In version 1.12.1 the broken line 111 is still unchanged.

Regards

Thomas

Cloudiness reported as Humidity

In general it works well but Cloudiness is reported as Humidity. This makes it unusable for status message
Is it an issue or something can be fixed by configuration ?

My configuration entry is

  "accessory" : "Weather",
  "name" : "Cloudiness",
  "type" : "clouds",
  "location" : "my city",
  "apikey" : "my api key"

Thanks

Crash (JSON)

The current version crashed with the following backtrace:

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at WeatherAccessory.setCacheObj (/usr/lib/node_modules/homebridge-weather/index.js:143:42)
    at WeatherAccessory.<anonymous> (/usr/lib/node_modules/homebridge-weather/index.js:125:30)
    at Request._callback (/usr/lib/node_modules/homebridge-weather/index.js:295:21)
    at Request.self.callback (/usr/lib/node_modules/homebridge-weather/node_modules/request/request.js:186:22)
    at Request.emit (events.js:180:13)
    at Request.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:180:13)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-weather/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:272:13)

iOS 13

with ios 13 humidity and temperature are grouped. is it possible to group all together? it is sufficient to have the same serial number

Information

This only show the temp ?
Can't trigger a scene ?

Wind speed

What is the method for having wind speed?
or create a switch when the speed exceeds a certain value

Thank,

Enhancement: High and low temperatures

First of all, thank you for the plugin, it helps a lot to have some more information in HomeKit to base rules upon.

There's one thing I'm missing - daily high and low data. It would help a lot with some rules. For example, if it gets hotter than x degrees, water the plants for 10 minutes, if it's lower than x, turn on for 5 minutes. Or if it's warmer than y degrees, don't open the blinds in the morning.

Some rules for planning ahead don't need live data all the time or wouldn't even make sense to rely on live data. If it's going to be a hot day, I don't want the sun to burn through the windows in the morning, heating up the place, but if it's a moderate day it's alright. Also, I'd water the plants during the night (just a garden pump with a rain barrel hooked up to an eve switch), but if it's a cloudy/cold day, I don't need them to run as long.
Chance of rain would be awesome, but that would be hard to implement with home kit rules, because it would absolutely positively have to rain that day to not run the watering system.

High/low temperatures would go a long way though. They would have to be hidden/not in the favourites section to avoid confusion, but it would be nice to have that information.

Warning: 'This plugin slows down Homebridge' in log

Hello,

After upgrading to Homebridge 1.3.0, I recently discovered the following in my log files.

[2/21/2021, 10:04:17 PM] [homebridge-weather] This plugin slows down Homebridge. The read handler for the characteristic 'Current Temperature' was slow to respond! See https://git.io/JtMGR for more info. [2/21/2021, 10:04:17 PM] [homebridge-weather] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://git.io/JtMGR for more info.

Is there anything I can do to ensure this does not affect anything?

Can't get max or min temp

A very handy app however. Thee "current" temp works a treat however I can't get "max" or "min" temps to work

/home/nigel/.npm-global/lib/node_modules/homebridge-weather/index.js:157
temperature = parseFloat(this.cachedWeatherObj["list"][0]["temp"]["min"]);
^

TypeError: Cannot read property '0' of undefined
at WeatherAccessory.returnTempFromCache (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/index.js:157:75)
at WeatherAccessory.setCacheObj (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/index.js:145:36)
at WeatherAccessory. (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/index.js:104:30)
at Request._callback (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/index.js:271:21)
at Request.self.callback (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/node_modules/request/request.js:186:22)
at Request.emit (events.js:127:13)
at Request. (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/node_modules/request/request.js:1163:10)
at Request.emit (events.js:127:13)
at IncomingMessage. (/home/nigel/.npm-global/lib/node_modules/homebridge-weather/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:219:13)
at IncomingMessage.emit (events.js:132:15)
at endReadableNT (_stream_readable.js:1101:12)
at process._tickCallback (internal/process/next_tick.js:152:19)

Get Error Code 401: Invalid API Key

Hello

I installed homebridge-weather today, unfortunately it doesn't work properly. The homebridge log says:
body: '{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}',

I monitor homebridge using pm2, running homebridge v1.1.6 and node v12.18.4
plugins:
[email protected]
[email protected]
[email protected]

I signed up and make a new key using this URL https://home.openweathermap.org/api_keys. Of course I waited for activation and testet the key using this URL http://api.openweathermap.org/data/2.5/weather?q=Berlin&appid=API_KEY.

the output is:
{"coord":{"lon":13.41,"lat":52.52},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"base":"stations","main":{"temp":290.41,"feels_like":289.23,"temp_min":288.71,"temp_max":292.04,"pressure":992,"humidity":77},"visibility":10000,"wind":{"speed":3.1,"deg":130},"clouds":{"all":100},"dt":1601752367,"sys":{"type":1,"id":1275,"country":"DE","sunrise":1601701876,"sunset":1601743146},"timezone":7200,"id":2950159,"name":"Berlin","cod":200}
...so the key seems working. But I also tried a new generated API key with the same results.

The config.json from homebridge:

"accessories": [
    {
                "accessory": "Weather",
                "api_key": "API_KEY",
                "locationByCoordinates": "lat:xxxxx&lon:xxxx",
                "name": "My City",
                "pollingInterval": 10
     }
]

I don't know how to further troubleshoot and solve my problem... Am I missing something?

Thanks for any help!

Crash

The plugin (version 1.4.0) just crashed with this backtrace:

/usr/local/lib/node_modules/homebridge-weather/index.js:120
                    temperature = parseFloat(this.cachedWeatherObj["main"]["temp"]);
                                                                          ^

TypeError: Cannot read property 'temp' of undefined
    at WeatherAccessory.returnTemp (/usr/local/lib/node_modules/homebridge-weather/index.js:120:75)
    at WeatherAccessory.<anonymous> (/usr/local/lib/node_modules/homebridge-weather/index.js:78:48)
    at Request._callback (/usr/local/lib/node_modules/homebridge-weather/index.js:195:21)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-weather/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-weather/node_modules/request/request.js:1163:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-weather/node_modules/request/request.js:1085:12)

Install issue

Receiving the following error when installing the plug-in with sudo npm install -g homebridge-weather (also with —unsafe perm).

npm ERR! Linux 4.14.30-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "homebridge-weather"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! file /root/.npm/homebridge-weather/1.8.0/package/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /root/.npm/homebridge-weather/1.8.0/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2018-04-09T08_09_17_237Z-debug.log

Max temperature is reduced on evening

I assume that the idea of creating a forecast Max/Min is a little bit different than Max is working.

For example:
2pm - Acual 26 - Max 28
3pm - Actual 28 - Max 28
5pm - Actual 26 - Max 26
8pm - Actual 24 - Max 24
10pm - Actual 22 - Max 22

Is it any way to have it stable and keep Max the whole day as 28?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.