Closed terafin closed 8 months ago
Note, post reboot:
Alias tip: _ nmap -sT -p- 10.0.90.191
Starting Nmap 7.80 ( https://nmap.org ) at 2024-02-25 12:56 PST
Nmap scan report for velux.XXXXXXX (10.0.90.191)
Host is up (0.00038s latency).
Not shown: 65532 closed ports
PORT STATE SERVICE
1900/tcp filtered upnp
51200/tcp open unknown
60000/tcp filtered unknown
The KLF-200 closes the port after 15 minutes of inactivity. You could call gateway.getStateAsync()
of the gateway e.g. every 5 minutes to keep up the connection.
The KLF-200 also doesn't like to be flooded with parallel requests. Instead, queue your requests and run one after the other.
The KLF-200 in itself is a little bit unstable. Think about rebooting it on a regular basis, e.g. during the night when it's not in use.
See https://github.com/MiSchroe/ioBroker.klf200 as a reference how this library is used successfully.
Thanks so much for the pointers! I guess I'll have to do an auto reboot when I restart the docker container for it, or it detects it's dropped connection. :)
Thank you so much for this library!
Not sure this is an issue with the code here, but I've noticed I'm not able to connect to the KLF-200 unit after a while until rebooting it. (port 51200 is closed)
Has anyone observed this behavior?
Note: You can see my connect usage of your library here: https://github.com/terafin/mqtt-velux-bridge/blob/a0c044d6ca3b8a5450fe07b2ebf313e977b5d333/index.js#L108
Aside: Should I be using the cert/fingerprint instead? (Why one vs the other?)