exzz / netatmo-collector-go

Collect metrics from Netatmo API and push them into influx database
MIT License
4 stars 1 forks source link

Panic #1

Open StrikeZW opened 7 years ago

StrikeZW commented 7 years ago

i received a panic after running this

./netatmo-collector-go -config /root/netatmogo.conf

INFO[11-13|17:28:23] Starting INFO[11-13|17:28:23] Connected to InfluxDB INFO[11-13|17:28:24] Connected to Netatmo API DBUG[11-13|17:28:24] New point ts=1479054275 field=Temperature station="Mont Chanson" module=Außen value=5.900 DBUG[11-13|17:28:24] New point ts=1479054275 field=Humidity station="Mont Chanson" module=Außen value=86 DBUG[11-13|17:28:24] New point ts=1479054313 field=Rain station="Mont Chanson" module="Rain gauge" value=0.000 DBUG[11-13|17:28:24] netatmoGather exited panic: reflect: call of reflect.Value.Interface on zero Value

goroutine 8 [running]: panic(0x7ba060, 0xc82039ec20)

Will there be a fix for that?

exzz commented 7 years ago

Hi,

I have just pushed a new updated version currently running on my server. Let me know if you experience any issue.

Regards,

StrikeZW commented 7 years ago

Thanks for the update, but still experience the same issue:

root@localhost bin]# ./netatmo-collector-go -config /root/netatmogo.conf (main.collectorConfig) { Netatmo: (main.netatmoConfig) { ClientID: (string) (len=24) "58288d7b764ff4e8098bc296", ClientSecret: (string) (len=30) "b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX", Username: (string) (len=14) "sloewe@mac.com", Password: (string) (len=8) "Compeq99", Interval: (int) 300 }, Influxdb: (main.influxdbConfig) { Url: (string) (len=21) "http://localhost:8086", Username: (string) (len=17) "INFLUXDB_USERNAME", Password: (string) (len=17) "INFLUXDB_PASSWORD", Database: (string) (len=6) "myhome", RetentionPolicy: (string) (len=7) "default" } } INFO[11-15|11:27:27] Starting INFO[11-15|11:27:27] Connected to InfluxDB INFO[11-15|11:27:27] Connected to Netatmo API DBUG[11-15|11:27:28] New point ts=1479205502 field=Temperature station="Mont Chanson" module=Außen value=9.100 DBUG[11-15|11:27:28] New point ts=1479205502 field=Humidity station="Mont Chanson" module=Außen value=96 DBUG[11-15|11:27:28] New point ts=1479205540 field=Rain station="Mont Chanson" module="Rain gauge" value=0.000 DBUG[11-15|11:27:28] netatmoGather exited panic: reflect: call of reflect.Value.Interface on zero Value

goroutine 8 [running]: panic(0x7ba060, 0xc82039ebc0) /usr/lib/golang/src/runtime/panic.go:481 +0x3e6 reflect.valueInterface(0x0, 0x0, 0x0, 0x1, 0x0, 0x0) /usr/lib/golang/src/reflect/value.go:913 +0x7f reflect.Value.Interface(0x0, 0x0, 0x0, 0x0, 0x0) /usr/lib/golang/src/reflect/value.go:908 +0x48 github.com/exzz/netatmo-api-go.(*Device).Data(0xc82031e2c0, 0xc820050840, 0xc8200c7d70) /usr/local/go/src/github.com/exzz/netatmo-api-go/weather.go:235 +0x1f6 main.netatmoGather(0xc8200c2290, 0xc8200505a0, 0xc8200507e0, 0xc820050840, 0x0, 0x0) /usr/local/go/src/github.com/exzz/netatmo-collector-go/netatmo-collector.go:139 +0x865 created by main.main /usr/local/go/src/github.com/exzz/netatmo-collector-go/netatmo-collector.go:94 +0x6d1 [root@localhost bin]#

kind regards Stefan

On 15 Nov 2016, at 11:18, Nicolas Leclercq notifications@github.com wrote:

Hi,

I have just pushed a new updated version currently running on my server. Let me know if you experience any issue.

Regards,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/exzz/netatmo-collector-go/issues/1#issuecomment-260602747, or mute the thread https://github.com/notifications/unsubscribe-auth/AWWcXaaVEir1khruu6GM2dJMamNQk7Obks5q-YcHgaJpZM4Kwu0X.

exzz commented 7 years ago

you still running the old binary - I have rename it to netatmo-collector Please run ./netatmo-collector -config /root/netatmogo.conf

BTW you just copy/paste your netatmo credential to a public page :-), I would consider changing your password and revoke your app credential as soon as possible

StrikeZW commented 7 years ago

First of all, thanks for the passwort hint … i allready changed it

but i still recieve this error :

[root@localhost bin]# ./netatmo-collector-go -config /root/netatmogo.conf2016/11/15 14:56:50 Starting {{58288d7b764ff4e8098bc296 b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX USERNAMMEXX xxPWxxx 0} {http://localhost:8086 myhome default }} panic: non-positive interval for NewTicker

goroutine 1 [running]: panic(0x766e40, 0xc820382d90) /usr/lib/golang/src/runtime/panic.go:481 +0x3e6 time.NewTicker(0x0, 0x15) /usr/lib/golang/src/time/tick.go:23 +0xe4 main.main() /usr/local/go/src/github.com/exzz/netatmo-collector-go/netatmo-collector.go:74 +0x677 [root@localhost bin]#

kind regards Stefan

On 15 Nov 2016, at 11:31, Nicolas Leclercq notifications@github.com wrote:

you still running the old binary - I have rename it to netatmo-collector Please run ./netatmo-collector -config /root/netatmogo.conf

BTW you just copy/paste your netatmo credential to a public page :-), I would consider changing your password and revoke your app credential as soon as possible

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/exzz/netatmo-collector-go/issues/1#issuecomment-260605810, or mute the thread https://github.com/notifications/unsubscribe-auth/AWWcXZ3xLy0xM35VX8-eTowHgmhN6srmks5q-YodgaJpZM4Kwu0X.

StrikeZW commented 7 years ago

i just so in den output, that there is a “0” where the intervall should be. my conf looks like this

[netatmo] clientID = "58288d7b764ff4e8098bc296" clientSecret = "b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX" username = “USERNAMEXX" password = “xxxPWxxx" fetchinterval = 300

[influxdb] url = "http://localhost:8086"

username = "INFLUXDB_USERNAME"

password = "INFLUXDB_PASSWORD"

database = "myhome" RetentionPolicy = "default" precision = “s"

after writing this conf again it seems to work

?!

kind regards Stefan

On 15 Nov 2016, at 14:58, Stefan Loewe sloewe@mac.com wrote:

First of all, thanks for the passwort hint … i allready changed it

but i still recieve this error :

[root@localhost bin]# ./netatmo-collector-go -config /root/netatmogo.conf2016/11/15 14:56:50 Starting {{58288d7b764ff4e8098bc296 b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX USERNAMMEXX xxPWxxx 0} {http://localhost:8086 http://localhost:8086/ myhome default }} panic: non-positive interval for NewTicker

goroutine 1 [running]: panic(0x766e40, 0xc820382d90) /usr/lib/golang/src/runtime/panic.go:481 +0x3e6 time.NewTicker(0x0, 0x15) /usr/lib/golang/src/time/tick.go:23 +0xe4 main.main() /usr/local/go/src/github.com/exzz/netatmo-collector-go/netatmo-collector.go:74 http://github.com/exzz/netatmo-collector-go/netatmo-collector.go:74 +0x677 [root@localhost bin]#

kind regards Stefan

On 15 Nov 2016, at 11:31, Nicolas Leclercq <notifications@github.com mailto:notifications@github.com> wrote:

you still running the old binary - I have rename it to netatmo-collector Please run ./netatmo-collector -config /root/netatmogo.conf

BTW you just copy/paste your netatmo credential to a public page :-), I would consider changing your password and revoke your app credential as soon as possible

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/exzz/netatmo-collector-go/issues/1#issuecomment-260605810, or mute the thread https://github.com/notifications/unsubscribe-auth/AWWcXZ3xLy0xM35VX8-eTowHgmhN6srmks5q-YodgaJpZM4Kwu0X.

StrikeZW commented 7 years ago

i am sorry, but after a timeout, could be 300s) the programm stops with this panic

2016/11/15 15:10:12 Starting {{58288d7b764ff4e8098bc296 b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX 300} {http://localhost:8086 myhome default s}}

panic: reflect: call of reflect.Value.Interface on zero Value

goroutine 1 [running]: panic(0x76aae0, 0xc820386da0) /usr/lib/golang/src/runtime/panic.go:481 +0x3e6 reflect.valueInterface(0x0, 0x0, 0x0, 0x1, 0x0, 0x0) /usr/lib/golang/src/reflect/value.go:913 +0x7f reflect.Value.Interface(0x0, 0x0, 0x0, 0x0, 0x0) /usr/lib/golang/src/reflect/value.go:908 +0x48 github.com/exzz/netatmo-api-go.(*Device).Data(0xc8202f04d0, 0xc8203794d0, 0xc8200c5c98) /usr/local/go/src/github.com/exzz/netatmo-api-go/weather.go:229 +0x1f6 main.main() /usr/local/go/src/github.com/exzz/netatmo-collector-go/netatmo-collector.go:99 +0xbe7 [root@localhost bin]# [root@localhost bin]#

On 15 Nov 2016, at 15:10, Stefan Loewe sloewe@mac.com wrote:

i just so in den output, that there is a “0” where the intervall should be. my conf looks like this

[netatmo] clientID = "58288d7b764ff4e8098bc296" clientSecret = "b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX" username = “USERNAMEXX" password = “xxxPWxxx" fetchinterval = 300

[influxdb] url = "http://localhost:8086 http://localhost:8086/"

username = "INFLUXDB_USERNAME"

password = "INFLUXDB_PASSWORD"

database = "myhome" RetentionPolicy = "default" precision = “s"

after writing this conf again it seems to work

?!

kind regards Stefan

On 15 Nov 2016, at 14:58, Stefan Loewe <sloewe@mac.com mailto:sloewe@mac.com> wrote:

First of all, thanks for the passwort hint … i allready changed it

but i still recieve this error :

[root@localhost bin]# ./netatmo-collector-go -config /root/netatmogo.conf2016/11/15 14:56:50 Starting {{58288d7b764ff4e8098bc296 b3rUoI6dtU7KK19UeIBz3ZZTtZ1wDX USERNAMMEXX xxPWxxx 0} {http://localhost:8086 http://localhost:8086/ myhome default }} panic: non-positive interval for NewTicker

goroutine 1 [running]: panic(0x766e40, 0xc820382d90) /usr/lib/golang/src/runtime/panic.go:481 +0x3e6 time.NewTicker(0x0, 0x15) /usr/lib/golang/src/time/tick.go:23 +0xe4 main.main() /usr/local/go/src/github.com/exzz/netatmo-collector-go/netatmo-collector.go:74 http://github.com/exzz/netatmo-collector-go/netatmo-collector.go:74 +0x677 [root@localhost bin]#

kind regards Stefan

On 15 Nov 2016, at 11:31, Nicolas Leclercq <notifications@github.com mailto:notifications@github.com> wrote:

you still running the old binary - I have rename it to netatmo-collector Please run ./netatmo-collector -config /root/netatmogo.conf

BTW you just copy/paste your netatmo credential to a public page :-), I would consider changing your password and revoke your app credential as soon as possible

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/exzz/netatmo-collector-go/issues/1#issuecomment-260605810, or mute the thread https://github.com/notifications/unsubscribe-auth/AWWcXZ3xLy0xM35VX8-eTowHgmhN6srmks5q-YodgaJpZM4Kwu0X.

exzz commented 7 years ago

Do you have a Wind Station ?

I guest your configuration is somehow different from mine, would you please share with me your credential so I can try to debug that my side (my email is nicolas.private@gmail.com)