openHASP - MQTT Touchscreen / Scene controller

Today we released version 0.6.0 of openHASP, an opensource firmware for Home-Automation SwitchPlates. It uses LVGL as GUI front-end and MQTT to send & receive commands and events. The firmware only contains a basic UI to setup the WiFi connection because the user is expected to upload his own page layouts.

Pages and objects can be defined using the jsonl (JSON lines) format and the parameters are interpreted on the fly. This allows the user a great degree of flexibility in designing a peronal layout. One page definition might look something like this:

{"page":2,"id":2,"obj":"arc","x":10,"y":70,"w":220,"h":220,"min":180,"max":250,"border_side":0,"type":0,"rotation":0,"start_angle":135,"end_angle":45,"start_angle1":135,"end_angle1":45,"value_font":32,"value_color":"#2C3E50","adjustable":"true"}
{"page":2,"id":3,"obj":"obj","x":40,"y":100,"w":160,"h":160,"radius":100,"opacity":100,"border_opa":160,"border_width":4,"comment":"touch-catcher"}
{"page":2,"id":4,"obj":"label","x":10,"y":40,"w":220,"h":30,"text":"Kívánt hőmérséklet:","align":1,"padh":50}
{"page":2,"id":5,"obj":"dropdown","x":75,"y":235,"w":90,"h":30,"options":""}
{"page":2,"id":6,"obj":"btn","x":50,"y":160,"w":40,"h":40,"toggle":false,"text":"\uE374","text_font":32,"align":1}
{"page":2,"id":7,"obj":"btn","x":150,"y":160,"w":40,"h":40,"toggle":false,"text":"\uE415","text_font":32,"align":1}
{"page":2,"id":8,"obj":"label","x":60,"y":115,"w":120,"h":30,"text":"Status","align":1,"padh":50}

All objects can have standardized event handlers that communicate the state over MQTT, making it easy to integrate the device in a Home-Automation system like Home Assistant, openHAB or nodeRED. But objects can also be grouped with local GPIO’s, such as relays or a dimmer, to interact with lights and switches.

There are pre-compiled binaries for 10 supported hardware devices and configuration files for many more in the platformio project…

We are also developing an Home Assistant custom component to make the device discoverable on the network and integrate seamlessly in your Home Assistant automations.

  • Some user created layouts:

  • A demo video of openHASP running on the Lanbon L8 switch:
3 Likes

It’s very nice :star_struck:

1 Like

Wow, that’s amazing!

The second image is Hungarian. (I’m from Hungary) :slight_smile:

1 Like

Thanks. We have users in multiple countries including a few Hungarians too. :slight_smile: The web UI and debug messages also have internationalization options when you compile the firmware yourself.

The most challenging task is to make objects and properties non-static (except the screens) and allocate/free the memory dynamically. Users can create, read, update and delete objects on the fly.

Besides MQTT, you can also use the serial & telnet console interface to interact with the objects directly, like:

$> p2b4.text=Hello World!      // sets the text property of object id 4 of page 2
1 Like

That’s great! I wonder how/where could we advertise your project. As it’s open-source I think it’s worth writing to hackaday.io. When there were posts there about LVGL there were 10 times more user on our site than usual.

It’d great to have an introduction post about it on blog.lvgl.io. If you are interested in I shared it on LVGL’s LinkedIn channel.

Hackaday has come up before but we’ve opted for a lower key announcement pace instead of big bang :slight_smile:. v0.6 is our first release that ties everything together in a workable package. We’re still considering it a pre-release though with the foreseeable kinks. Most likely Hackaday will be reserved for a big 1.0 announcement.

We are present on the Home Assistant community forum and now here too. I hadn’t considered the lvgl blog but it seems like a good place for a write-up. I’ll have a look if I can come up with an article that you can use…

Sounds like a good plan! :slight_smile:

Great, thank you in advance!