HOW TO - Home Assistant on the NSPanel Pro (Fully Local)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in today's video we're going to be having  a look at how to set up home assistant on   the NS panel Pro for a full and local  home assistant experience check it out [Music]   what's going on guys I hope you're all doing  well first things first I want to just clear   up a couple of things the method that we're  going to be using for putting home assistant   onto the NS panel Pro today is the method that's  been provided by the legend that is Blackadder   if videos really aren't your thing then you  can find an excellent written guide over at   blackadders blog and I'll leave a link to that in  the description below next and again just to kind   of clear this one up we're not actually installing  home assistant physically on the NS panel Pro what   we're actually doing is just side loading the  Android companion app onto it and this allows   us to connect to our existing home assistant and  control our dashboards and view all of our other   bits so home assistant doesn't actually install  on it it's just the companion app the final thing   to point out here is you need to have your NS  panel Pro plugged in throughout the process of   this install and you need to have run through the  sonoff setup in order to actually get the device   connected to your Wi-Fi with the installation that  we're doing today it's going to be fully Wireless   and there's going to be no device disassembly  or any kind of sold room required so with that   said let's get straight into it the first thing  we're going to need to do is to download the   Android debug bridge and this is actually included  as part of the Android platform tools so we can   just download that in order to access it all  of the downloads for everything you're going   to need today are going to all be listed in the  description below and they're also all going to   be handily in order so if you want to thank me  just uh drop me a like so let's grab the ADB   Tools in my case here I'm just saving it straight  to the desktop in a folder called NS panel proha   and this is just where I'm going to store all  the bits that we're going to be downloading   today with the platform tools now downloaded we  just need to extract its contents so navigate to   where you've saved it and then we're going to  select it and right click and choose extract   all you can then just click extract and it will  extract all of the files contents you should now   have the extracted version of the platform tools  and if you navigate inside of that you'll be able   to see all of the different executables and dll  files for the Android debug tools by default the   NS panel pro has ADB over TCP enabled which is  great for us because it means we can connect to   it wirelessly without having to take it apart for  this next step you're going to need the IP address   of your Ms panel Pro so if you haven't already  set it up using sonoff's interface go and do that   and you can grab your IP address the easiest way  to grab your panel's IP address is by just going   to the settings choosing about and then you'll  see the IP address listed or optionally you can   just go into your router settings and find the  IP like that we've now got our platform tools   and our IP address so let's get connected inside  of our platform tools Explorer window we're just   going to right click in some white space and we're  going to choose open in terminal and conveniently   this is going to spawn a Windows terminal directly  in this directory I have terminal selected as my   default option which is why I see it there so in  your case if you don't see that and you just see   open with the default Windows command prompt it's  okay to do it with that but if you haven't tried   terminal out I would definitely suggest giving it  a go and just in case you don't have those options   available to you you can still follow along using  the Windows command prompt so if you right click   in the address bar and choose copy address you  can then open up the Windows command prompt and   if you type CD and then paste in the text that  you've got and then hit enter that will then jump   you into the directory and you can follow along  with the rest of the tutorial you can make use of   whatever your preferred terminal layers but as I  said I'm making use of terminal so let's jump back   to that inside of our terminal we're now going  to type ADB connect followed by the IP address   of our terminal and we should then hopefully see  some messages from the daemon telling us there's   starting to run and also that it's successfully  run in and the bottom line should then also tell   you that it's connected to that IP address on  Port 5555 next we're going to need to download   the ultra small Launcher APK and we're going to  save this directly inside of our platform tools   folder and when you save that make sure you do  save it inside of the platform tools folder just   because we're going to be referencing it from  the command line and it makes it easy if they're   all just in the same location as we've got an open  connection to our panel now we can make use of the   ADB install command and we can actually install  the ultra small launcher so let's do that now we   can do this by typing ADB install Ultra Dash small  Dash launcher dot APK if you hit enter that should   tell you it's performing the streamed install and  after a couple of seconds you should see a success   message if when you run this install command or  any of the other ones we're going to be looking   at and you get an error message or an error like  this where it tells you there's no such file or   directory then more than likely it's because you  haven't placed the file in the correct location   so when you're saving the file make sure you are  putting in that platforms tools folder and the   same with extracting when you're extracting make  sure you also extract the platform tools folder   in order to move on to our next install we're  going to need to simulate a home button press just   because the NS panel Pro hasn't got any physical  buttons and you're going to want to make note of   this command as you're going to need to make use  of it if you're playing around with the NS panel   it's side loading other apps or doing anything  else with the screen just because when you enter   an interface you're going to get stuck in it as  there's no buttons to actually kick you out of it   so go ahead and type ADB shell input key event 3  and hit enter carrying on we're going to install   the exposed installer making sure that we save it  directly into the platform tools folder with that   downloaded we're going to do the same thing that  we did with the ultra small launcher and we're   going to install it directly on the panel using  ADB Commands back in the terminal we're going   to type ADB install and if you start typing the  name of the APK and then hit tab it will just auto   complete the rest of it for you when you hit enter  you should see that performance streamed install   again and again after a couple of seconds you'll  hopefully see that success message continuing on   we're going to download the exposed framework  which comes in a DOT tar file format and we're   going to also be installing this directly into  our platform tools folder this time we're not   going to be installing the file and instead  we're going to push it to the panel and once   it's on the panel we're going to manipulate it  a little bit in the terminal we're going to type   ADB push followed by the name of that.tar file  we're then going to type forward slash SD card   forward slash download we can then press enter  and when we do we'll see a small little upload   bar telling us the state of the upload and after a  couple of seconds you should see a message telling   you that one file was pushed now that our.tar  files on our panel we're going to be using the   ADB shell in order to manipulate it and there's  going to be a lot of commands that we're going   to be executing here so don't worry if you don't  know what they're all doing they are all listed   below just make sure you copy and paste them in  the order that I do them let's start by opening   a shell so in our terminal we're going to type  ADB shell and hit enter we're then going to need   elevated privileges in order to modify our files  so let's switch to root we do do this by typing   Su and hit and enter we can now start copying and  pasting our commands in so let's paste our first   one in which is going to make the file system  writable and hit enter we now need to navigate   to the directory where we pushed our exposed tar  file and we do this by using CD forward slash SD   card forward slash download from within this  folder we can now extract the contents of our   tar file using the command tar minus xvf then the  name of the file with the extraction completed we   can now change into that new directory and inside  of here there's an installer script that we now   need to make executable so let's paste in the  command to do that for us now that we've made   the installer script executable let's run it by  pasting in our final shell command and hit and   enter the script to install the exposed framework  is going to take a couple of seconds to run but   when it completes you'll see a message on the  bottom telling you that the first boot is going   to take longer than usual to actually run and  when you see this message you're going to know   it's safe to reboot the device you'll now also be  happy to know that we're probably about halfway   through our install but although the hard work  is now pretty much done so unplug your NS panel   Pro give it a couple of seconds and then plug it  back in when the panel powers back up it's going   to take a bit longer than it usually would to  actually perform the boot just as it's its first   born once it does start up it's going to greet you  with the screen where it's going to ask you which   home app you'd like to choose you have the option  of either using launcher or you have the ewe link   control panel if you select the launcher it's  going to boot you into an Android dashboard and   if you select the ewe link control panel then  it's going to take you into the normal sonoff   UI that you'd love known if you've been using the  NS panel Pro with these two options you also have   another choice there's an option for just once or  always if you choose just once whichever option   you select it will boot you into that menu but the  next time the panel reboots it's going to prompt   you to ask you which launcher you want to use if  you choose always whichever launcher you select it   will always boot into that launcher first it's  entirely up to you whichever option you choose   but considering you're watching this tutorial then  more than likely you're going to always want it to   boot into the Android option so you can select  always uh if for some reason when you rebooted   your panel you didn't get the option to choose  your launcher if you enter the command ADB shell   input key event 3 which if you remember sends the  command for the home button the option for the   launcher should then pop up so select launcher  and choose always and the panel will then take   you to an Android dashboard now that you're on  the dashboard you should be able to see an app   called exposed installer which is actually the app  that we installed a while ago if you select this   app it will pop up a little message telling you to  be careful and if you just tick the box that says   don't show this alert again and then tick OK you  should then hopefully be able to see a big green   Banner letting you know that exposed installer is  fully installed if for whatever reason it's not   green and it's orange then more than likely it's  because it hasn't finished installing and you may   just need to reboot the device in order to get  this to install carrying on we're now going to   download the any webview APK file from GitHub and  again when you're downloading this make sure you   put in it inside of your platform tools folder  also if you haven't realized this is actually   how we sideline apps onto the panel so just find  an APK file you want then put it into a directory   that's accessible and connected to the panel  then if you use that ADB install command it will   side load it onto the panel in the terminal we're  going to type ADB install any webview.apk and once   again we'll then see performing streamed install  followed by that success message on our panel if   we open up exposed again and expand the menu out  on the left you should see an option for modules   if you select that you should see any web views  listed there and if you tick the little box next   to it this will then activate it with that now  activated you now need to reboot your NS panel   whenever you reboot your NS panel if you find that  the terminal you were using is no longer able to   talk to the panel if you just run the ADB connect  command again that will link you straight back up   to it now that the panel is rebooted you guessed  it we're going to install another APK this APK is   going to update our webview which in turn is going  to allow us to run apps like fully kiosk browser   the wall panel and of course the home assistant  companion app so download that and put it straight   into your platform tools folder with the APK  now inside of the platform tools we can once   again run ADB install it's worth noting that the  webview APK is also quite big so this one's going   to be a longer install now it should only take a  couple of seconds but if it does take a little bit   longer then don't worry it is a larger APK once  that installs we can head back to our panel and   from here we need to open up settings and scroll  down to system in system you should find about   tablet and if we open that up and scroll  down you'll see an option for build number   we now need to tap on the build number seven  times which will enable the developer options when you see the little notifications saying you  are now a developer you'll know that the developer   tools have been successfully activated if we now  back out from this page you'll see the new option   for the developer tools and if we select this  it will take us into all of those new options   in these new options you'll see an option for  webview implementation and if we select this we'll   be greeted with two different options the top one  is the original Android system webview and the   bottom one is the new Android system webview which  is the one that we installed so select that one   you're now free to go off and side load whatever  apps you want unless you've got an updated webview   more apps when I work for you so as I mentioned  things like the home assistant companion app   Philly kiosk wall panel and a bunch of others if  you want to stick around with me though we are now   going to install the home assistant companion app  and I'm also going to show you how to set it up so   that the screen will turn on and off in order to  get home assistant onto our panel we first need to   download the home assistant companion app APK and  just like with all of the other apks that we've   installed today we first need to download and save  them into our platform tools folder at this point   you're probably an expert at side loading apks  onto your panel but using ADB install followed by   the name of the APK we're going to install that  onto our panel and again we're going to see the   performance stream installed and also the success  message if you happen to have your panel in front   of you as the home assistant app installs you'll  actually see it pop up on the screen and once you   see that on the screen you can select it and  get started with home assistant just like with   the standard home assistant app you can log in  then by providing a username and password and   you can also specify if you want to connect to  a local or a remote instance one handy little   tip and a suggestion that I'd make is I'd create  an individual user for the specific NS panel that   you're going to log into on home assistant this  will allow you to track any of the changes or   modifications that this device makes to your home  assistant and you can also limit its access and   that is probably something that you're going to  want to do especially if you've got this thing out   in a publicly accessible space so we've now got  home assistant fully working on the panel and we   can do anything that you'd normally do within the  companion app the only problem that we have now   is we can't control the screen's brightness and we  can't tell the screen to turn on and off so let's   have a look at fixing that now the final APK that  we're going to be installing today is Auto Magic   so go and grab the latest version which is the  Android 10 1.38 version and download that to your   platform tools with that downloaded we can then  side load it using ADB install auto magic and once   again we'll see the performance streamed install  and that success message if you've got your panel   open in front of you you'll see the Auto Magic  app pop up as it installs once it's there you   can select it and then you'll be greeted with some  terms of servers we'll need to agree to this and   then we'll also be greeted with the tutorial and  for this you'll just need to skip through it by   pressing the next button if you'd never seen or  used the Auto Magic app before essentially it   allows you to put together a flow where you can  combine different actions and conditions in order   to get your device to trigger or run in a certain  way for our use case we're going to be using it   to get the proximity sensor to turn the screen on  when it detects something in front of it in order   to get started with building our own flow we're  first going to need to delete all of the example   ones to do this you just select the three dots  in the bottom right corner of each of the flows   and select delete with all of those deleted our  middle section should now be clear and if you   can see that red warning bar on the bottom then  don't worry this will just disappear by itself   with that done we can now download our final file  and this one is just a simple XML file as this   one's an XML file and not an APK we're going to  push this onto the panel using the command which   you'll find in the description below back on our  panel we're now going to need to import that XML   as that XML contains the template that we're going  to be using in order to set up our flow to import   the file we're going to need to open up the side  menu on the left and then we're going to scroll   down to import flows and widgets inside of here  we're going to need to open up another side menu   and then we're going to select downloads inside  the downloads folder we should be able to see   the XML file that we pushed to the panel and when  we select that file it will open up the pre-made   template what we're looking at now is our flow and  we can turn this flow on by pressing the switch   in the top right corner this screen might look a  little bit daunting but it's actually quite simple   the top node is our control for the proximity  sensor so you can edit this if you want to be able   to adjust your proximity values and the bottom  node is the screen adjustment so you can set this   if you want the screen's brightness to change  to a set value or if you wanted to just modify   it even further I would highly encourage having a  play with this if you select a node you'll see a   little pencil icon a delete icon and also an add  icon we're going to be selecting the pencil icon   and this is going to allow you to edit those files  inside of here you'll be able to see the current   value for the proximity sensor and this value  will change based on how close something is to   it so if you put your hand over it the number will  go really high and if you move further away then   the number will drop slightly my suggestion here  is to just take a step back and just have a look   at what the kind of resting value is you then want  to set your distance to be higher than this number   that way when you put your hand close to it the  screen will turn on and off you'll need to play   around with this a little bit in order to find  The Sweet Spot I tested out a few panels and each   of the panels have all got different values for  mine they sit between 900 and a thousand but if   your current value is reporting way lower than the  700 that I was seeing on this panel then you might   need to set that value a lot lower the second node  is a lot simpler to set up you first need to set   the screen brightness so you've got two options  here you can have it bright or you can have it   dim then you also need to set the duration and  this duration is just the time that the screen is   going to stay on for after that proximity has been  detected a simple way to test out and configure   your flow is to just head back to the main flow  screen and from here if you wave your hand in   front of the proximity sensor the proximity sensor  should flash red letting you know it's activated   then you should also see the second node flash  red letting you know that the screen brightness   is also working the final steps for this whole  process is to head back to the dashboard remember   you can do this by entering the ADB command key  event 3 and when you're on the dashboard we're   going to select settings and then display inside  of display we're going to scroll down and choose   Advanced and from here we're going to select sleep  inside of sleep you can set how long you want the   device to stay on without any interaction and  the timeouts range from never sleep all the way   up to 30 minutes in the testing that I've done I  found that having the device sleep at 30 seconds   and also with the second node having the screen  turn on bright for 30 seconds has been the best   combination it's been the most reliable and the  one that I haven't really had any problems with   if your device does fall asleep and your proximity  sensor doesn't wake it back up you'll need to   remove power to the device or take the front face  plate off in order to get it to restart with those   sleep settings in place we're finally done with  this project and you can go and install the device   into the location you want it to be in and when  you open up home assistant after the timeout the   device will fall asleep and waving your hand in  front of it should wake it up and bring it back   to life if the home assistant app isn't for you  and you want to try something else out remember   throughout this tutorial you have learned how to  side load apps so you could download another APK   take the fully kiosk browser for example you  could sideload that on and then you could make   use of the fully kiosk browser the NS panel Pro  is still fairly inexpensive device and I do wish   that something like this would just run on it out  of the box so you wouldn't have to run through   all of this kind of setup who knows maybe in the  future they may change it and home assistant may   just work by default or maybe they'll give us a  better way of doing this but for now this is the   best way to get home assistant onto the device  and there we go guys that's been a little look   at how to set up home assistant on the NS panel  Pro as well as a look at how to side load other   apps and also the ability to control the screen  using that proximity sensor if you have enjoyed   this video then don't forget to drop me a like and  if you're not already hit the Subscribe button and   ding dong the notification Bell you'll then be  alerted to any future video that I do again a   massive thank you to Blackadder for actually  putting in all of the work and getting all   of this stuff to work you're awesome dude and  another thank you to these awesome dudes these   awesome dudes my patreons and if you're interested  in helping support my channel which in turn allows   me to create content like this then you'll find a  link to my patreon in the description below should   you want to see any of my other home assistant  based videos then check out this playlist just   here but thank you for watching and I'll catch  you in the next one cheers [Music] foreign
Info
Channel: Mark Watt Tech
Views: 109,391
Rating: undefined out of 5
Keywords: MarkWattTech, HomeAssistant, Hassio, Home Assistant, Smart Tech, Smart Home, Mark Watt, Automations, Home Asistant, Sonoff, NSPAnel, ITead, wallpanel, touchscreen, controller, local
Id: c1Dqdz8yHDc
Channel Id: undefined
Length: 19min 42sec (1182 seconds)
Published: Sat Oct 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.