[PROJECT] SONOFF NSPanel Pro API Driver

Overview:
This driver is INTENDED (it is not yet available, see caveats) to provide basic access to a SONOFF NSPanel Pro's API. The goal is to allow Hubitat to incorporate what information the panel has available as well as allow for some control (as possible/feasible).

Features:

  • Check for devices connected to the panel
  • Allow commands to control some panel functions such as brightness, whether the panel screen is on, and play various sounds through the panel speaker
  • Daily check for new driver versions. It will NOT load updated drivers, just post an event that a newer version is available.

Driver Links:

  • NSPanelPro.groovy UNPLUBLISHED - The driver that runs everything

Setup:

  1. Add NSPanelPro.groovy driver to your Drivers Code section on your Hubitat (you can Import using the URLs above) then Save the driver.
  2. Add a Virtual device and set the Type to be NSPanelPro (user-added drivers are going to be at the bottom of the list), then Save Device.
  3. Enter your Panel's IP/Hostname into the respective field then Save Preferences.

Caveat(s) / Known Issue(s):

  • No published driver yet as I am waiting for my actual panel to arrive. All driver code I have already written has been based off what the API examples cover and the hope that those actually prove accurate once I have the device itself in hand and functioning.
4 Likes

This will be a great addition to Hubitat!

Is it a local or cloud API?

As we speak, I am in a middle of setting up ESPHome on a regular NSPanel (not a Pro).
The capability of this project is enormous but I will be using less than 10% of potentials.
My whole idea is to create some sort of Scene Controler with only 6-8 Buttons with
ability to label them electronically. I.e each Button will have an appropriate Icon and
Label. It will be a replacement for the ZEN32 panels which are doing nice job but labeling
Buttons is next to impossible. So far do good. One panel already running ESPHome and
integrated with HE via HA+HADB. Next step should be easy enough to add Labels and
Icons for each Button.

I also played with NSPanel Pro. It could be easely hacked to run plain Android. After that
it is possible to run Android based Dashboards. This was working just fine but I didn't like
a Pro version first, because of shape and second - it. does not have any relays. The original
one actually has two relays and two physical button which could be used either completely
independently or physical buttons can control relays.

So, Pro ver SD ion will be returned but regular one is my choice for highly customizable
Scene Controller with two relays.

Happy New Year!

The API is local to the panel itself, which is why I was willing to get one I found on sale. Plus it has an optional desktop mounting stand that did not look too bad and was cheap, so I will not have to put it on a wall.

1 Like

I saw the standard one also... but that did not appear to have an API. I REALLY do not need any more switches, relays, or anything of the sort. But, something with a display is always interesting (do not even get me started on some PAST projects I have taken part in). The Pro display looked a bit larger and the ability to be able to directly interact with it right from the Hubitat was interesting to me.

I have a bunch of ESP-related (ESP8266 mostly) devices that I wrote simple code for and then Hubitat drivers, mostly for Christmas light pixel-related projects. But I have not had much interest in ESPHome.

In opposite, I was looking for something which could go right into the existing switch box.
Pro will be difficult to mount but regular is designed for wall mounting application.

1 Like

So my and yours requirements are very different. As I mentioned, I am interested in wall
mounted Scene Controller like ZEN32 but with ability to easy add custom Icons and Labels.
Regular NSPanel is exactly what I need. Setup is a bit tricky but it worth it. And control of
course, is 100% local. This is an absolute must.

1 Like

I am looking for something similar. Let me know if I could shadow your implementation.

Please be aware, the project is DIY and requires some learning and effort to implement it.
But in my opinion, the result is very nice and definitely worth it. I already almost configured
one NSPanel for replacing ZEN32 in the Living Room and already ordered second panel.
(At this time I will need only two panels.)
Here is a link to the project:

And here is a link to the NSPanel (from Walmart):
https://www.walmart.com/ip/SONOFF-NSPanel-Smart-Switch-Thermostat-Function-2-Switch-Panel-Home-Control-Touchscreen-Control-Work-Alexa-Google-Assistant/2455899511

In addition you will need a running version of Home Assistant. And for the integration with
HE you will nee Home Assistant Device Bridge. On the Home Assistant I created a bunch of
Virtual Switches (number depend on a desired number of buttons). The same Virtual Switch
instance is used to Display a Button on the NSPanel and as a Switch to be used in the
HE RM Rules. NSPanel has two built-in relays and two physical buttons. All they are accessible
from HE RM.
After I finish panel configuration for the Living Room I will post few pictures.

Might be better to start a separate project thread and detail it there for people that are interested in following along with you on that.

I guess, you are 100% right.

Especially with the HA portion, I know there are a lot of people that use a combination of both systems so that might catch some people. Plus it always seems like people are looking for more ways to display their information at a glance so that would catch attention as well.

1 Like

@snell Thanks for sharing. How's your experiment and any driver?

I got some basics running so I need to remember to post at least the initial version soon. That way people can at least have it make noises at them.