Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ITead's SONOFF NSPanel touchscreen display (ESP32 with custom Nextion HMI screen)? #1469

Closed
Hedda opened this issue Oct 19, 2021 · 146 comments · May be fixed by esphome/esphome#2702

Comments

@Hedda
Copy link

Hedda commented Oct 19, 2021

Describe the problem you have/What new integration you would like

Request support in ESPHome for SONOFF NSPanel touchscreen display by ITead = ESP32 based with custom Nextion HMI screen:

https://itead.cc/product/sonoff-nspanel-smart-scene-wall-switch/

It is listed at MSRP $74.90 but early-bird version is currently sold via this Kickstarter campaign for around $54 each or $99 for two:

https://www.kickstarter.com/projects/sonoffnspanel/sonoff-nspanel-smart-scene-wall-switch/

image

A lot of information had already leaked via its FCC certification (FCC ID 2APN5NSPANEL):

https://fccid.io/2APN5NSPANEL

https://fccid.io/2APN5NSPANEL/User-Manual/User-Manual-5481421.pdf

https://fccid.io/2APN5NSPANEL/External-Photos/External-Photos-5481413.pdf

https://fccid.io/2APN5NSPANEL/Internal-Photos/Internal-Photos-5481415.pdf

https://fccid.io/2APN5NSPANEL/Label/ID-Label-and-Label-Location-5481414.pdf

Many tech review bloggers/vloggers who received preview prototype units seem to complain about its lack of integrated motion sensor for presence detection so can automatically turn on the screen backlighting, (and I like to also add the request for its DS18B20 temperature-only sensor to be replaced with a DHT22, AM2301, or Si7021 temperature and humidity combo sensor).

https://www.youtube.com/watch?v=cGXJnzS7D9g

https://www.youtube.com/watch?v=hQZk3MKJXzI

https://www.youtube.com/watch?v=vg_Jq4Y9b_s

https://www.youtube.com/watch?v=vg_Jq4Y9b_s

https://www.youtube.com/watch?v=DUvWwtvtd6k

Looks like a model each for Europe and North America; “NSPanel-EU” and “NSPanel-US”. It also contains a temperature + humidity sensor and two integrated low-amp relays for 220V/300W or 110V/150W capacity respectively, but the point is really for it to act as remote control of scenes and running widgets (local applications or scripts) such as for example an HVAC thermostat.

As I understand all Nextion displays as their own integrated microcontroller unit (STM32GO ARM Cortex-M0+ 64MHz Onboard MCU Processor) so that will off-load most of the heavy lifting work and all text and graphics, animations, etc. are created using Nextion Editor software, and then then the project files/assets are uploaded directly into the Nextion screen. The screen then has serial commands mapped to UI elements and can be sent and received from ESPHome firmware to control it.

There is some interesting discussions on the Home Assistant community forum about hacking it with ESPHome and/or Tasmota:

https://community.home-assistant.io/t/sonoff-nspanel-smart-scene-wall-switch-by-itead-coming-soon-on-kickstarter/332962/

HA-TB303 and blakadder are two that have especially connected a lot of information about the internal workings of these:

https://espthings.io/nspanel

https://blakadder.com/nspanel-teardown/

Also, the community at the unofficial Nextion/TJC chat room on Discord have been making some discoveries about its display:

https://unofficialnextion.com/t/welcome-to-the-unofficial-nextion-tjc-user-forum/8

The first thing they discovered it that has practically been designed it to be hacked and flashed with third-party firmware. Especially when taking into consideration that Efuses are not burned and pin headers on the board are easy to use for a solderless flash.

The information so far is that it does not use the protocol that ESPHome support for Nextion HMI but instead a custom protocol:

Nextion HMI Project Upload Protocol specifications:

https://nextion.tech/2017/12/08/nextion-hmi-upload-protocol-v1-1/

ITead has also posted specific IO (Input-Output) definition documention for Sonoff NSPanel in a new Kickstarter campaign update:

image

Please describe your use case for this integration and alternatives you've tried:

Additional context

@jesserockz
Copy link
Member

I am backing the NSPanel so hope to get one ASAP, but without it in front of me I cannot make any assumptions about how it works. I have seen the IO pinout and actually spent an hour or 2 looking at the fcc pictures and had all of the pins listed right before they posted that update on kickstarter 🤦‍♂️

@Hedda
Copy link
Author

Hedda commented Oct 20, 2021

@jesserockz Suggest that you write a short mail to "Jeri Shi" jerry.shi@itead.cc, "Stan Li" Stan.li@itead.cc, and "Daniel Zhan" daniel.zhan@itead.cc telling them who you are and ask them nicely if they would be willing to send you a prototype or preview sample unit in advance of them shipping general availability of the Kickstarter early-bird units, maybe even be so bold and ask them to also send some units to your fellow ESPHome and Home Assistant core developers. I am sure that they would appreciate it if some of the popular open-source firmware projects could already support it before it gets shipped to end-users.

@jesserockz
Copy link
Member

I will do just that @Hedda. Thanks =)

@Hedda
Copy link
Author

Hedda commented Oct 21, 2021

FYI, Tasmota developer blakadder now discovered that SONOFF NSPanel uses Nextion Discovery 3.5” NX4832F035 screen type part:

https://nextion.tech/datasheets/nx4832f035/

NX4832F035 Nextion 3.5″ Discovery Series HMI Touch Display can be purchased as a separate unit directly from ITead for $29.90 (US) if need it for development or want to test it in an ESP32 DIY project:

https://itead.cc/product/nx4832f035-nextion-3-5-discovery-series-hmi-touch-display/

blakadder (in Tasmota discussions): "With this discovery we confirm it is possible to upload custom GUI created in Nextion Editor."

https://nextion.tech/nextion-editor/#_section1

blakadder has posted updated information on his findings here:

https://blakadder.com/nspanel-teardown/

Note that the main PCB is marked with “E32-MSW-NX” and “NSPanel-EU” if you open it.

and specific flashing instructions here:

https://templates.blakadder.com/sonoff_NSPanel.html

and looks like he is also planning on posting code here:

https://github.com/blakadder/nspanel

blakadder wrote: I’ve also successfully decoded most of the NSPanel custom protocol, just need to figure out why the touch function stops working when doing some actions. Here’s a list of objects pulled by a nice tool coded by MaxZ from Nextion Unoffficial Discord:

https://gist.github.com/blakadder/7928279bd95ad47b54f705b7a121a7e1

Again, more discussion here on Home Assistant community forum:

https://community.home-assistant.io/t/sonoff-nspanel-smart-scene-wall-switch-by-itead-coming-soon-on-kickstarter/332962/

Over at the https://unofficialnextion.com/t/welcome-to-the-unofficial-nextion-tjc-user-forum/8 we’ve been making some discoveries:

  • The stock firmware serial baudrate is 115200
  • The stock firmware has Protocol Reparse and Address Mode activated
  • You have to put the Nextion into passive mode to processes serial data according to the Nextion Instuction Set

Also ESPhome only sends the connect command to the Nextion. That doesn’t work because the NSPanel is in Protocol Reparse mode. You need to send the full escape sequence from the Nextion Upload Protocol v1.1 1 instead to exit Protocol Reparse mode.

You need to have GPIO4 pulled low so the screen boots. Then send the escape reparse mode string DRAKJHSUYDGBNCJHGJKSHBDNÿÿÿ and you can use all standard nextion commands.

https://gist.github.com/blakadder/7928279bd95ad47b54f705b7a121a7e1

@nagyrobi
Copy link
Member

Although not locked down to Nextion, but: https://haswitchplate.github.io/openHASP-docs

@Hedda
Copy link
Author

Hedda commented Oct 25, 2021

Although not locked down to Nextion, but: https://haswitchplate.github.io/openHASP-docs

blakadder (who now managed to get Sonoff NSPanel display working with Tasmota) said that openHASP can't be reused for this:

arendst/Tasmota#13347

"Nextion screens have a different design philosophy and will not work with LVGL and therefore openHASP"

blakadder continuously keeps updating his findings both on a few web-pages and in this GitHub repo:

https://blakadder.com/nspanel-teardown/

https://templates.blakadder.com/sonoff_NSPanel.html

https://github.com/blakadder/nspanel

https://blakadder.github.io/nspanel/

https://gist.github.com/blakadder/7928279bd95ad47b54f705b7a121a7e1

As noted it does not use standard Nextion so they reference Nextion Instruction Set and the Nextion HMI Project Upload Protocol:

https://nextion.tech/instruction-set/

https://nextion.tech/2017/12/08/nextion-hmi-upload-protocol-v1-1/

Again, the community at the unofficial Nextion/TJC chat room on Discord has made most of the discoveries about this display:

https://unofficialnextion.com/t/welcome-to-the-unofficial-nextion-tjc-user-forum/8

@Hedda
Copy link
Author

Hedda commented Nov 11, 2021

FYI, blakadder now said that he is trying to replicate the original default firmware but using MQTT to be able to integrate it in HA.

Everything neatly laid out here for hacking it and configuring Tasmota and blakadder said will be updated as support progresses:

https://templates.blakadder.com/sonoff_NSPanel

Michel from espthings.io also updated his teardown and test of flashing ESPHome:

https://www.espthings.io/index.php/2021/10/10/sonoff-nspanel-first-impressions/

Again, also be sure to check out this teardown as an introduction to the hardware:

https://blakadder.com/nspanel-teardown/

@jesserockz
Copy link
Member

@Hedda https://twitter.com/Jesserockz/status/1457415401743126530 =)

@Hedda
Copy link
Author

Hedda commented Nov 12, 2021

@Hedda https://twitter.com/Jesserockz/status/1457415401743126530 =)

Awesome stuff! Will keep an eye on esphome/esphome#2702 and your Twitter while waiting for ITead to ship Sonoff NSPanel!

@mbo18
Copy link

mbo18 commented Nov 29, 2021

@jesserockz Thank you so much for this component!
It seems that weather data are not currently supported (YAML part missing form my understanding). Do you plan to finish the NSPanel support for next release?

@mbo18
Copy link

mbo18 commented Dec 12, 2021

I've flashed my NSPanel with jesserockz's code and it's working pretty fine. I've found how to declare widgets in the YAML configuration. It's clear that "devices" are not currently supported but "groups" are. Regarding "devices", "CURTAIN: 11" is missing in the code.
Regarding groups, I think that I found bugs when using multi-switch (2 ou 3 or 4):

  • first switch is always on, all others are off
  • names are not displayed so it's OUTLET1, OUTLET2, etc.
  • only the last ON_CLICK action is triggered

For example, with this code:

    - type: group
      name: Salon
      uiid: SWITCH_VERTICAL_TRIPLE
      items: 
        - name: "Open"
          on_click:
            - homeassistant.service:
                service: cover.open_cover
                data:
                  entity_id: cover.salon_volet_roulant
        - name: "Close"
          on_click:
            - homeassistant.service:
                service: cover.close_cover
                data:
                  entity_id: cover.salon_volet_roulant
        - name: "STOP"
          on_click:
            - homeassistant.service:
                service: cover.stop_cover
                data:
                  entity_id: cover.salon_volet_roulant

If I click on OUTLET1 or 2 or 3, only the last on_click action is triggered, here it is cover.stop_cover

@TyzzyT
Copy link

TyzzyT commented Dec 17, 2021

When trying to compile with Jesse's code, I'm getting the error below. Any idea what can be wrong?

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 1.0
|-- <FS> 1.0
|-- <Update> 1.0
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <AsyncTCP-esphome> 1.2.2
|-- <DNSServer> 1.1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESPmDNS> 1.0
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/nspanel/nspanel.cpp.o
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/text_sensor/text_sensor.cpp.o
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/time/automation.cpp.o
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/time/real_time_clock.cpp.o
In file included from src/esphome/components/sensor/sensor.h:3:0,
                 from src/esphome/components/nspanel/nspanel.h:6,
                 from src/esphome/components/nspanel/nspanel.cpp:1:
src/esphome/components/nspanel/nspanel.cpp: In member function 'bool esphome::nspanel::NSPanel::process_data_()':
src/esphome/components/nspanel/nspanel.cpp:99:50: error: 'format_hex_pretty' was not declared in this scope
            format_hex_pretty(message_data, length).c_str());
                                                  ^
src/esphome/core/log.h:95:89: note: in definition of macro 'esph_log_d'
   esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                                                                         ^
src/esphome/components/nspanel/nspanel.cpp:98:3: note: in expansion of macro 'ESP_LOGD'
   ESP_LOGD(TAG, "Received NSPanel: Type=0x%02X PAYLOAD=%s RAW=[%s]", type, message.c_str(),
   ^
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/uart/uart.cpp.o
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/uart/uart_component.cpp.o
Compiling /data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/uart/uart_component_esp32_arduino.cpp.o
*** [/data/sonoff-nspanel1/.pioenvs/sonoff-nspanel1/src/esphome/components/nspanel/nspanel.cpp.o] Error 1
========================= [FAILED] Took 12.08 seconds =========================

@samuelmcconnell
Copy link

samuelmcconnell commented Dec 18, 2021

On ESPHome 2021.12.1, I'm seeing a similar error on compilation as what @TyzzyT is getting:

Processing nspanel (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.3.2)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Dependency Graph
|-- <WiFi> 1.0
|-- <Update> 1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESPmDNS> 1.0
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/nspanel/nspanel.cpp.o
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/output/automation.cpp.o
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/output/float_output.cpp.o
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/resistance/resistance_sensor.cpp.o
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/rtttl/rtttl.cpp.o
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/sensor/automation.cpp.o
Compiling /data/nspanel/.pioenvs/nspanel/src/esphome/components/sensor/filter.cpp.o
In file included from src/esphome/components/sensor/sensor.h:3:0,
                 from src/esphome/components/nspanel/nspanel.h:6,
                 from src/esphome/components/nspanel/nspanel.cpp:1:
src/esphome/components/nspanel/nspanel.cpp: In member function 'bool esphome::nspanel::NSPanel::process_data_()':
src/esphome/components/nspanel/nspanel.cpp:99:50: error: 'format_hex_pretty' was not declared in this scope
            format_hex_pretty(message_data, length).c_str());
                                                  ^
src/esphome/core/log.h:95:89: note: in definition of macro 'esph_log_d'
   esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                                                                         ^
src/esphome/components/nspanel/nspanel.cpp:98:3: note: in expansion of macro 'ESP_LOGD'
   ESP_LOGD(TAG, "Received NSPanel: Type=0x%02X PAYLOAD=%s RAW=[%s]", type, message.c_str(),
   ^
*** [/data/nspanel/.pioenvs/nspanel/src/esphome/components/nspanel/nspanel.cpp.o] Error 1
========================== [FAILED] Took 3.15 seconds ==========================

The yaml config I used is available here.

EDIT: It compiled fine using the dev release of ESPHome.

@mbo18
Copy link

mbo18 commented Dec 18, 2021

Yeah I'm not alone using ESPHome with a NSPanel 👍
You need to comment those 2 lines. Using (for example) VSCode or File Editor add-on, go to config/esphome/.esphome/external_components/8d2a6156/esphome/components/nspanel/nspanel.cpp and comment line 98 and 99 by adding //:

//  ESP_LOGD(TAG, "Received NSPanel: Type=0x%02X PAYLOAD=%s RAW=[%s]", type, message.c_str(),
//           format_hex_pretty(message_data, length).c_str());

Also, you need to change 1 thing in your YAML:

  - platform: gpio
    name: "$devicename Screen Power"
    id: screen_power
    entity_category: config
    pin:
      number: 4
      inverted: true
    restore_mode: ALWAYS_OFF

Restore Mode for the screen power switch must now be set to ALWAYS_OFF

@TyzzyT
Copy link

TyzzyT commented Dec 18, 2021

Hey @mbo18,
I've managed to flash the panel with ESPHome, thank you very much for your help. Where do you define the widgets as you described?
I tried something like the code below, but that doesn't work.

nspanel:
  id: nspanel_id
  time_id: homeassistant_time
  temperature: temperature
  eco_mode_switch: eco_mode
  screen_power_switch: screen_power
  relays:
    - relay_1
    - relay_2

  - type: group
    name: Group1
    uiid: SWITCH_VERTICAL_SINGLE
    items: 
      - name: "Toggle"
        on_click:
          - homeassistant.service:
              service: light.toggle
              data:
                entity_id: light.christmas_tree

@mbo18
Copy link

mbo18 commented Dec 18, 2021

Currently we can only use scene or empty.
Here is my code:

nspanel:
  id: nspanel_id
  time_id: current_time
  temperature: temperature
  screen_power_switch: screen_power
  eco_mode_switch: eco_mode
  relays:
    - relay_1
    - relay_2
  widgets:
    - type: scene
      name: LEntrée
      on_click:
        - homeassistant.service:
            service: light.toggle
            data:
              entity_id: light.entree_bulb
    - type: empty
    - type: empty
    - type: empty
    - type: empty
    - type: empty
    - type: empty
    - type: empty

@TyzzyT
Copy link

TyzzyT commented Dec 18, 2021

Thanks @mbo18, you're the best! This is working for me.

@samuelmcconnell
Copy link

Is there any support for changing the orientation of the screen yet? I have the portrait-orientation NSPanel but it displays landscape.

@mbo18
Copy link

mbo18 commented Dec 18, 2021

That’s in NSPanel settings and not in ESPHome I think. Slide your finger from the top of the screen to the bottom

@mkaatman
Copy link

I can't get mine to register when I try to change orientation. I see the option to do it.

@mbo18
Copy link

mbo18 commented Dec 19, 2021

I can’t help you, this option does not exist in the EU version

@samuelmcconnell
Copy link

@mkaatman When I tapped the option for orientation, nothing changed on-screen. However, after power cycling, it appeared with the orientation I had selected.

@mkaatman
Copy link

That was it. I must have done the old triple tap prior. Now how do you get Fahrenheit to stick?

@mbo18
Copy link

mbo18 commented Dec 19, 2021

Under nspanel: set temperature_unit_celcius to false:
temperature_unit_celcius: false

@jesserockz
Copy link
Member

Sorry, still catching up on Github notifications.

Great to see people are receiving their NSPanels and using ESPHome on them ❤️

A few things:

  • I decided to remove support for groups for now, but its easy enough for you to re-enable by cloning and removing one section in the __init__.py file
    • Further to groups, I could not get the names to change for each item. It seems they might be hard-coded to Outlet 1/2/etc
  • Yeah orientation is a weird one. I will check to see if there is a message received when the user changes it from UI to force a power reboot of the screen itself.
  • Regarding the compile issues, format_hex_pretty is only in dev and therefore either you need to use dev, or comment out the lines as @mbo18 has done.

Please do keep sending in your issues/feedback and I will try to make this work the best I can.

Jesse

@mbo18
Copy link

mbo18 commented Dec 22, 2021

Hi @jesserockz! thanks for working on this.
I'm just wondering how you will implement the weather part, switches (group) and devices. Do you already have worked on something?
Regarding weather:

  • You can ask for a weather entity and then ESPHome has to get the weather state (icon), the current temp, the min and max temp for forecast[0]. That may be a lot of work? (creating a weather component with a homeassistant platform?)
    Something like:
nspanel:
  ...
  weather_entity: weather.home
  • Or you can ask for different sensors like:
nspanel:
  ...
  weather:
    temperature:
    temp_min:
    temp_max:
    icon:

which will be sensors form HA:

sensor:
  - platform: homeassistant
    entity_id: sensor.weatherhome_temperature
    id: outdoor_temp
    internal: true
  - platform: homeassistant
    entity_id: sensor.weatherhome_min_temp_0
    id: outdoor_temp_min
    internal: true
  - platform: homeassistant
    entity_id: sensor.weatherhome_max_temp_0
    id: outdoor_temp_max
    internal: true
text_sensor:
  - platform: homeassistant
    entity_id: weather.home
    id: outdoor_icon
    internal: true
    filters:          # mapping done directly by the component?
      - map:
        - clear-night -> CLOUD_BLUE
        - cloudy -> SUN_CLOUD
        - exceptional -> RED_THERMOSTAT
        - fog -> CLOUD_FOG
        - hail -> CLOUD_ICE_CRYSTALS
        - lightning -> CLOUD_RAIN_LIGHTNING
        - lightning-rainy -> CLOUD_RAIN_LIGHTNING
        - partlycloudy -> SUN_CLOUD
        - pouring -> CLOUD_RAIN
        - rainy -> CLOUD_RAIN
        - snowy -> CLOUD_SNOWFLAKES
        - snowy-rainy -> CLOUD_RAIN_SNOW
        - sunny -> SUNNY
        - windy -> WIND
        - windy-variant -> WIND

Regarding devices, do you plan to add homeassistant platform to light, climate and cover?

And finally, regarding groups, a binary sensor and a switch sensor per HA light or switch could do the job? like:

binary_sensor:
  - platform: homeassistant
    id: light1_state
    entity_id: light.entree_bulb
    internal: true
switch:
  - platform: template
    id: light1_switch
    internal: true
    lambda: |-
      if (id(light1_state).state) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      - homeassistant.service:
          service: light.turn_on
          data:
            entity_id: light.entree_bulb
    turn_off_action:
      - homeassistant.service:
          service: light.turn_off
          data:
            entity_id: light.entree_bulb

then NSPanel group's state and action could come from the switch template. The configuration could look like:

- type: group
  name: Light 1
  uiid: SWITCH_VERTICAL
  items:
    - name: "Light 1"
      switch: light1_switch   

@jesserockz
Copy link
Member

@mbo18 Ah something I added in my local config, but not in the PR for weather:

api:
  services:
    - service: weather_data
      variables:
        icon: int
        temperature: int
        min: int
        max: int
      then:
        - lambda: id(nspanel_id).send_weather_data((nspanel::WeatherIcon)icon, temperature, min, max);

The icons list is here: https://github.com/esphome/esphome/pull/2702/files#diff-90cb7313b616f9d6e69e3358d14b0325f04255d8e84891a20431dd5eb57a7543R17-R32

  • Or you can ask for different sensors like:
nspanel:
  ...
  weather:
    temperature:
    temp_min:
    temp_max:
    icon:

I do like this approach and I think that might work nicely.

Regarding devices, do you plan to add homeassistant platform to light, climate and cover?

Not anytime soon, that will be a big task in itself.

And finally, regarding groups, a binary sensor and a switch sensor per HA light or switch could do the job? like:

I had done something similar although skipped the template switch and just set the group item state directly from the homeassistant binary_sensor and then used a trigger on the group item to call the ha service directly.

@jesserockz
Copy link
Member

For the light devices though I was thinking ESPHome might need a homeassistant platform for light, which is why I disabled it completely for now.

@mbo18
Copy link

mbo18 commented Jan 30, 2022

@DeanoXX Thank you for you code!! I'm using it now for my lights, covers and plugs all with the original GUI.

@DeanoXX
Copy link

DeanoXX commented Jan 30, 2022

@DeanoXX Thank you for you code!! I'm using it now for my lights, covers and plugs all with the original GUI.

Excellent - glad it was helpful :)

@peetereczek
Copy link

@DeanoXX thank you for your work and sharing the code :D I also managed to use stock UI with ESP firmware and create awesome HA integration <3

@mbo18
Copy link

mbo18 commented Feb 1, 2022

@peetereczek I've shared my code here

@peetereczek
Copy link

@DeanoXX did you managed to control display brightness?
I think it should be some nextion command like dim=50, but I can't find proper way to trigger it over JSON on 87 channel

@jesserockz
Copy link
Member

@peetereczek It seems while using the nspanel UI the brightness can only be controlled from the UI itself. There are no messages received when you change it in UI. The dim=50 command is a nextion command, but not a NSPanel command.

@peetereczek
Copy link

@peetereczek It seems while using the nspanel UI the brightness can only be controlled from the UI itself. There are no messages received when you change it in UI. The dim=50 command is a nextion command, but not a NSPanel command.

Maybe it is possible to expose brightness control?

@peepshow-21
Copy link

peepshow-21 commented Feb 3, 2022 via email

@peetereczek
Copy link

peetereczek commented Feb 4, 2022

Then using the custom screen, it is possible. However a little awkward. the
custom screen runs in reparse mode, so you dont talk to the Nextion
directly. But you could escape from that mode by sending;

DRAKJHSUYDGBNCJHGJKSHBDN
recmod=0

this will get you in Nextion mode, you can then send the dim command.
once that's done, you can switch back to reparse mode with

recmod=1

On Thu, 3 Feb 2022 at 21:48, peetereczek @.***> wrote:

@peetereczek https://github.com/peetereczek It seems while using the
nspanel UI the brightness can only be controlled from the UI itself. There
are no messages received when you change it in UI. The dim=50 command is
a nextion command, but not a NSPanel command.

Maybe it is possible to expose brightness control?


Reply to this email directly, view it on GitHub
#1469 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKBSYTH42DPOZ6SH4SNMEX3UZLZ2ZANCNFSM5GI6C43Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID:
@.***>

Point is to use original UI. And now ESP software blocks sending nextion command. That's why I'm asking

@peepshow-21
Copy link

"Point is to use original UI. And now ESP software blocks sending nextion command. That's why I'm asking"

Sorry, the thing I said above, that's how to on the STOCK screen, not custom. Typo !! :)

It's the breakout, so you can then send Nextion command. How you do in ESPHome I dont know as I use tamsota. You could try my NxPanel firmware for the device. It does all the stock one does and more. easy to revert back to. You can send JSON to do the DIM too.

{"dim": {"normal": 80, "low": 10 }}

among other things.

@DeanoXX
Copy link

DeanoXX commented Feb 4, 2022

So what is the nextion command sequence that needs to be sent ?

@peepshow-21
Copy link

Hi @DeanoXX.

While it's in reparse mode, which is the json command version, you simply need to write this specific sequence of bytes;

DRAKJHSUYDGBNCJHGJKSHBDN

This will temporally stop that mode. The reparse mode is recmod=1 mode. So as soon as you have send that sequence, you send the command

recmod=0

This will put it back in normal nextion command mode.

You can then issue your dim or any other commands.
Once complete, you just issue

recmod=1

to put it back how it was before.

Also, what do you think the chances are of you making a tweaked version of your interface for talking to stock hmi, to talk to my modified nxpanel screen firmware? If you have done the stock one, then it should be trivial changes for mine. But then you can do a lot more than stock, without needing any nextion and you can do it all via json just like the stock one?

Have a look here to see if you think it might be useful?
https://community.openhab.org/t/nxpanel-replacement-firmware-for-sonoff-nspanel/132869

Thanks.

@peetereczek
Copy link

peetereczek commented Mar 27, 2022

ESPHome version 2022.3.1 push NSPanel breaks integration / puts device into bootloop reporting [W][json:079]: Increasing memory allocation.

Config:
nspanel-1.txt
Logs from update:
logs_nspanel-1_upload.txt

[13:39:20][D][nspanel:349]: Sending JSON command: {"ATCEnable":0}
[13:39:20][D][nspanel:099]: Received NSPanel: Type=0x84 PAYLOAD={"ctype":"device","id":"climate","resourcetype":"ATC"} RAW=[7B.22.63.74.79.70.65.22.3A.22.64.65.76.69.63.65.22.2C.22.69.64.22.3A.22.63.6C.69.6D.61.74.65.22.2C.22.72.65.73.6F.75.72.63.65.74.79.70.65.22.3A.22.41.54.43.22.7D (54)]
[13:39:20][W][json:079]: Increasing memory allocation.
...
[13:39:25][W][json:079]: Increasing memory allocation.
INFO 192.168.50.151: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for 192.168.50.151
WARNING Disconnected from API
INFO 192.168.50.151: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
WARNING Can't connect to ESPHome API for 192.168.50.151: Hello timed out
INFO Trying to reconnect to 192.168.50.151 in the background

@mbo18
Copy link

mbo18 commented Mar 27, 2022

@peetereczek wait for 2022.3.2.

And while waiting, add this to your code:

external_components:
  - source: github://pr#2702
    components: ["nspanel"]
  - source: github://pr#3331
    components: ["json"]

@wifi75
Copy link

wifi75 commented Mar 29, 2022

these two lines were missing, now I have added them, was this the reason?

  • source: github://pr#3331
    components: ["json"]

@wifi75
Copy link

wifi75 commented Mar 29, 2022

i think it's wrong based on internal heat, screen being on, processing and so on. You might be able to get it closer, but i think it;s prob a bit of a lost cause to get a right reading from it. you might get it right when the room is one temp, but when the room gets hotter or colder it will be wrong again.. personally, get another heat temp reading in room and use the reading from that

hello how get another heat temp reading in room and use the reading from that

@Hedda
Copy link
Author

Hedda commented Mar 29, 2022

@Tropaion
Copy link

The stock GUI has two bars which indicate the state of relay.
Is it possible to "disconntect" them from relay, expose them to HA to controll them via HA?
I want to show other states with it than the relays.

@mkaatman
Copy link

Hopefully someone will correct me if I'm wrong but I don't believe you can with the stock display.

@Tropaion
Copy link

And is there a nice/good way to add the weather?
I already have a weather entity in HA from the plugin Met.no, is it possible to use the entity data for the nspanel?

@mkaatman
Copy link

mkaatman commented Apr 17, 2022

i think it's wrong based on internal heat, screen being on, processing and so on. You might be able to get it closer, but i think it;s prob a bit of a lost cause to get a right reading from it. you might get it right when the room is one temp, but when the room gets hotter or colder it will be wrong again.. personally, get another heat temp reading in room and use the reading from that

hello how get another heat temp reading in room and use the reading from that

I don't know how similar the calibration is from unit to unit, but this is what I'm using so far.

  - platform: ntc
    id: temperature
    sensor: resistance_sensor
    calibration:
      #b_constant: 3950
      #reference_temperature: 25.03889°C
      #reference_resistance: 11.7kOhm
      - 11.7kOhm -> 25.03889°C
      - 12.1kOhm -> 24.12222°C
      - 13.7kOhm -> 20.55556°C
    name: $friendly_name Temperature
    unit_of_measurement: "°F"
    filters:
      - lambda: return x * (9.0/5.0) + 32.0;

And is there a nice/good way to add the weather? I already have a weather entity in HA from the plugin Met.no, is it possible to use the entity data for the nspanel?

Yes, there are a few different approaches but check out DeanoXX's example on github: https://github.com/DeanoXX/esphome-config

It works great.

@Tropaion
Copy link

Thanks^^ I just hoped it's possible to use weather from same source so that the WebUI and Panel show the same data but I will just use this.

@thomasSTS
Copy link

thomasSTS commented May 16, 2022

I am having an issue with sending my TFT to my NSPanel.
I have tried all kinds of combinations that I have found during my research. With and without quotes for the tft source
I have my PI 4 (running Home Assistant 8, and EPSHome Current version: 2022.4.0) connected to wifi

I am using a wifi mesh (Google Nest) but keep getting:

INFO 192.168.86.99: Ping timed out!
INFO Disconnected from ESPHome API for 192.168.86.99
WARNING Disconnected from API

Any help would be appreciated!

[secrets files, blanked out where necessary]

api_pwd: "..."
tft_prefix: "http:192.168.86.90:8123/local"
tft_office_switch: "http:192.168.86.90:8123/local/officeswitch.tft"
ota_pwd: "..."
wifi_ssid: "..."
wifi_pwd: "..."
latitude: ...
longitude: ...
office-switch-ip: 192.168.86.99

Below is my config:

# Set some variables for convenience
substitutions:
  node_name: office-switch
  device_name: office-switch

# Note: this may not be needed if the pull request has been merged.
# Check https://github.com/esphome/esphome/pull/2956 for current status.
external_components:
  - source: github://pr#2956
    components: [nextion]
    refresh: 1h

esphome:
  name: $node_name
  comment: $device_name

esp32:
  board: esp32dev

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pwd
  manual_ip:
    static_ip: 192.168.86.99
    gateway: 192.168.86.1
    subnet: 255.255.255.0
    dns1: 192.168.86.1
    dns2: 8.8.8.8
  reboot_timeout: 0s
  power_save_mode: light
  fast_connect: true
    
# Enable logging
logger:

# Enable wireless updates
ota:
  password: !secret ota_pwd
  
# Enable Home Assistant API
api:
  password: !secret api_pwd
  services:
    # Service to play a song
    - service: play_rtttl
      variables:
        song_str: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return song_str;'
    - service: upload_tft
      then:
        - lambda: 'id(disp1)->upload_tft();'

# A reboot button is always useful
button:
  - platform: restart
    name: Restart $device_name

# Define some inputs
binary_sensor:
  - platform: gpio
    name: $device_name Left Button
    pin:
      number: 14
      inverted: true
    on_click:
      - switch.toggle: relay_1

  - platform: gpio
    name: $device_name Right Button
    pin:
      number: 27
      inverted: true
    on_click:
      - switch.toggle: relay_2
  
  - platform: nextion
    name: $device_name Play Button
    page_id: 0
    component_id: 2

  - platform: nextion
    name: $device_name On Button
    page_id: 0
    component_id: 3

  - platform: nextion
    name: $device_name Off Button
    page_id: 0
    component_id: 4

  - platform: nextion
    name: $device_name Red Button
    page_id: 0
    component_id: 6

sensor:
  - platform: wifi_signal
    name: $device_name WiFi Signal
    update_interval: 60s

  - platform: ntc
    id: temperature
    sensor: resistance_sensor
    calibration:
      b_constant: 3950
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: $device_name Temperature

  - platform: resistance
    id: resistance_sensor
    sensor: ntc_source
    configuration: DOWNSTREAM
    resistor: 11.2kOhm

  - platform: adc
    id: ntc_source
    pin: 38
    update_interval: 10s
    attenuation: 11db

  # Grab current temperature from Home Assistant
  - platform: homeassistant
    id: current_temperature
    entity_id: weather.home
    attribute: temperature
    on_value:
      # Push it to the display
      then:
        - lambda: 'id(disp1).set_component_text_printf("temp", "%.1f ""\xb0""F", x);'

# Define some outputs
switch:
  # The two relays
  - platform: gpio
    name: $device_name Relay 1
    id: relay_1
    pin:
      number: 22
  - platform: gpio
    name: $device_name Relay 2
    id: relay_2
    pin:
      number: 19

  # Pin 4 always needs to be on to power up the display
  - platform: gpio
    id: screen_power
    entity_category: config
    pin:
      number: 4
      inverted: true
    restore_mode: ALWAYS_ON

number:
  platform: template
  name: $device_name Brightness
  id: brightness
  entity_category: config
  unit_of_measurement: '%'
  min_value: 0
  max_value: 100
  step: 1
  initial_value: 30
  set_action:
    then:
      - lambda: 'id(disp1).set_backlight_brightness(x/100);'

# Configure the internal bleeper
output:
  - platform: ledc
    id: buzzer_out
    pin:
      number: 21

# Enable ringtone music support
rtttl:
  id: buzzer
  output: buzzer_out

# Configure UART for communicating with the screen
uart:
  id: tf_uart
  tx_pin: 16
  rx_pin: 17
  baud_rate: 115200

# Configure the screen itself
display:
  - platform: nextion
    id: disp1
    uart_id: tf_uart
    tft_url: !secret tft_office_switch
    # A little fun...
    on_setup:
      then:
        - number.set:
            id: brightness
            value: 30
        - lambda: |-
            id(disp1).set_component_text_printf(
              "temp", "%.1f ""\xb0""F", id(current_temperature).state
            );
        - rtttl.play: "twobits:d=4,o=5,b=220:c6,8g,8g,a,g,p,b,c6"

And my log file:

INFO Reading configuration /config/esphome/office-switch.yaml...
INFO Updating https://github.com/esphome/esphome.git@pull/3331/head
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 192.168.86.99 using esphome API
INFO Successfully connected to 192.168.86.99
[07:23:21][I][app:102]: ESPHome version 2022.4.0 compiled on May 16 2022, 06:11:36
[07:23:21][C][wifi:491]: WiFi:
[07:23:21][C][wifi:353]:   Local MAC: C4:DD:57:DB:05:70
[07:23:21][C][wifi:354]:   SSID: 'CT Tech'[redacted]
[07:23:21][C][wifi:355]:   IP Address: 192.168.86.99
[07:23:21][C][wifi:357]:   BSSID: E4:5E:1B:B1:27:A2[redacted]
[07:23:21][C][wifi:358]:   Hostname: 'office-switch'
[07:23:21][C][wifi:360]:   Signal strength: -20 dB ▂▄▆█
[07:23:21][C][wifi:364]:   Channel: 6
[07:23:21][C][wifi:365]:   Subnet: 255.255.255.0
[07:23:21][C][wifi:366]:   Gateway: 192.168.86.1
[07:23:21][C][wifi:367]:   DNS1: 192.168.86.1
[07:23:21][C][wifi:368]:   DNS2: 8.8.8.8
[07:23:21][C][logger:233]: Logger:
[07:23:21][C][logger:234]:   Level: DEBUG
[07:23:21][C][logger:235]:   Log Baud Rate: 115200
[07:23:21][C][logger:236]:   Hardware UART: UART0
[07:23:21][C][uart.arduino_esp32:107]: UART Bus:
[07:23:21][C][uart.arduino_esp32:108]:   TX Pin: GPIO16
[07:23:21][C][uart.arduino_esp32:109]:   RX Pin: GPIO17
[07:23:21][C][uart.arduino_esp32:111]:   RX Buffer Size: 256
[07:23:21][C][uart.arduino_esp32:113]:   Baud Rate: 115200 baud
[07:23:21][C][uart.arduino_esp32:114]:   Data Bits: 8
[07:23:21][C][uart.arduino_esp32:115]:   Parity: NONE
[07:23:21][C][uart.arduino_esp32:116]:   Stop bits: 1
[07:23:21][C][switch.gpio:050]: GPIO Switch 'office-switch Relay 1'
[07:23:21][C][switch.gpio:051]:   Pin: GPIO22
[07:23:21][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
[07:23:21][C][switch.gpio:050]: GPIO Switch 'office-switch Relay 2'
[07:23:21][C][switch.gpio:051]:   Pin: GPIO19
[07:23:21][C][switch.gpio:073]:   Restore Mode: Restore (Defaults to OFF)
[07:23:21][C][switch.gpio:050]: GPIO Switch 'screen_power'
[07:23:21][C][switch.gpio:051]:   Pin: GPIO4
[07:23:21][C][switch.gpio:073]:   Restore Mode: Always ON
[07:23:21][C][template.number:050]: Template Number 'office-switch Brightness'
[07:23:21][C][template.number:050]:   Unit of Measurement: '%'
[07:23:21][C][template.number:051]:   Optimistic: NO
[07:23:21][C][template.number:052]:   Update Interval: 60.0s
[07:23:21][C][ledc.output:118]: LEDC Output:
[07:23:21][C][ledc.output:119]:   Pin GPIO21
[07:23:21][C][ledc.output:120]:   LEDC Channel: 0
[07:23:21][C][ledc.output:121]:   Frequency: 1047.0 Hz
[07:23:21][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'office-switch Left Button'
[07:23:21][C][gpio.binary_sensor:016]:   Pin: GPIO14
[07:23:21][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'office-switch Right Button'
[07:23:21][C][gpio.binary_sensor:016]:   Pin: GPIO27
[07:23:21][C][restart.button:017]: Restart Button 'Restart office-switch'
[07:23:21][C][ntc:014]: NTC Sensor 'office-switch Temperature'
[07:23:21][C][ntc:014]:   Device Class: 'temperature'
[07:23:21][C][ntc:014]:   State Class: 'measurement'
[07:23:21][C][ntc:014]:   Unit of Measurement: '°C'
[07:23:21][C][ntc:014]:   Accuracy Decimals: 1
[07:23:21][C][resistance:010]: Resistance Sensor 'resistance_sensor'
[07:23:21][C][resistance:010]:   State Class: 'measurement'
[07:23:21][C][resistance:010]:   Unit of Measurement: 'Ω'
[07:23:21][C][resistance:010]:   Accuracy Decimals: 1
[07:23:21][C][resistance:010]:   Icon: 'mdi:flash'
[07:23:21][C][resistance:011]:   Configuration: DOWNSTREAM
[07:23:21][C][resistance:012]:   Resistor: 11200.00Ω
[07:23:21][C][resistance:013]:   Reference Voltage: 3.3V
[07:23:21][C][adc:062]: ADC Sensor 'ntc_source'
[07:23:21][C][adc:062]:   Device Class: 'voltage'
[07:23:21][C][adc:062]:   State Class: 'measurement'
[07:23:21][C][adc:062]:   Unit of Measurement: 'V'
[07:23:21][C][adc:062]:   Accuracy Decimals: 2
[07:23:21][C][adc:072]:   Pin: GPIO38
[07:23:21][C][adc:087]:  Attenuation: 11db (max 3.9V)
[07:23:21][C][adc:094]:   Update Interval: 10.0s
[07:23:21][C][rtttl:018]: Rtttl
[07:23:21][C][nextion:123]: Nextion:
[07:23:21][C][nextion:124]:   Device Model:     NX4832F035_011C
[07:23:21][C][nextion:125]:   Firmware Version: 48
[07:23:21][C][nextion:126]:   Serial Number:    E06434018F030A5C
[07:23:21][C][nextion:127]:   Flash Size:       16777216
[07:23:21][C][nextion:128]:   Wake On Touch:    True
[07:23:22][C][mdns:084]: mDNS:
[07:23:22][C][mdns:085]:   Hostname: office-switch
[07:23:22][C][ota:085]: Over-The-Air Updates:
[07:23:22][C][ota:086]:   Address: 192.168.86.99:3232
[07:23:22][C][ota:089]:   Using Password.
[07:23:22][C][api:138]: API Server:
[07:23:22][C][api:139]:   Address: 192.168.86.99:6053
[07:23:22][C][api:143]:   Using noise encryption: NO
[07:23:22][C][wifi_signal.sensor:009]: WiFi Signal 'office-switch WiFi Signal'
[07:23:22][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[07:23:22][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[07:23:22][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[07:23:22][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[07:23:22][C][homeassistant.sensor:030]: Homeassistant Sensor 'current_temperature'
[07:23:22][C][homeassistant.sensor:030]:   State Class: ''
[07:23:22][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[07:23:22][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[07:23:22][C][homeassistant.sensor:031]:   Entity ID: 'weather.home'
[07:23:22][C][homeassistant.sensor:033]:   Attribute: 'temperature'
[07:23:28][D][sensor:125]: 'ntc_source': Sending state 1.57200 V with 2 decimals of accuracy
[07:23:28][D][resistance:039]: 'resistance_sensor' - Resistance 10188.9Ω
[07:23:28][D][sensor:125]: 'resistance_sensor': Sending state 10188.88965 Ω with 1 decimals of accuracy
[07:23:28][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.6°C
[07:23:28][D][sensor:125]: 'office-switch Temperature': Sending state 24.57946 °C with 1 decimals of accuracy
[07:23:33][D][nextion_upload:169]: Connected
[07:23:33][D][nextion_upload:175]: Requesting URL: http:192.168.86.90:8123/local/officeswitch.tft
INFO 192.168.86.99: Ping timed out!
INFO Disconnected from ESPHome API for 192.168.86.99
WARNING Disconnected from API
INFO Successfully connected to 192.168.86.99
[07:23:47][D][nextion:253]: Manually set nextion report ready
[07:23:47][D][nextion:330]: Nextion is setup
[07:23:47][D][number:010]: 'office-switch Brightness' - Setting
[07:23:47][D][number:029]:   Value: 30.000000
[07:23:47][D][rtttl:038]: Playing song twobits
[07:23:47][D][ledc.output:041]: Calculating resolution bit-depth for frequency 1047.000000
[07:23:47][D][ledc.output:046]: Resolution calculated as 16
[07:23:47][E][nextion:262]: Nextion queue is empty!
[07:23:48][D][ledc.output:041]: Calculating resolution bit-depth for frequency 784.000000
[07:23:48][D][ledc.output:046]: Resolution calculated as 16
[07:23:48][D][ledc.output:041]: Calculating resolution bit-depth for frequency 784.000000
[07:23:48][D][ledc.output:046]: Resolution calculated as 16
[07:23:48][D][ledc.output:041]: Calculating resolution bit-depth for frequency 880.000000
[07:23:48][D][ledc.output:046]: Resolution calculated as 16
[07:23:48][D][sensor:125]: 'ntc_source': Sending state 1.58100 V with 2 decimals of accuracy
[07:23:48][D][resistance:039]: 'resistance_sensor' - Resistance 10300.9Ω
[07:23:48][D][sensor:125]: 'resistance_sensor': Sending state 10300.87305 Ω with 1 decimals of accuracy
[07:23:48][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.3°C
[07:23:48][D][sensor:125]: 'office-switch Temperature': Sending state 24.33437 °C with 1 decimals of accuracy
[07:23:48][D][ledc.output:041]: Calculating resolution bit-depth for frequency 784.000000
[07:23:48][D][ledc.output:046]: Resolution calculated as 16
[07:23:49][D][ledc.output:041]: Calculating resolution bit-depth for frequency 988.000000
[07:23:49][D][ledc.output:046]: Resolution calculated as 16
[07:23:49][D][ledc.output:041]: Calculating resolution bit-depth for frequency 1047.000000
[07:23:49][D][ledc.output:046]: Resolution calculated as 16
[07:23:49][D][rtttl:094]: Playback finished
[07:23:58][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:23:58][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:23:58][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:23:58][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:23:58][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:24:08][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:24:08][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:24:08][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:24:08][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:24:08][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:24:18][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:24:18][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:24:18][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:24:18][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:24:18][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:24:28][D][sensor:125]: 'ntc_source': Sending state 1.58000 V with 2 decimals of accuracy
[07:24:28][D][resistance:039]: 'resistance_sensor' - Resistance 10288.4Ω
[07:24:28][D][sensor:125]: 'resistance_sensor': Sending state 10288.37305 Ω with 1 decimals of accuracy
[07:24:28][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:24:28][D][sensor:125]: 'office-switch Temperature': Sending state 24.36157 °C with 1 decimals of accuracy
[07:24:33][D][sensor:125]: 'office-switch WiFi Signal': Sending state -21.00000 dBm with 0 decimals of accuracy
[07:24:38][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:24:38][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:24:38][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:24:38][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:24:38][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:24:48][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:24:48][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:24:48][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:24:48][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:24:48][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:24:58][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:24:58][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:24:58][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:24:58][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:24:58][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:25:08][D][sensor:125]: 'ntc_source': Sending state 1.57100 V with 2 decimals of accuracy
[07:25:08][D][resistance:039]: 'resistance_sensor' - Resistance 10176.5Ω
[07:25:08][D][sensor:125]: 'resistance_sensor': Sending state 10176.51758 Ω with 1 decimals of accuracy
[07:25:08][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.6°C
[07:25:08][D][sensor:125]: 'office-switch Temperature': Sending state 24.60673 °C with 1 decimals of accuracy
[07:25:18][D][sensor:125]: 'ntc_source': Sending state 1.57100 V with 2 decimals of accuracy
[07:25:18][D][resistance:039]: 'resistance_sensor' - Resistance 10176.5Ω
[07:25:18][D][sensor:125]: 'resistance_sensor': Sending state 10176.51758 Ω with 1 decimals of accuracy
[07:25:18][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.6°C
[07:25:18][D][sensor:125]: 'office-switch Temperature': Sending state 24.60673 °C with 1 decimals of accuracy
[07:25:28][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:25:28][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:25:28][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:25:28][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:25:28][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:25:33][D][sensor:125]: 'office-switch WiFi Signal': Sending state -24.00000 dBm with 0 decimals of accuracy
[07:25:38][D][sensor:125]: 'ntc_source': Sending state 1.57900 V with 2 decimals of accuracy
[07:25:38][D][resistance:039]: 'resistance_sensor' - Resistance 10275.9Ω
[07:25:38][D][sensor:125]: 'resistance_sensor': Sending state 10275.88574 Ω with 1 decimals of accuracy
[07:25:38][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:25:38][D][sensor:125]: 'office-switch Temperature': Sending state 24.38879 °C with 1 decimals of accuracy
[07:25:48][D][sensor:125]: 'ntc_source': Sending state 1.58100 V with 2 decimals of accuracy
[07:25:48][D][resistance:039]: 'resistance_sensor' - Resistance 10300.9Ω
[07:25:48][D][sensor:125]: 'resistance_sensor': Sending state 10300.87305 Ω with 1 decimals of accuracy
[07:25:48][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.3°C
[07:25:48][D][sensor:125]: 'office-switch Temperature': Sending state 24.33437 °C with 1 decimals of accuracy
[07:25:58][D][sensor:125]: 'ntc_source': Sending state 1.58100 V with 2 decimals of accuracy
[07:25:58][D][resistance:039]: 'resistance_sensor' - Resistance 10300.9Ω
[07:25:58][D][sensor:125]: 'resistance_sensor': Sending state 10300.87305 Ω with 1 decimals of accuracy
[07:25:58][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.3°C
[07:25:58][D][sensor:125]: 'office-switch Temperature': Sending state 24.33437 °C with 1 decimals of accuracy
[07:26:08][D][sensor:125]: 'ntc_source': Sending state 1.57800 V with 2 decimals of accuracy
[07:26:08][D][resistance:039]: 'resistance_sensor' - Resistance 10263.4Ω
[07:26:08][D][sensor:125]: 'resistance_sensor': Sending state 10263.41406 Ω with 1 decimals of accuracy
[07:26:08][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.4°C
[07:26:08][D][sensor:125]: 'office-switch Temperature': Sending state 24.41601 °C with 1 decimals of accuracy
[07:26:18][D][nextion_upload:169]: Connected
[07:26:18][D][nextion_upload:175]: Requesting URL: http:192.168.86.90:8123/local/officeswitch.tft
INFO 192.168.86.99: Ping timed out!
INFO Disconnected from ESPHome API for 192.168.86.99
WARNING Disconnected from API
INFO Successfully connected to 192.168.86.99
[07:26:28][D][api:102]: Accepted ::FFFF:C0A8:565A
[07:26:28][D][api.connection:827]: Home Assistant 2022.5.4 (::FFFF:C0A8:565A): Connected successfully
[07:26:29][D][homeassistant.sensor:022]: 'weather.home::temperature': Got attribute state 71.00
[07:26:29][D][sensor:125]: 'current_temperature': Sending state 71.00000  with 1 decimals of accuracy
[07:26:29][D][sensor:125]: 'ntc_source': Sending state 1.57400 V with 2 decimals of accuracy
[07:26:29][D][resistance:039]: 'resistance_sensor' - Resistance 10213.7Ω
[07:26:29][D][sensor:125]: 'resistance_sensor': Sending state 10213.67383 Ω with 1 decimals of accuracy
[07:26:29][D][ntc:026]: 'office-switch Temperature' - Temperature: 24.5°C
[07:26:29][D][sensor:125]: 'office-switch Temperature': Sending state 24.52495 °C with 1 decimals of accuracy

@edwardtfn
Copy link

esphome/esphome#5868

@nagyrobi nagyrobi closed this as completed Apr 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.