bruxy70 / home-assistant-esphome-weather-station Goto Github PK
View Code? Open in Web Editor NEWNextion display with ESP8266 microcontroller (Wemos D1 mini) showing Home Assistant temperature sensors and weather forecast
License: MIT License
Nextion display with ESP8266 microcontroller (Wemos D1 mini) showing Home Assistant temperature sensors and weather forecast
License: MIT License
Hello there.
I have cloned your project successfully with all the hmi/code uptodate changes with esphome 2021.11.1 and nov home assistant as well.
The phenomena I'm facing is that after a sudden network disconnect esphome is able to connect again to the nodemcu but it seems that display lambda loop is not running anymore.
INFO nextion_test.local: Ping timed out!
INFO Disconnected from ESPHome API for nextion_test.local
WARNING Disconnected from API
INFO Successfully connected to nextion_test.local
[17:45:55][D][sntp:075]: Synchronized time: 2021-11-28 17:45:55
[17:45:56][D][api:098]: Accepted 192.168.86.80
[17:45:56][D][api.connection:747]: Home Assistant 2021.11.5 (192.168.86.80): Connected successfully
[17:45:56][D][homeassistant.sensor:024]: 'sensor.temperature_158d00022266cc': Got state 23.20
[17:45:57][D][sensor:113]: 'temperature_outside': Sending state 23.20000 with 1 decimals of accuracy
Is this phenomena familiar to you? can you tell how to restart both nextion and esp processor in case of network reconnect and get back to the display loop?
Regards
Asaf
I downloaded the HMI file but on trying to open it in the Nextion editor I get an error message and the file fails to open.
"Wrong resource file or resource file has been damaged"
I tried to copy your weather station.. and i would like a button on the nextion display to show the real world state of a light.. when it is turned ON by the physical switch.. like when its ON then the button on the nextion display would change too... I manage to turn the lights ON or OFF via nextion display button.. but i had no luck in changing its actual state if i turn the light ON using the physical switch... it shows OFF on the nextion display button.. and i have a error log on esphome like this...
Sending command 'lightlamp.pic = 1' failed because no ACK was received
here is part of my esphome config..
display:
Do you know what am i missing here? thanks !
hi fairly new to the nextion display so unsure if iv done this correctly
flashed d1 mini with the weather yamel no problems
loaded the hmi file into the latest Nextion Editor and exported a .tfi file which i then flash onto the display again all good so far
now hook up the rx tx and power everything boots up and display powers up but the sensors dont get populated and doesnt flick between the two pages. only thing i can do is press the plus n minus buttons on the screen for brightness.
i added the example sensors to my configuration.yamel they show up in home assistant
i feel iv probably missed something obvious :) but stuck
thanks
Hi I'm testing your weather station with an esp d1 mini and a 3.5 inch nexion display, I loaded the yaml on esp home and everything works, the data updates, but uart doesn't communicate between nexion and d1 mini? what can it be?
Hi!
I followed your guide 100% but I dont get the display to show values from sensors, it just shows the first picture and not changes pictures eather.
What do I wrong?
watched some of your videos aswell as trying to understand the code.
Even no problem with the GUI editor from nextion.
But what's missing is another 5min to your videos about the HOW TO integrate things with HA.
A simply .. this should go there .. isn't enough information.
Same applies to the HMI file. I'm lost guessing if this must be warped into the display onto an SD bumped into the displays SD card slot or simply should sit inside a HA ESPhome project.
Since so, thanks for spreading the word and videos about that things should work as expexted but it's still a miracle to me about how to get these things together. Looks to me as if I did understand if ever 10% of all steps one has to do.
Perhaps you could do another video showing the step by step about where to place each single file from here into which target, let if be ESPhome or HA.
Hi there,
I've built the device, but the display is not showing any value unfortunately. I don't know where the problem can be. I have similar setup to you, the homeassistant sensors values are being shown on ESPHome Log with the display connected, pins correctly set, but still no values on the display. Right now using the same lambda as you, but getting weird warning during compilation:
Compiling /data/meteo1/.pioenvs/meteo1/src/main.cpp.o
src/main.cpp:255:3: warning: multi-line comment [-Wcomment]
// lambda: !lambda " Do not wait for ack (this delays the whole procedure a lot, and
^
Anyway I tried such simple lambda like this:
it.set_wait_for_ack(false);
it.set_component_text_printf("inside","%2.1f",id(temperature_inside).state);
which doesn't show any warning during compilation, but inside temperature is not shown anyway
[15:38:06][C][sntp:043]: SNTP Time:
[15:38:06][C][sntp:044]: Server 1: '0.pool.ntp.org'
[15:38:06][C][sntp:045]: Server 2: '1.pool.ntp.org'
[15:38:06][C][sntp:046]: Server 3: '2.pool.ntp.org'
[15:38:06][C][sntp:047]: Timezone: 'CET-1CEST-2,M3.5.0/2,M10.4.0/3'
[15:38:06][C][homeassistant.binary_sensor:032]: Homeassistant Binary Sensor 'somebody_home'
[15:38:06][C][homeassistant.binary_sensor:033]: Entity ID: 'binary_sensor.somebody_home'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'sun_elevation'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.sun_elevation'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'temperature_inside'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.teplota_loznice'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'temperature_outside'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.temperature_outside'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'temperature_pool'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.temperature_pool'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'today_min'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.today_min'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'today_max'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.today_max'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'today_rain'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.today_rain'
[15:38:06][C][homeassistant.sensor:024]: Homeassistant Sensor 'today_icon'
[15:38:06][C][homeassistant.sensor:024]: Unit of Measurement: ''
[15:38:06][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[15:38:06][C][homeassistant.sensor:025]: Entity ID: 'sensor.today_icon'
[15:38:09][D][api.connection:583]: Client 'Home Assistant 0.104.0 (10.10.110.35)' connected successfully!
[15:38:09][D][sntp:059]: Synchronized time: Thu Jan 16 15:38:09 2020
[15:38:10][D][homeassistant.binary_sensor:021]: 'binary_sensor.somebody_home': Got state ON
[15:38:10][D][binary_sensor:034]: 'somebody_home': Sending initial state ON
[15:38:10][D][homeassistant.sensor:019]: 'sensor.teplota_loznice': Got state 21.60
[15:38:10][D][sensor:092]: 'temperature_inside': Sending state 21.60000 with 1 decimals of accuracy
[15:38:10][D][homeassistant.sensor:019]: 'sensor.today_min': Got state -3.10
[15:38:10][D][sensor:092]: 'today_min': Sending state -3.10000 with 1 decimals of accuracy
[15:38:10][D][homeassistant.sensor:019]: 'sensor.today_max': Got state 7.50
[15:38:10][D][sensor:092]: 'today_max': Sending state 7.50000 with 1 decimals of accuracy
[15:38:10][D][homeassistant.sensor:019]: 'sensor.today_rain': Got state 0.10
[15:38:10][D][sensor:092]: 'today_rain': Sending state 0.10000 with 1 decimals of accuracy
[15:38:10][D][homeassistant.sensor:019]: 'sensor.today_icon': Got state 8.00
[15:38:10][D][sensor:092]: 'today_icon': Sending state 8.00000 with 1 decimals of accuracy
Trying to fit your code with my needs I found this:
if (id(sun_elevation)>0) {
It seems it doesn't work for me unless I add here:
if (id(sun_elevation).state>0) {
PS. Finally I replaced this with the Xiaomi illuminance value, which I find more suited for this functionality.
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
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:
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:
globals:
display:
Hi Vaclav,
first of all thank you very much for this project. I made one for me too, and I used the 3d print model - fits perfectly.
But since, I don't have a pool I would like to put there other measurement and here is the question: from where you took the icons?
I would like to find one with similar look for the other measurement (it will be humidity actually).
PS. I am watching your YT videos. Keep it up!
Greetings from Poland.
What is darksky, can´t find it in Homeassistant?!
Michael
Is it possible to run your project on TFT with spi interface?
I wanted to make weather station by adafruit, but I liked your project more. The display I bought is TFT 2.4 spi touch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.