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: