Fixing the KLF-200 Velux not working with new blinders
Context
I've been using the KLF-200 io-homecontrol gateway for 4 years now, and have been super happy with it (see this article for more details).
I recently had to change a rolling shutter and chose to install a solar one to remove the wire that was going into my house.
Of course, I made sure to go for a Somfy motor, with the IO technology. I successfully added the shutter to the KLF-200 and my Domoticz setup, but after a few minutes, I noticed a lot of error messages in the Node-RED console, such as:
Velux API Error: klf-200 not connected
Velux Error: Can't get scene list
at .node-red/node_modules/velux-klf200/lib/scenes.js:60:25
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Fixing it
I initially thought that I misconfigured Node-RED, as I had to remove the old shutter and add the new one, I must had made a mistake somewhere. I checked everything plenty of times, to no luck.
Then after a while, I realised that the node-red-contrib-velux Node was fairly old, so maybe there was something new with this more recent shutter that was breaking it?
- I ran
npm outdated
and saw that while the Latest version was 0.0.8, the Wanted version was still 0.0.4 - which was the one I was running, so could not update. - I updated my
package.json
and change the line with ""node-red-contrib-velux": "^0.0.4" - Then I ran
npm update --save
which updated to 0.8.0 - After a restart of nodered, I was back in business: the error messages were gone, and I could see the gateway receiving messages from the MQTT broker!
Once again, always come back to the basics
After I had made sure that I did the exact same things as before, and restarted the Node-RED and Mosquitto services on my FreeBSD Jail, I looked one by one at the other components I was using, and surely enough, node-red-contrib-velux was one of the key ones, so upgrading it made sense.
Granted, I don't exactly know what changed and how it was fixed (the magic of black boxes, in that case the Velux gateway :(), but it is working again at least - hopefully this is helpful to others!
Confirming how to add new products
When I initially set up the shutters, I was not entirely sure which combination of keys I had to do, so I took advantage of having to do it all again to confirm.
And in fact it's very simple:
- You just need to press the "PROG" button on the back of the Smoove IO remote for a few seconds until the shutter moves up and down quickly,
- then on the KLF-200, search for new products
- after 20 to 30 seconds, it will show you the new shutter, and voilĂ !
Tags: Automation