Giter VIP home page Giter VIP logo

nspanel-demo-files's Introduction

nspanel-demo-files's People

Contributors

masto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nspanel-demo-files's Issues

Factory restore for NSPanel

I am looking for a way to factory restore the NSPanel.

What i mean by factory restore is to flash the original HMI interface and the original BIN for the esp32.

Getting backup for the ESP is easy and i have done it. Now how to do the HMI/TFT part? or is there some place where i can get the original TFT. HMI would be much nicer but beggars can't be choosers.

NSPanel ESP32 board... fragile?

After a day of trying, i figured out a more complex YAML to control this device.
Everything was good, i just needed one more edit in the code (to manage page switch and content refresh).

I made an OTA update and... here's the logs:

[15:13:50][I][logger:214]: Log initialized
[15:13:50][C][ota:458]: There have been 6 suspected unsuccessful boot attempts.
[15:13:50][D][esp32.preferences:114]: Saving preferences to flash...
[15:13:50][I][app:029]: Running through setup()...
[15:13:50][C][switch.gpio:011]: Setting up GPIO Switch 'Sonoff NSPanel Relay 1'...
[15:13:50][D][switch:017]: 'Sonoff NSPanel Relay 1' Turning OFF.
[15:13:50][D][switch:037]: 'Sonoff NSPanel Relay 1': Sending state OFF
[15:13:50][D][switch:017]: 'Sonoff NSPanel Relay 1' Turning OFF.
[15:13:50][C][switch.gpio:011]: Setting up GPIO Switch 'Sonoff NSPanel Relay 2'...
[15:13:50][D][switch:017]: 'Sonoff NSPanel Relay 2' Turning OFF.
[15:13:50][D][switch:037]: 'Sonoff NSPanel Relay 2': Sending state OFF
[15:13:50][D][switch:017]: 'Sonoff NSPanel Relay 2' Turning OFF.
[15:13:50][C][switch.gpio:011]: Setting up GPIO Switch 'screen_power'...
[15:13:50][D][switch:013]: 'screen_power' Turning ON.
[15:13:50][D][switch:037]: 'screen_power': Sending state ON
[15:13:50][D][switch:013]: 'screen_power' Turning ON.
[15:13:50][D][text_sensor:067]: 'Sonoff NSPanel ESPHome Version': Sending state '2021.12.3 Jan 14 2022, 15:12:33'
[15:13:50][C][adc:020]: Setting up ADC 'ntc_source'...
[15:13:50][C][wifi:037]: Setting up WiFi...
[15:13:50]ets Jul 29 2019 12:21:46
[15:13:50]
[15:13:50]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[15:13:50]configsip: 0, SPIWP:0xee
[15:13:50]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[15:13:50]mode:DIO, clock div:2
[15:13:50]load:0x3fff0018,len:4
[15:13:50]load:0x3fff001c,len:1044
[15:13:50]load:0x40078000,len:8896
[15:13:50]load:0x40080400,len:5828
[15:13:50]entry 0x400806ac
[15:13:50][I][logger:214]: Log initialized
[15:13:50][C][ota:458]: There have been 7 suspected unsuccessful boot attempts.
[15:13:50][D][esp32.preferences:114]: Saving preferences to flash...
[15:13:51][I][app:029]: Running through setup()...
[15:13:51][C][switch.gpio:011]: Setting up GPIO Switch 'Sonoff NSPanel Relay 1'...
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 1' Turning OFF.
[15:13:51][D][switch:037]: 'Sonoff NSPanel Relay 1': Sending state OFF
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 1' Turning OFF.
[15:13:51][C][switch.gpio:011]: Setting up GPIO Switch 'Sonoff NSPanel Relay 2'...
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 2' Turning OFF.
[15:13:51][D][switch:037]: 'Sonoff NSPanel Relay 2': Sending state OFF
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 2' Turning OFF.
[15:13:51][C][switch.gpio:011]: Setting up GPIO Switch 'screen_power'...
[15:13:51][D][switch:013]: 'screen_power' Turning ON.
[15:13:51][D][switch:037]: 'screen_power': Sending state ON
[15:13:51][D][switch:013]: 'screen_power' Turning ON.
[15:13:51][D][text_sensor:067]: 'Sonoff NSPanel ESPHome Version': Sending state '2021.12.3 Jan 14 2022, 15:12:33'
[15:13:51][C][adc:020]: Setting up ADC 'ntc_source'...
[15:13:51][C][wifi:037]: Setting up WiFi...
[15:13:51]ets Jul 29 2019 12:21:46
[15:13:51]
[15:13:51]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[15:13:51]configsip: 0, SPIWP:0xee
[15:13:51]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[15:13:51]mode:DIO, clock div:2
[15:13:51]load:0x3fff0018,len:4
[15:13:51]load:0x3fff001c,len:1044
[15:13:51]load:0x40078000,len:8896
[15:13:51]load:0x40080400,len:5828
[15:13:51]entry 0x400806ac
[15:13:51][I][logger:214]: Log initialized
[15:13:51][C][ota:458]: There have been 8 suspected unsuccessful boot attempts.
[15:13:51][D][esp32.preferences:114]: Saving preferences to flash...
[15:13:51][I][app:029]: Running through setup()...
[15:13:51][C][switch.gpio:011]: Setting up GPIO Switch 'Sonoff NSPanel Relay 1'...
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 1' Turning OFF.
[15:13:51][D][switch:037]: 'Sonoff NSPanel Relay 1': Sending state OFF
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 1' Turning OFF.
[15:13:51][C][switch.gpio:011]: Setting up GPIO Switch 'Sonoff NSPanel Relay 2'...
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 2' Turning OFF.
[15:13:51][D][switch:037]: 'Sonoff NSPanel Relay 2': Sending state OFF
[15:13:51][D][switch:017]: 'Sonoff NSPanel Relay 2' Turning OFF.
[15:13:51][C][switch.gpio:011]: Setting up GPIO Switch 'screen_power'...
[15:13:51][D][switch:013]: 'screen_power' Turning ON.
[15:13:51][D][switch:037]: 'screen_power': Sending state ON
[15:13:51][D][switch:013]: 'screen_power' Turning ON.
[15:13:51][D][text_sensor:067]: 'Sonoff NSPanel ESPHome Version': Sending state '2021.12.3 Jan 14 2022, 15:12:33'
[15:13:51][C][adc:020]: Setting up ADC 'ntc_source'...
[15:13:51][C][wifi:037]: Setting up WiFi...
[15:13:52]ets Jul 29 2019 12:21:46
[15:13:52]
[15:13:52]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[15:13:52]configsip: 0, SPIWP:0xee
[15:13:52]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[15:13:52]mode:DIO, clock div:2
[15:13:52]load:0x3fff0018,len:4
[15:13:52]load:0x3fff001c,len:1044
[15:13:52]load:0x40078000,len:8896
[15:13:52]load:0x40080400,len:5828
[15:13:52]entry 0x400806ac
Etc...

This is the loop now, tried changing code, tried trim it to the minimum (just the wifi and 2-3 generic sensors)... it's just a boot loop.
Is the ESp32 board broken? How can i find it?

Thank you.

Display shifted

Maybe it is not related to the NSPanel files here, but you might know a solution. I use the EU version of the display. In the Nextion editor I chose "270°" as orientation. The UI is shown correctly, but moved slidely to the right side (buttons below the display). Also the buttons are not always responding at the border of the buttons. Seems like everything is shifted. Am I doing something wrong?

Time sync breaks connection

Hello Masto, first of all thanks for the massive amount of work ...really loving to build my own screen(s)
One thing I noticed though is that the propose sync with HA is making the panel disconnect every minute
Whilst compiling I noticed that without this option there are no errors...but when I add below lines there are some compiling errors thrown. Would yoy have any idea what this is all about as I would like to use/show the time.
Additional: note that I use %H instead of %I for the hours...

image

image

The same connection break applies with sntp, here however I do not see the compile error shown above.

I have narrowed it down to the little 'p' in "%H:%Mp" ... HA kicks back: 2022-02-21 13:33:01
with the 'p' it, it prints 13:33PM, without it...it just reconnects...logically I donot want to see the PM in a 24hr time. So now the question is where this is coming from....or...is this due to my lack of knowledge on how to format time.

TFT demo file issues, baud rate

Hey, firstly thanks for the video, really helped with getting this thing flashed with ESPHome.
During this process however, I found an issue with the demo TFT files. In Nextion you need to set the baud rate in the Project.s settings to bauds=115200. Without this, after flashing your demo TFT onto the NSPanel, ESPHome can no longer connect to the Nextion display as your ESPHome config tries to communicate at 115200, but the default Nextion rate is 9600. This took me a long while to figure out, and in the process I think I found a few other people who have posted about this same problem around the internet but gave up.

Steps to fix:

  1. Set baud rate in ESPHome config to 9600.
  2. Transfer a blank TFT to the display with bauds=115200 in the Project.s config file. (blank to reduce size, takes a long time at 9600 baud rate)
  3. Set ESPHome config back to 115200 baud rate
  4. Flash your new Nextion TFT file, ensuring bauds=115200 is in the Project.s config, or you'll have to repeat this process again.

Hopefully even if this doesn't get fixed in the demo files, this will help out some other people who stumble across this same problem.

Unable to flash

I found your guide and brought a NSPanel EU model.
Connected 3v3, TX, RX and GND of the FDI Flasher to the corresponding holes in the board.
Also connected IO0 to GND (on FDI) to activate flashing mode (i suppose).
IMG_3260

Serial port pops out in EspHome Flasher but then i try to flash:

Using '/dev/cu.usbserial-A50285BI' as serial port.
Connecting......................................
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://github.com/espressif/esptool#troubleshooting

FDI board works because i've used it yesterday to flash an ESP8266 correctly.
Is a connection problem on the board? is a flash problem with the IO0 pin?
What can i try?

Thank you.

Compiling Issues

i'm currently receiving this error on this line:

external_components:
  - source: github://pr#2956
    components: [nextion]
    refresh: 1h

error:

In file included from src/esphome/components/nextion/nextion_commands.cpp:1:
src/esphome/components/nextion/nextion.h:324:35: error: 'esphome::time::ESPTime' has not been declared
   void set_nextion_rtc_time(time::ESPTime time);
                                   ^~~~~~~
In file included from src/esphome/components/nextion/nextion.cpp:1:
src/esphome/components/nextion/nextion.h:324:35: error: 'esphome::time::ESPTime' has not been declared
   void set_nextion_rtc_time(time::ESPTime time);
                                   ^~~~~~~
src/esphome/components/nextion/nextion_commands.cpp:223:42: error: variable or field 'set_nextion_rtc_time' declared void
 void Nextion::set_nextion_rtc_time(time::ESPTime time) {
                                          ^~~~~~~
src/esphome/components/nextion/nextion_commands.cpp:223:42: error: 'ESPTime' is not a member of 'esphome::time'
src/esphome/components/nextion/nextion_commands.cpp:223:42: note: suggested alternative:
In file included from src/esphome/components/time/real_time_clock.h:8,
                 from src/esphome/components/nextion/nextion.h:21,
                 from src/esphome/components/nextion/nextion_commands.cpp:1:
src/esphome/core/time.h:12:8: note:   'esphome::ESPTime'
 struct ESPTime {
        ^~~~~~~
*** [/data/nspanel-demo-square/.pioenvs/nspanel-demo-square/src/esphome/components/nextion/nextion_commands.cpp.o] Error 1
*** [/data/nspanel-demo-square/.pioenvs/nspanel-demo-square/src/esphome/components/nextion/nextion.cpp.o] Error 1

do you know how to fix it?

Wireless Compiling

I followed and compiled correctly, and it works perfectly, but I added the nspanel-demo.tft part, the device comes online and I want to compile it again, but I get this error.
Screenshot 2024-03-11 at 16 55 08

Issue with the NS panel coding

Hello, I wanna help I have NS panel integrated with home assistant I have designed a HMI in nextion and upload the TFT in home assistant so I have two pages page id= 0 and page id=1 so in the yaml coding I just write these lines:

  • platform: nextion
    name: $device_name Touch me
    page_id: 0
    component_id: 0

  • platform: nextion
    name: $device_name Light
    page_id: 1
    component_id: 1

so in devices and services in home assistant everything on page 0 is working very fine but when I go to page 1 everything on page 1 like button is not working I don't know why everything on page 1 is not working if there is any coding issue?
like I clicked the light button on page 1 but my home assistant light doesn't came ON.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.