2 Node Setup for Visual Studio Code

I love how VS Code works.
The only drawback I am experiencing is that my productive node, when VSC is attached, get totally instable.
The rules are not firing reliable, and evrything slowed down, even when I detach VSC.

I am running a RPi3 on production. My idea is to install another RPi* in paralell and map (nfs) particular directories from production to the shadow language server node. I am even thinking to have an openhab instance on my MAC and map the directories of production. This would for sure make the language server more responsive and relieve the production RPi server.

Would that work, which directories I have to map?

I see the same and thought what you post here. Very interested in a solution.

1 Like

I actually thought of something similar while driving this morning. If you want full access to everything you will need all your Things, Items, and Rules mapped to the LSP instance of OH. You shouldn’t need any bindings installed nor transforms or persistence to make this work.

Probably the easiest thing to do would be to map your /etc/openhab2 and your /var/lib/openhab2/jsondb folders.

Give it a try and let us know how it goes.

I am on business trip, and do not want to leave my without lights and other stuff (happened in the past, e.g, never touch a running system when wife is at home and you are thousand miles away). On the weekend I will try and give feedback.

1 Like

I this not too much?
how do I prevent that these 2 nodes step on each other foots?
I mounted nfs the /var/lib/openhab2/jsondb as RO just in case
I have seen that the rules have been loaded on the shadow node and all things gone ONLINE.
Even the sitemap is loaded and the node is fully functional.

that gives a weird feeling

Would it be enough to uninstall the binding in the shadow node paper ui

I uninstalled all bindings, which were installed before mapping the NFS shares. Now the shadow node is not messing with existing stuff, channels are now uninitialized.
good.
I connected the VSC to the shadow node and things seem to function: pro node cpu load is low, cpu shadow node is going up while editing rules.

Though what I realized is the the VSC is still very slow:


Not as slow as before, but expecting more. I have installed the sahdow on a rock64 with 4GB memory.

Conclusion:
IT WORKS!!!

2 Likes

I can confirm that this setup is working.

1 Like