Control OpenHAB via Gnome Shell Linux / MacOS Menu Bar (Argos, BitBar)

Hi,

Argos is a cool extension for Gnome Shell that can be used to simply create your own extensions for the Linux Menu Bar. It is inspired by an MacOS equivalent called BitBar, I do not know BitBar, but I’m shure that all I describe now should work for BitBar as well.

Argos can be installed through the Gnome Shell Extensions Web Site: https://extensions.gnome.org/extension/1176/argos/

Here is my script for OpenHAB:

#!/usr/bin/env bash

echo "OpenHAB"
echo "---"
echo "Lights off | iconName=non-starred bash='curl -X POST --header \"Content-Type: text/plain\" --header \"Accept: application/json\" -d \"0\" \"http://192.168.1.100:8080/rest/items/LichtSchlafzimmer_1_Level\"' terminal=false"
echo "Lights dimmed | iconName=semi-starred bash='curl -X POST --header \"Content-Type: text/plain\" --header \"Accept: application/json\" -d \"10\" \"http://192.168.1.100:8080/rest/items/LichtSchlafzimmer_1_Level\"' terminal=false"
echo "Lights on | iconName=starred bash='curl -X POST --header \"Content-Type: text/plain\" --header \"Accept: application/json\" -d \"100\" \"http://192.168.1.100:8080/rest/items/LichtSchlafzimmer_1_Level\"' terminal=false"
echo "Rollershutter up | iconName=go-top bash='curl -X POST --header \"Content-Type: text/plain\" --header \"Accept: application/json\" -d \"0\" \"http://192.168.1.100:8080/rest/items/Jalousie_Schlafzimmer\"' terminal=false"
echo "Rollershutter down/open | iconName=go-up bash='curl -X POST --header \"Content-Type: text/plain\" --header \"Accept: application/json\" -d \"95\" \"http://192.168.1.100:8080/rest/items/Jalousie_Schlafzimmer\"' terminal=false"
echo "Rollershutter down/closed | iconName=go-bottom bash='curl -X POST --header \"Content-Type: text/plain\" --header \"Accept: application/json\" -d \"100\" \"http://192.168.1.100:8080/rest/items/Jalousie_Schlafzimmer\"' terminal=false"

It is also possible to use OpenHAB’s GET API to display item states in the menu.

6 Likes

Very cool idea 8-)!