ronhks / panasonic-aquarea-smart-cloud-mqtt

MQTT transfer layer for Panasonic Smart Cloud platform for manage the Aquarea device
MIT License
29 stars 8 forks source link

armv7 crashes from time to time #5

Closed svillar closed 1 year ago

svillar commented 1 year ago

This is the most I could get

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x2795bc]

goroutine 1 [running]:
github.com/ronhks/panasonic-aquarea-smart-cloud-mqtt/src/data.GetDeviceData()
        /Users/ronhks/dev/src/git/github/ronhks/panasonic-aquarea-smart-cloud-mqtt/src/data/data.go:109 +0x124
main.getStatusData()
        /Users/ronhks/dev/src/git/github/ronhks/panasonic-aquarea-smart-cloud-mqtt/main.go:67 +0x2c
main.startQueryStatusData()
        /Users/ronhks/dev/src/git/github/ronhks/panasonic-aquarea-smart-cloud-mqtt/main.go:30 +0x24
main.startQueryStatusData()
        /Users/ronhks/dev/src/git/github/ronhks/panasonic-aquarea-smart-cloud-mqtt/main.go:40 +0xe8
main.main()
        /Users/ronhks/dev/src/git/github/ronhks/panasonic-aquarea-smart-cloud-mqtt/main.go:24 +0xd0
ronhks commented 1 year ago

Ohh, I will check it. Actually I have a huge load.

ronhks commented 1 year ago

Meanwhil beacuse this is a critial(Blocker) issue, I put error handling.

I created a new images (armv7 and arm64): https://hub.docker.com/repository/docker/ronhks/panasonic-aquarea-smart-cloud-mqtt

svillar commented 1 year ago

The problem is that now the image does not boot properly as I get a sequence of

INFO[0002] Login success                                
ERRO[0005] Empty response from Energy Conspumption API  
ERRO[0005] Error while get DeviceData     

I guess it's because you're now considering the absence of a response as an error condition.

ronhks commented 1 year ago

Hi Guys!

I fixed the problem. Sorry for inconveniences and thanks for your patience!

The new version available on dockerhub: https://hub.docker.com/repository/registry-1.docker.io/ronhks/panasonic-aquarea-smart-cloud-mqtt/general