Flashing the Sonoff NSPanel with Tasmota!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I would 100% get these if they could show an alarm panel for HA. Hopefully custom UIs are actually coming soon but that seems like a big ask for hackers imo.

👍︎︎ 2 👤︎︎ u/smith7018 📅︎︎ Nov 03 2021 🗫︎ replies
Captions
a couple of weeks ago we took a look at the sonoff ns panel a smart switch with a touch display for controlling all of these smart devices in one room and i said during that video that it wouldn't be long until the community had some custom firmware on here for local control well it didn't take long at all for that to happen and we already have a build of tasmota that can be flashed onto the ns panel giving you fully local control so let's go over and cover exactly how to do it after i tell you about our sponsor pcb way pcbway are a one-stop shop for all of your electronic projects needs offering high quality pcb printing services cnc machining 3d printing ejection molding sheet metal fabrication and everything else you need to make your diy project become a reality check them out with the link in the video description before we get into the how let's first recap what the ns panel is why you would want to flash it and what exactly it gives you so the ns panel is a smart wall switch with a touch display that has the ability to control sonoff branded smart devices in one area of your house it has two physical buttons for controlling light switches has thermostat controls built in as well as a temperature sensor and some other nice features it's currently still available to buy on kickstarter and will be available officially through the sonoff website after the kickstarter ends there are many reasons why you may want to flash the ns panel the number one being to give you local control the ns panel does have local control but in order to control certain features of it you have to use the sonoff app another reason may be if you wanted to control devices from another manufacturer by interfacing with something like home assistant and finally maybe you want to design your own custom ui instead of using the sonoff one and so flashing the firmware with something like tasmota is the best way to do all of those things regarding the last one there the custom ui bit isn't yet possible but flashing custom firmware is still a necessary step in order for that to happen in the future so at least you'll be ready for that when the community has made that happen speaking of the community massive shout out to blackadder for making this possible he does tons of work in the open source community has the amazing zigbee compatibility database which i use all of the time and he was the one responsible for getting the ns panel working with tasmota so this wouldn't have been possible without his efforts i am really just putting his instructions and his work into a video format for you guys to follow for this guide we are going to be using a version of tasmota which is currently a development version but i would expect that this will be a proper full release by the time you guys get your units and as always i'll have links to everything you will need in the video description and it goes without saying that we are going to be opening up your device and modifying it so do so at your own risk avoiding your warranty etc etc you guys know the drill the only thing you will need hardware wise for this guide is a usb to serial adapter and some dupont wires again everything will be linked down below you're also going to need a computer with the python installed and esp tool installed i'm not going to be showing you how to do that in this particular guide but i will leave a link to a guide for how to install python and how to install esp tool i'm going to be using windows for this guide because i'm guessing that's what a lot of you guys will be using but the process is the same and arguably easier on linux or mac os first start by opening up the back of the ns panel by using a pry tool to unclip the relay unit underneath you will see two small phillips screws that you need to remove this will allow you to pull off the plastic back plate and reveal the main pcb from here we're going to identify the connections that we need for flashing which are up in the top left hand corner you will see five pinholes marked i o zero ground rx tx and 3.3 volts these are the pins that we need in order to flash the esp32 on our ns panel next carefully remove the display's ribbon connector and then pull out to the main pcb leaving the little daughter board and display in place next grab your usb to serial adapter and make sure that it is set to 3.3 volts this is very important we will use 5 volts later on but at the moment 3.3 volts is what we need for these connections i am using dew point wires and for me i just used a little header pin that i had poked that up through the bottom and used female to female wires but if you don't have one of these then you can just use male to female wires and just poke the male end through the holes either way you do it make sure that the connections are secure throughout the entire flashing process otherwise you could break something the proper way is of course to solder so if you would prefer to do that route then please do so with the usb disconnected wire the vcc wire to 3.3 volts the ground wire to ground the rx on the serial adapter to tx on the ns panel the tx on the serial adapter to rx on the ns panel and for the final connection io zero we want to wire this to our ground pin this allows the esp32 to enter flashing mode and i did this by using a male wire and poking it into the clip on our ground connection double check your wiring as well as make sure once again that your usb to serial adapter is set to three volts and then plug the usb cable into your computer first up we're going to take a backup copy of our existing flash in case you ever want to restore it on the command line we are going to use esp tool to check our flash size and also make sure that we can connect to our esp now the flash size on the ns panel is 4 megabytes in size just for reference but it's still handy to know how to do this i'll leave all of the commands we are going to be using in the description box down below for easy reference but enter the following command first and that is going to tell us a few things number one that our usb 2 serial adapter is actually being detected number two that our esp32 is in flash mode and number three it verifies that the flash size is indeed four megabytes next we are going to use that flash size to take a backup of the existing flash issue the following commands which will back up the flash already on the esp32 into a backup file called ns panel dot bin notice how we tell esp tool that our flash size is four megabytes this can take a few minutes to complete so sit tight and wait for that to finish now we have our backup we can now proceed to flashing our new firmware and we need to grab a couple of files for this firstly download taz motor 32 a version of tasmota specifically for the esp32 and at the time of filming this is a development version but if you're watching this in the future i'll make sure to update the links once it's fully released the other thing you will want to download is called esp flasher which is a ui tool to help you flash tasmota now it is possible to do this with esp tool on the command line but it does involve downloading more files first and gets a bit more complicated suits you have to create different partitions so unless you're a bit more advanced i'd recommend using esp flasher with the tasmota firmware downloaded open up esp flasher and then point it at your tasmota firmware file select the com port from the drop down and start the process my esp flasher was throwing up a permission denied error accessing the com port even when running as admin but if you wait for a couple of seconds it should go past this and proceed to start the flash make sure that as the flashing process is happening not to touch any wires on the ns panel or anything else the last thing you want to do is to accidentally knock it off whilst it's in the process of flashing once complete the hardest part is now over and you can now breathe a little now we need to set up and configure tasmota for our ns panel and we could now power up the whole unit by putting the whole thing into the wall or we can test it on the bench first remove all the dewpoint wires from the ns panel as well as the usb cable from the serial adapter and then you'll want to change your usb to serial adapter to use 5 volts rather than 3.3 volts you can also go ahead and plug back in the displays ribbon cable and reseat the main pcb into the plastic surround let's first identify a few more pins on the ns panel first you'll notice near the bottom that there is an eight pin header soldered on the board and this is the header that connects to our relay unit with the ns panel facing the correct way up the two pins on the bottom row in the middle are the ones that we need for five volts and ground specifically this is the five volts pin and this is the ground pin connect the vcc pin on your serial adapter to the five volts pin on the ns panel and the ground pin to the ground pin dew point wires do work here but make sure that they have a good connection and then plug in the usb cable to the serial adapter to power the whole unit on the screen will not come on at this point so don't panic that is to be expected grab your mobile phone or use your computer and search for wi-fi hotspots if you did everything correctly you should see a tasmota hotspot appear that you can then connect to in your browser type 192.168.4.1 at which point you will get the tasmota setup page and this is good we are getting there now and the worst is definitely behind us connect the anna's panel to your wifi by selecting the correct ssid and entering the password at which point it will reboot you will then need to look in your router's webpage and find the new ip address of the ns panel and enter that into your web browser so that we can continue the configuration once reconnected head over to configuration and then other and paste in the following template making sure to tick the activate box and then press save the ns panel will reboot once again and you'll need to head over to configuration and then module and make sure module 0 is selected now we need to fix the obvious problem of the screen not working by loading the driver for the ns panel download the nspanel.be file from the description and then back on tasmota head over to the console and manage filesystems and then browse to the location of the ns panel dot be file and then upload it then hit the edit button and rename the file to autoexec.be and this will allow the driver to be automatically loaded whenever the esp32 boots up reboot the ns panel once again and this time the display should come to life and you should see the startup animation at which point tasmota is now fully flashed onto your ns panel with the stock ui still intact you can control the on-screen elements of the ns panel by issuing commands through the tasmota console and i'll leave a link through black adders documentation so that you can check those out if you want to but other than that you are now free to plumb the ns panel into your wall switch and test out the full functionality with the relays and you can also get it added into home assistant by entering your mqtt details to start using it and there we go that is how to flash tasmota onto the sonoff ns panel like i say this is a huge step forward to getting custom uis onto the ns panel and also gives you that local cloud free control as well as local home assistant integration with mqtt i can't wait to start seeing some custom uis loaded onto this thing at some point and this definitely gets us closer to that once again huge thanks to blackadder for his efforts in getting this up and running and providing the instructions and especially so quickly literally i think it was within a week of the release of the ns panel he had a tasmota running on this thing so yeah super impressive make sure to show him some support but anyways that is about going to do it for this video hopefully you guys enjoyed it and found it useful and leave a comment down below if you are planning on flashing your ns panel with tasmota and what else you plan on doing with it super interested to hear from you guys as always if you want to support this channel you can do so by becoming a patron on patreon and your support allows me to keep on making these videos thank you to all my current patreon supporters as always your support is very much appreciated make sure to drop this video a like get subscribed and i will see you in the next video
Info
Channel: Everything Smart Home
Views: 24,339
Rating: undefined out of 5
Keywords: sonoff, smart home, home automation, tasmota, sonoff nspanel, sonoff nspanel tasmota, sonoff nspanel firmware, sonoff nspanel flash, tasmota esp32, tasmota nspanel, tasmota sonoff nspanel, sonoff nspanel home assistant
Id: sCrdiCzxMOQ
Channel Id: undefined
Length: 13min 31sec (811 seconds)
Published: Tue Nov 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.