Recently I have had big problems with “Visaul Studio Code”. The openHAB extension always crashes my “openHAB 2.5.2” or “openHAB 2.5.3”, no matter from which computer I edit rules.
SMB 1.0 / CIFS in Windows 10 is activated.
“\ openhab \ openHAB-conf” is connected to Windows and “VSCode” as a network drive
LSP in “openHAB” is configured on port 5007 and 5007 is additionally released in the firewall, nevertheless the crash happens even if fireawall and virus scanner are completely deactivated!
I have a “settings.json” in C: \ Users \ User \ AppData \ Roaming \ Code \ User \ settings.json and another one in \ openhab \ openHAB-conf \ .vscode \ settings.json
If I call a rule in VSCode and hold the mouse over an ITEM, the status is displayed to me. After a few seconds the display changes to “loading” and “openHAB” has hung up!
With PuTTY you can still connect to openhabian and access “\ openhab \ openHAB-conf” in Windows Explorer
The ITEMS can no longer be switched, nor can the openhab Web GUI and Karaf be called up. OpenHAB cannot be restarted! It crashed completely, you have to restart the Raspberry with “sudo shutdown -r 0”!
Does anyone have any idea what my problem could be?
Ok i have looked at your gif now on my pc with a bigger screen.
Is it possible that the “sendCommand” method is on the same line as the “then” of your rule?!
This should be a mistake at first.
I will have to chekc if that causes errors in the hover provider of the vscode extension.
Anyways you can do me a favor and provide some more informations:
First you could open the developer tools and clear the console interface and do a hover again.
Also you could provide me this log via personal message, to get an impression of whats going on inside the extension.
There is a save log menu when you right click in the console output of developer tools.
The problem has been solved with a deeper search via pm. @Steinspiel will give the results back as feedback here.
Thanks from my side for the constructive path for finding the solution here together.
Also thanks in advance for working up the results and possibly help others in the future.
However, I no longer use this line of code, @Confectrician advised me to use virtual Items + Cronjobs to control the time, which IMO is much easier and clearer.
What i found interesting here, is that openHAB itself seems to handle this “mistake” properly
while remote LSP went crazy on trying to check those statements and even caused openHAB to crash.
Just a great example of how difficult problem solution can be on such a such a flexible system like openHAB.