Bridge between NSPanel with Lovelace UI and openHAB

Hi Guys,

I just want to introduce my GitHub project to connect a Sonoff NSPanel with lovelace UI to openHAB.
The project implements a python mqtt client which is bridging the panel mqtt messages to openHAB items:

You can configer the content in the panel over yaml files similar to the openhab UI.
The bridge is running as systemd service in linux. For example in openhabian.

All details in the GitHub GitHub - olialb/nspanelMqttBridge: Bridges MQTT messages from NSPanel with lovelace UI to openHAB · GitHub

I know there are other ways to connect such an NSPanel but they looked for me not flexble enough or it was complicated for me to get it running.

I just published the first versions. Some cards of the panel UI pages needs to be added in future releases (popupTimer,???). But the most important once are fully supported already.

If anyone is interessted to give my bridge a try I would be happy to get some feedback.

I need to appologize!!

I hope nobody tried it in the last days and was frustrated because the installation process failed.

I missed to update some naming after the last pylint runs. I relazied this today morning.
Its fixed in release V0.6

Just release V0.7 with support of chartCards:

simple example for a number chart:

  - name: PowerChart
    title: Stromverbrauch
    type: cardChart
    slots:
      - class: ohItem
        type: number
        item: Stromzaehler_power

The y axis label is used to show the maximum and minimum values during the period. The minimum value in the chart is scaled that 0 on the y axis is equivalent to the minimum value in the defined period. The labels on the x axis show the start and end of the defined period. The date and time is formated dependant on the language you specified in the ini file.

Another example for a chart with the states of a Switch item:

  - name: StateChart
    title: Küchenlicht
    type: cardChart
    period: d
    past: w
    color: yellow
    slots:
      - class: ohItem
        type: switch
        item: Switch_Kueche

You can see how long the kitchen light where active on the same day as today one week ago.

Additionally group items are generally supported now if they have an item type assigned

New release V0.8 with notification cards:

and cardGrid2 with 2x4 slot format added:

You can also control the font and icon size now in the cards which support this feature.
Date in screensaver is improved for different languages
Issue fixed in cardChart when no persistance data is available for the selected period

Feel free to raise issues on github!

V0.9: Now also cardPower is supported including control of the animation speed:

Aditionally sceensaver2 is inlcuded with much more wather slots and 5 extra item slots:

I see 2 issues with sceensaver2 implamentation in lovelace UI:

  • When you use AM/PM time the AM/PM text is shown over the last time diget
  • If you click on one of the 5 additonal buttons, the button event is send twice from the panel. That means also the items are toggeled twice. I need to investigate that further.

V0.10: With this release is now also the cardMedia supported:

  • New: You can define now all icons and icon colors dependant on the item state. The attribute iconStateColor which existed only for switch and light types is replaced by this more generic way of defining the icon and iconcolors
  • An issue with simple option lists in openHAB like A,B,C is fixed.
  • Each connected Panels gets now a reset command when the bridge is started

Addtionally I made some tests ith this fork of lovelace UI: ioBroker.nspanel-lovelace-ui. Seams that most of the cards are compatible. But its more experimental.
If you install on of the last versions of this HMI on your panel the bridge detect an HIM version >= 60 and behaves a bit different:

  • The ppoupNotify has 3 instead of 3 buttons.
  • You can also use cardGrid3 with a 2x2 slot design:

I hope you have fun with the new features.
Raise issues if you find something does not work like expected.