Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Planning for openHAB 5 #1693

Open
holgerfriedrich opened this issue Oct 21, 2024 · 16 comments
Open

Feature Planning for openHAB 5 #1693

holgerfriedrich opened this issue Oct 21, 2024 · 16 comments

Comments

@holgerfriedrich
Copy link
Member

holgerfriedrich commented Oct 21, 2024

(Incomplete) Development Plan for openHAB 5

see project:
https://github.com/orgs/openhab/projects/11/views/1

Background

There has been a long discussion in #1689 regarding the rollout of Java 21 and the end of life of 32-bit systems. To cut a long story short, Java 21 and the EOL for 32-bit systems should be coupled with next major release, OH 5. A possible timeline is not aligned yet (and should depend on the progress on the items listed above). The earliest possible date is summer 2025 (derived from the progress on the user visible feature "support Matter").

Let's use the list above as a starting point for a discussion. It is for sure incomplete - please comment, and I will update the list. Maybe you have features in mind that could be a selling point for our OH 5 release.

@wborn
Copy link
Member

wborn commented Oct 26, 2024

We could also create issues for everything instead of maintaining the list here and add them to a project: https://github.com/orgs/openhab/projects

@holgerfriedrich
Copy link
Member Author

@wborn I created a project containing the items mentioned above.
https://github.com/orgs/openhab/projects/11/views/1
I misused items as heading to give it some structure. Can you please check if the order is reasonable when you view it?
Another idea would be using custom OH5xxxx tags.
WDYT?

@lsiepel
Copy link
Contributor

lsiepel commented Nov 5, 2024

If i'm not mistaken, it would also be possible to upgrade Graal from 22.0.2 (three year old by then) to 24.x
https://github.com/openhab/openhab-addons/blob/16e1c64bec098bfe2106a9ea3abe6957b4b444c0/bundles/org.openhab.automation.jsscripting/pom.xml#L25

Nevermind: i see it is already on the list ;-)

@florian-h05
Copy link
Contributor

@lsiepel See openhab/openhab-addons#17720 for the GraalJS upgrade.

@florian-h05
Copy link
Contributor

I just updated the project and added some functional and visible features.

@holgerfriedrich
Copy link
Member Author

Thanks, @florian-h05!

@holgerfriedrich
Copy link
Member Author

Ping @openhab/maintainers, you are welcome to join a discussion and provide your thoughts on OH5 planning!
Not sure if everybody can edit the project https://github.com/orgs/openhab/projects/11/views/1. Feel free to add your comments to this issue.

@miloit
Copy link

miloit commented Nov 29, 2024

It would be nice to also have the possibility of an esp32s3 running as voice satellite for the openhab voice recognition

@lsiepel
Copy link
Contributor

lsiepel commented Nov 30, 2024

Currently working on a Z-Wave JS integration and i hope it is ready for openHAB 5, no promise though. I think it would be a great alternative for our zwave implementation.

@florian-h05
Copy link
Contributor

It would be nice to also have the possibility of an esp32s3 running as voice satellite for the openhab voice recognition

Not sure what would be required for that, but I think openhab/openhab-core#4032 which is needed for voice assistant functionality in the UI would be important for that as well. WDYT?

Currently working on a Z-Wave JS integration and i hope it is ready for openHAB 5, no promise though.

Do you want to create an issue for that and add to the openHAB 5 feature planning project?

@miloit
Copy link

miloit commented Nov 30, 2024

Here is a real basic MVP, but it's running. I am not a programmer so if someone has better idea please up to you

Esp32 code
`
#include <WiFi.h>
#include <driver/i2s.h>

// Wi-Fi credentials
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
const int port = 12345;

// I2S configuration
#define I2S_WS 25 // Word Select (LRCLK)
#define I2S_SD 26 // Serial Data (DOUT)
#define I2S_SCK 27 // Serial Clock (BCLK)

void setup() {
Serial.begin(115200);

// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");

// Configure I2S
i2s_config_t i2s_config = {
.mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX),
.sample_rate = 44100, // Sample rate
.bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,
.channel_format = I2S_CHANNEL_FMT_ONLY_LEFT,
.communication_format = I2S_COMM_FORMAT_I2S,
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1, // Interrupt level 1
.dma_buf_count = 8,
.dma_buf_len = 512,
.use_apll = false
};

i2s_pin_config_t pin_config = {
.bck_io_num = I2S_SCK,
.ws_io_num = I2S_WS,
.data_out_num = I2S_PIN_NO_CHANGE,
.data_in_num = I2S_SD
};

i2s_driver_install(I2S_NUM_0, &i2s_config, 0, NULL);
i2s_set_pin(I2S_NUM_0, &pin_config);
}

void loop() {
WiFiClient client = WiFiServer(port).available();

if (client) {
Serial.println("Client connected");
uint8_t buffer[512];
size_t bytes_read;

while (client.connected()) {
  i2s_read(I2S_NUM_0, buffer, sizeof(buffer), &bytes_read, portMAX_DELAY);
  if (bytes_read > 0) {
    client.write(buffer, bytes_read);
  }
}

client.stop();
Serial.println("Client disconnected");

}
}
`

Java Programm

`
import javax.sound.sampled.*;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class AudioReceiver {
private static final int PORT = 12345;
private static final int BUFFER_SIZE = 512;

public static void main(String[] args) {
    try (ServerSocket serverSocket = new ServerSocket(PORT)) {
        System.out.println("Listening for connections on port " + PORT);
        Socket socket = serverSocket.accept();
        System.out.println("Client connected");

        // Audio format: 44.1kHz, 16-bit, mono, signed, big-endian
        AudioFormat format = new AudioFormat(44100, 16, 1, true, true);
        DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
        SourceDataLine audioLine = (SourceDataLine) AudioSystem.getLine(info);
        audioLine.open(format);
        audioLine.start();

        InputStream input = new BufferedInputStream(socket.getInputStream());
        byte[] buffer = new byte[BUFFER_SIZE];

        int bytesRead;
        while ((bytesRead = input.read(buffer)) != -1) {
            audioLine.write(buffer, 0, bytesRead);
        }

        audioLine.drain();
        audioLine.close();
        socket.close();
        System.out.println("Connection closed");

    } catch (Exception e) {
        e.printStackTrace();
    }
}

}
`

Basically a websocket port is necessary for the audio sink

Also an idea you can look it up on rhasspy
https://github.com/Romkabouter/ESP32-Rhasspy-Satellite
And
https://github.com/rhasspy/rhasspy

@miloit
Copy link

miloit commented Nov 30, 2024

Another nice feature will be also this

openhab/openhab-webui#2884

and this

openhab/openhab-webui#2151

@lolodomo
Copy link
Contributor

@holgerfriedrich : is this topic for everybody over the world asks what he would like in OH 5 ?!

@holgerfriedrich
Copy link
Member Author

@lolodomo I tend to say yes, partly - especially if we get suggestions from regular contributors. Initially this was more intended for the maintainers. As we use the "project" linked in the post, there is no way to comment there.
The project itself should be editable by maintainers and visible to everybody.

Though, my recommendation is to focus on key features and main selling points in this issue. Topics should be mentioned here in the comments if considered relevant as key feature or selling point. Discussions and implementation details should be separated out in new issues - otherwise we will see too much traffic here and everybody removes the subscription for this planning issue.

The general wishlist discussion for future releases should be discussed in the community forum.

Just my 2 cents.

@mstormi
Copy link
Contributor

mstormi commented Nov 30, 2024

Github is for OH contributors ONLY, the policy can be read just below my post.
That is, developers and maintainers ONLY, not OH users or even anybody.

@miloit please cease and move over to the forum.

@lsiepel
Copy link
Contributor

lsiepel commented Nov 30, 2024

Github is for OH contributors ONLY, the policy can be read just below my post. That is, developers and maintainers ONLY, not OH users or even anybody.

@miloit please cease and move over to the forum.

While i would prefer to state it a little different, i agree this issue should be about key features and not lengthy code sharing and issue picking.

PS: @miloit is a long term contributor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants