Overview:
This driver is intended 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
Play panel's built-in sounds upon command
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.
Go to the device's Preferences section and enter the Panel's IP/Hostname BUT DO NOT SAVE YET (OPTIONAL: You can also pre-set the Refresh Rate and other Preferences)
On the panel itself, go to Device Settings then About.
Tap the Name label (on the left, so it does not trigger renaming the device) 7 times until you see the "Allowed to generate gateway access token" message popup on the panel
Go back to the device's Preferences on the Hubitat screen and Save Preferences
Caveat(s) / Known Issue(s):
Only minimal functionality at this point. Primarily allowing the built-in sounds to be controlled.
Refresh Rate is pretty much pointless because there is nothing it currently polls from the panel. Checks for new child devices (not that it does anything with them yet) and the overall panel info are done as part of the DailyCheck because they should not change that frequently.
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.
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.
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.
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.
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:
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.
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.
Heh, a 2025 item... No, I have not done anything more with it really. It sat at the side running all this time but never really took over for my tablet running HD+ so I basically forgot about it. Looking back though I am surprised I never even published the basic one that allowed controlling the sounds.
I guess I should dust it off and take another look over time. In the meantime, I will get my current driver posted. I picked it up and am letting it do updates. I will confirm the stuff I had working before still works, then get the driver published.
NSPanelProAPI.groovy - Initial version now posted in original thread message
INITAL FEATURES:
Can play the various built-in sounds that the panel is capable of
Can get some basic panel info
Will check my website daily for any driver update and post notice if there is one
NOTE(S):
This is initially being posted with the NS Panel Pro at firmware version 3.7.0. Back when I first started creating the driver so long ago... things worked a bit differently (and this driver did not work after I updated). So there is a chance that future firmware could break it. If such issues are found they will be worked through and posted.
The driver is designed for the SONOFF NSPanel Pro which I personally have and can try out functions with.
It should work with the SONOFF NSPanel Pro 120 as this appears to be a newer, larger, more advanced version of the Pro. The official page does list the Open API as well (this is an edit, as when I checked originally I did not see it/find it, but when I rechecked a minute ago I saw it and discovered it is an image, which is why Find did not show it).
I have no idea if it would work with the SONOFF NSPanel. It certainly will not understand the buttons (if it works at all) as the API does not cover them (probably because the API was created specific to the NSPanel Pro which lacks them. The itead.cc product page does not mention an API (but it does not for the NSPanel Pro either).