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:
4 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!

What is the big difference between openHASP and sieren / Homepoint?

I haven’t used Homepoint myself but from the information provided the main differences seem to be:

  • openHASP has support for over a dozen devices and Homepoint supports 4.
  • The Homepoint 3 by 2 layout seems fixed while openHASP is completely configurable
  • Homepoint currently does not use LVGL (v2.0 is in beta)
  • Less development activity on the Homepoint Github repo

Last week a YouTube channel posted a great overview of openHASP on the Lanbon L8 device.
The video showcases what can be done in openHASP and why:

1 Like

@fvanroie, thank you very much for explanation

1 Like

I’m happy to announce the release of openHASP 0.6.3. Please check out the release notes for the notable changes. It includes quite a list of improvements, new features and bug fixes. Most notably is the support for binary and TrueType fonts from slash.

We can now also be found on www.openhasp.com and you can install the firmware using the openHASP Web Installer.

3 Likes

I’m grateful to have found that openHASP is included in lvgl builds of tasmota, a.k.a. haspmota. Tasmota has come leaps and bounds since I first saw it, simple web installer, build custom versions using online tools to get just what you need (tasmocompiler or the official gitpod for tasmota).

openHASP and haspmota are two different projects. So the statement that openHASP is included in Tasmota is not accurate…

Rather, Tasmota has adopted the openHASP jsonl file format to describe widgets on the screen. The feature was inspired by openHASP, but the way they go about it (using Berry) is totally different.

In short, openHASP is not Tasmota+haspmota, or vice-versa.

1 Like

Think I got you, so the templating is using the openHASP json format. The json template and extra functions/script etc are interpretted through haspmota / berry / tasmota bindings.

Theoretically could I reuse an existing openHASP jsonL template and just redo the bindings / interactivity? I wanted to find or provide existing examples of CO2/particle sensor etc.