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

Waiting for ACK timed out! #1

Closed
gijsje opened this issue Aug 3, 2019 · 2 comments
Closed

Waiting for ACK timed out! #1

gijsje opened this issue Aug 3, 2019 · 2 comments

Comments

@gijsje
Copy link

gijsje commented Aug 3, 2019

Thank you for the creating this.
I have been playing with my nextion for a long time but am not able to get it to work with any programming.
The only thing i do get is:

[14:26:02][W][nextion:036]: Waiting for ACK timed out!
[14:26:02][W][nextion:083]: Sending command 'outside.txt="21.6"' failed because no ACK was received

I did change the pins around in the software and physical but nothing works

I am using a 5" display but that should not really care i guess
I also did try with another 2.4 display with the same thing

`# This is ESPHome configuration file. This goes to the esphome folder

You need to provide your WiFi ssis/password and passwords for API and OTA (or put them in your esphome/secrets.yaml)

esphome:
name: display_weather
platform: ESP8266
board: d1_mini_pro

wifi:
ssid: SSID
password: PASS
fast_connect: true

api:
password: PASS

ota:
password: PASS

logger:
baud_rate: 0 # Disable UART logging (pins GPIO1/3 are used for Nextion communication)

uart:
rx_pin: D1
tx_pin: D6
baud_rate: 9600

time:

  • platform: sntp
    id: sntp_time

sensor:

  • platform: homeassistant # Inside temperature
    id: temperature_inside
    entity_id: sensor.kantoor_temperatuur

  • platform: homeassistant # Outside temperature
    id: temperature_outside
    entity_id: sensor.tuin_temperatuur

  • platform: homeassistant # Swimming pool
    id: temperature_pool
    entity_id: sensor.keuken_koelkast_temperatuur

  • platform: homeassistant # Forecast minimal temperature
    id: today_min
    entity_id: sensor.today_min

  • platform: homeassistant # Forecast maximal temperature
    id: today_max
    entity_id: sensor.today_max

  • platform: homeassistant # Forecast precipitation
    id: today_rain
    entity_id: sensor.today_rain

  • platform: homeassistant # Forecast icon
    id: today_icon
    entity_id: sensor.today_icon

binary_sensor:

  • platform: homeassistant
    id: somebody_home
    entity_id: binary_sensor.kantoor_beweging

globals:

  • id: first_page # First page of the display?
    type: bool
    restore_value: no
  • id: display_on # Is display on?
    type: bool
    restore_value: no

display:

  • platform: nextion
    id: teplomer
    update_interval: 5s
    lambda: |-
    // Turn display on when somebody is home. Only update when display on.
    if (id(somebody_home).state) {
    if (!id(display_on)) {
    it.set_backlight_brightness(50);
    id(display_on)=true;
    }
    // Swich first/second page on each update (every 5 seconds)
    if (id(first_page)) {
    it.goto_page("forecast");
    it.send_command_printf("%s.pic=%.0f", "weather",id(today_icon).state);
    it.set_component_text_printf("minmax","%.0f/%.0f",id(today_min).state,id(today_max).state);
    if (isnan(id(today_rain).state)) {
    it.set_component_text("rain","-");
    } else {
    it.set_component_text_printf("rain","%.0f",id(today_rain).state);
    }
    auto time = id(sntp_time).now();
    it.set_component_text_printf("hour","%02d",time.hour);
    it.set_component_text_printf("minute","%02d",time.minute);
    } else {
    it.goto_page("temperature");
    it.set_component_text_printf("inside","%2.1f",id(temperature_inside).state);
    it.set_component_text_printf("outside","%2.1f",id(temperature_outside).state);
    it.set_component_text_printf("pool","%2.1f",id(temperature_pool).state);
    }
    id(first_page) = !id(first_page); // Switch page
    } else {
    // Turn off the display if nobody is home.
    if (id(display_on)) {
    it.set_backlight_brightness(0);
    id(display_on)=false;
    }
    }`
@bruxy70
Copy link
Owner

bruxy70 commented Aug 25, 2019

Sorry, I missed your message.

I was getting the error as well, but the display worked.
I made a change to the code not to wait for the ack.

it.set_wait_for_ack(false);

But that won't fix your issue I think. What do you mean by "nothing works". Is the display on?
Try replacing the lambda by something simple first, such as:

lambda: |-
it.set_wait_for_ack(false);
it.set_component_text("inside","test")

What does the display show?

@bruxy70
Copy link
Owner

bruxy70 commented Aug 26, 2019

@gijsje , BTW, you are saying that you tried with 5" display - did the Nextion Editor allow you to upload the screen I designed for 2.4" to the 5" screen?

@bruxy70 bruxy70 closed this as completed Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants