Send command to serial port and receive a answer

I checked a tutorial and found that there is a support for rule programing in Visual Studio?
If yes, how it’s working ? I have good experience with VS

VS Code (not VS) is just a convenience tool to edit files.
It can be used with text based xxx.rules files, which can be in a variety of languages.

You can’t/don’t use VSC with rules (in a variety of rules languages) entered in openHABs GUI.

You’re going to have to choose both a rules management systsm (files or GUI) and a rules language.
I would advise against “beginners” GUI-only Blockly for now, because it can’t really deal with your technical hex/binary requirement and you’d end up working in javascript anyway.

If it were me I’d be doing rules in files using DSL language - but that’s only because I’ve done it that way since before there were choices. It’s now considered old-fashioned, and many users use Jython or javascript via GUI.

ok, javascript isn’t in the option :

Ok, I don’t have all this options. How to enable? Install some components?

ok, I’m able connect via putty. Problem was that I’m using DietPi system.


is possible use a dietpi-config to install necessary components to get working javascript for rules ?
actual:

no.
You need to install those via settings binding as an admin of OH.
I would assume that ECMA ( Javascript ) and DSL rule support is already there.
Denominator on top installed support for Groovy and Python.

1 Like

But I don’t have a java as option :

Looks like this Scripting languages missing from UI rule editor is your problem. OH3 requires Java 11 not Java 8

1 Like

So I have version 17? Must make a downgrade ?

1 Like

As far as I understand this Add support for running openHAB with Java 17 · Issue #1316 · openhab/openhab-distro · GitHub - yes.
In case you would like to stay with Java 17 installing JSScripting binding should provide an alternative.

It unfortunately doesn‘t for now.
I am not sure whether UI rules work, but file based rules do not work as they are not loaded or reloaded.

so what’s a easiest way to solve a issue ? I’m not so experienced, so help is welcome

I would recommend downgrading to Java 11, as this is officially supported by openHAB.
AFAIK, Java 17 is not supported yet.

If you need help downgrading to Java 11, feel free to ask for help.

Any guide for newby would by very helpful.
I’m running OH 3 on the DietPi.

In case you are going to go for zulu you can find detailed description here: Install Azul Zulu on Debian-based Linux

I‘m not sure if that works, the Azul Zulu APT repos only support x86 and arm64, but it‘s likely that the OS of the Pi is armhf.
You can manually download the armhf builds as .tar.gz, but I would give OpenJDK 11 a try (for me it works without any problems and openHABian switched to OpenJDK for new installs as well).

@alda1 You can install OpenJDK 11 with sudo apt install openjdk-11-jdk.
It might be possible that you have to configure the default Java version/JDK, this can be done using sudo update-alternatives --config java, select something with openjdk 11.

1 Like

Screenshot in this post ( 59 ) above shows it is aarch64 ( which is arm64 ) architecture.

So only to be sure :
first : sudo apt install openjdk-11-jdk
second : sudo update-alternatives --config java
That’s all to get working ? Once more - not sure if there is any influence, I have DietPi system.

On a different SD card install openHABian and see if that works.

2 Likes