[SOLVED] Work on .rules remote

Any tutorial to work remote in OH2 (RPI) in order to edit .rules etc?

Are you currently using VSCode to edit your OH files?

Exactly.

I’m not aware of a way to have the LSP feature work remotely but you can save a copy your rules file and edit remotely then just replace the existing rule with your edited one once your locally connected.

I’ve done that before. But now I would like to find a way to work remotely…

Just mount the conf folder to your local PC and open this folder in VSC. LSP address shold be then the ip-address of you PI or the DNS name if there is one.

This is working if I’m in local network.
But how to work remotely?

Ah, then you need a vpn connection to acces local conf-share.

Just copy the config folder to your local machine and work on them.
You then can use e.g. a cloud service to sync them with your openhab instance or just copy them when you are at home :slight_smile: .

I’ve found a very good solution (15 minutes to implement) to work remotely with Openhab (RPI), editing all OH2 files from my laptop or my phone:

  1. install RealVNC (server + viewer) on Raspberry Pi
  2. instal RealVNC (viewer) on laptop (or Android smartphone).
  3. install Visual Studio Code on Raspberry Pi
  4. create a free account on RealVNC.com
  5. open RealVNC on laptop / smartphone, then login to RealVNC and connect Raspberry Pi.

That way, you can edit .rules and all other files from Openhab using Visual Studio Code from everywhere (internet, intranet).

An alternative solution is to set up a special OH instance whose only job is to provide the LSP function locally.

You put a copy of your configs on your local machine and start up a minimally configured OH using those configs. I’m not sure if you have to install all the bindings you are using or not. I think you can just leave a minimally installed OH.

Then point your VSC to localhost and it can access this minimally configured OH’s LSP to check syntax as you go. When you are done, copy (git, scp, what ever you use) the configs from your local machine to your OH server machine.

1 Like

I’m stucked on installing RealVNC.

How did you manage to put your cloud credential on the raspberry?
I can’t find a way to do it via the command line