But I can’t figure out how that should be setup in OH3. I’ve migrated my Items file but I guess the old HTTP binding is no longer supported.
The HTTP Binding Documentation doesn’t show examples of using the new GUI HTTP binding. After I fill out the form here is what the code page looks like.
It’s not working but I did find a problem after looking at the log of the ESPEasy.
If I manually send the command via the browser using http://192.168.2.61/control?cmd=GPIO,12,0
I see a different response than when I use the OH UI. Here is the ESP log the first HTTP was sent via the web browser. The OpenHAB UI is sending a / before the command.
ESPEasy is super easy to integrate with MQTT. ESPEasy even supports Homie now which openHAB can automatically discover, meaning you don’t have to create or configure the Things at all.
Sometimes it’s worth considering alternatives.
That definitely would be a problem but you can address that by including “control?cmd=” in the commandExtension instead of the baseURL.
When concatenating the baseURL and stateExtension or commandExtension the binding checks if a proper URL part separator (/, & or ?) is present and adds a / if missing.
So change to:
baseURL: http://192.168.2.56/control
and
commandExtension: ?cmd=GPIO,5,%2$s
I don’t think this will work as it doesn’t include one of the three quoted characters between the base and command URLs
No problem, I’m thinking about giving ESPHome a try now.
Have you ever used ESPEasy?
I’m curious, is one easier to use than the other for someone that’s not a programmer?
I only used ESPHome for a sensor I built of my own.
So unfortunately I cannot say if ESPEasy is easier
I selected ESPHome because it is able to do OTA-Updates and my Sensor is not near my computer.
As ESPEasy is not able to do that, I did not even tried it out.
Another alternative I would look at in your place, is TASMOTA
It is actively developed, has a huge userbase and many many examples here in the forums how to connect devices powered with it to openHAB.
For a simple lightswitch you should get online in minutes.