pilotak / mqtt-weather-display

Simple weather and time display using ESP8266 and ILI9341
MIT License
6 stars 2 forks source link

cant compile with IDE Arduino #1

Closed Electronlibre2012 closed 5 years ago

Electronlibre2012 commented 5 years ago

Hello Pilotak,

sorry to bother you, i am relally interesting by your project but i dont suceed to compile your mqtt-weather-display.ino...lots of errors,

which library do you use for WifiManager.h and JC-button.h please?

And the TFT you use is I2c?, which one is it please?

I have a SPI one, doesnt work with your sketch i think.

Thanks

Olivier

pilotak commented 5 years ago

also try sudo systemctl stop zigbee2mqtt

Electronlibre2012 commented 5 years ago

i try all you said, with no success. The only way it works is to stop the 4 automations (forecast, in-temp, out-temp, out-temp-feel and power). I even stop zigbee2mqtt (addon because i am in hassio, your sudo... will doent work for me) and stop Mosquitto, if i put the automation on, its a mess! I will search tonight if i can put one or more automation without a mess, but seems just only one is enough to stop my getaways working... i found a guy who have the same problem (i think) but i dont know to solved it for myself???if you have a suggestion... https://github.com/Koenkk/zigbee2mqtt/issues/629

thanks! have a nice day

Electronlibre2012 commented 5 years ago

hello,

i found a way to make it work : i create an automation in "config" "automation" with the UI. Then an "id" number is attribuate by HA automaticaly to the automation and i complete the automation in "configurator" tool. It works. Seems it slower my gateways functions and continue to generate errors like:

2019-09-09 21:37:52 ERROR (SyncWorker_13) [xiaomi_gateway] No data in response from hub None
2019-09-09 21:37:54 ERROR (SyncWorker_5) [xiaomi_gateway] Cannot connect to Gateway

but it seems to doesnt crash my gateways...

Strange...

Any idea please?

here is the automation that "works" :

- id: '1568050232806'
  alias: in temp changed
  trigger:
  - entity_id: sensor.temperature_158d000349c288
    platform: state
  condition:
  - condition: template
    value_template: '"{{ trigger.from_state.state != trigger.to_state.state }}"'
  action:
  - service: mqtt.publish
    data_template:
      topic: mqtt-weather-display/in-temp
      qos: 1
      retain: true
      payload: >
        {%- set in_temp = states.sensor.temperature_158d000349c288.state -%}
        {%- if in_temp is not none and in_temp != "unavailable" -%}
          {{ in_temp }}
        {%- endif -%}

the only changes is the "id" number attribuate by HA...

pilotak commented 5 years ago

Don't know really, you should be taking it further with the gateway, because it's silly not to have automations and MQTT together

Electronlibre2012 commented 5 years ago

hello,

thanks again for your reply,

i dont understand...i have install zigbee2mqtt and when i do an automation...same...my gateway doesnt work anymore...so there is interaction between mqtt and xiaomi gateway...dont know how and where and why....

Sure now its not your project that is the problem...just the automation and Mqtt with xiaomi gateway...

I have post the issue but nobody reply...

To be continued...

Electronlibre2012 commented 5 years ago

i got news! lol

i have make a fresh install, i have my mosquitto server and my add on zigbee2mqtt and 2 devices pair on the coordinator. I have automations, all work great.

I reflash the weather display, reconfigure and right now he connect to my hassio mqtt, the gateway are down. BUT

I unplug the 2 gateway and plug back, all works tohgether! i can publish mqtt to display, but i have not try automation for the moment.

i even try to restart, all works together, but i have to wait 1 or 2 minutes before my gateway respond without lag...like something slower a bit the network...

I have install Mqtt explorer but i see no errors.

mqtt

153 messages sent in 1 minute? is it normal?

How can i investigate more please? have you an idea?

Good night