{"action":"created","issue":{"url":"https://api.github.com/repos/OttoWinter/esphomeyaml/issues/89","repository_url":"https://api.github.com/repos/OttoWinter/esphomeyaml","labels_url":"https://api.github.com/repos/OttoWinter/esphomeyaml/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/OttoWinter/esphomeyaml/issues/89/comments","events_url":"https://api.github.com/repos/OttoWinter/esphomeyaml/issues/89/events","html_url":"https://github.com/OttoWinter/esphomeyaml/issues/89","id":343179970,"node_id":"MDU6SXNzdWUzNDMxNzk5NzA=","number":89,"title":"Unstable (MQTT) connection - Sonoff T1 2CH","user":{"login":"Boosik","id":939813,"node_id":"MDQ6VXNlcjkzOTgxMw==","avatar_url":"https://avatars1.githubusercontent.com/u/939813?v=4","gravatar_id":"","url":"https://api.github.com/users/Boosik","html_url":"https://github.com/Boosik","followers_url":"https://api.github.com/users/Boosik/followers","following_url":"https://api.github.com/users/Boosik/following{/other_user}","gists_url":"https://api.github.com/users/Boosik/gists{/gist_id}","starred_url":"https://api.github.com/users/Boosik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boosik/subscriptions","organizations_url":"https://api.github.com/users/Boosik/orgs","repos_url":"https://api.github.com/users/Boosik/repos","events_url":"https://api.github.com/users/Boosik/events{/privacy}","received_events_url":"https://api.github.com/users/Boosik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-07-20T16:59:32Z","updated_at":"2018-07-27T13:32:11Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\nI'm experiencing a extremely unstable (MQTT?) connection on multiple Sonoff T1 2CH. Using Home Assistant MQTT discovery. Both Switches use this same config with only difference being name (bedroom/bathroom) and fan/light names.\r\nI tried to experiment with keepalive interval (tried 5s, 10s, 15s, 30s, 60s) but that made no difference.\r\nThis issue doesn't occur instantly but approximately after 3-12 hours after flashing and persists untill reflash (I did not tried restart).\r\nI also tried to remove GPIO12 and GPIO5 sensors that didn't help either.\r\nI also tried to put the switches right next to my router to test if it could be caused by weak wifi signal but the issue persists even then.\r\nI think it is caused by either my config or by bug in esphomeyaml as I was using Sonoff Tasmota before migrating to esphomeyaml and everything was fine.\r\n\r\nI'm using Mosquitto on RPi3 as MQTT server.\r\n\r\n```\r\nesphomeyaml:\r\n  name: bedroom\r\n  platform: ESP8266\r\n  board: esp01_1m\r\n  board_flash_mode: dout\r\n\r\nwifi:\r\n  ssid: 'redacted'\r\n  password: 'redacted'\r\n\r\nmqtt:\r\n  broker: 'redacted'\r\n  username: 'redacted'\r\n  password: 'redacted'\r\n  port: redacted\r\n  \r\noutput:\r\n  - platform: gpio\r\n    pin: 12\r\n    id: light\r\n  - platform: gpio\r\n    pin: 5\r\n    id: fan\r\n  - platform: gpio\r\n    pin: 13\r\n    id: led\r\n    inverted: true\r\n\r\nbinary_sensor:\r\n  - platform: gpio\r\n    id: light_sensor\r\n    pin:\r\n      number: GPIO0\r\n      mode: INPUT_PULLUP\r\n      inverted: True\r\n    on_press:\r\n      then:\r\n        - light.toggle:\r\n            id: light_light\r\n  - platform: gpio\r\n    id: fan_sensor\r\n    pin:\r\n      number: GPIO9\r\n      mode: INPUT_PULLUP\r\n      inverted: True\r\n    on_press:\r\n      then:\r\n        - fan.toggle:\r\n            id: fan_fan\r\n  - platform: gpio\r\n    id: output_sensor_1\r\n    pin:\r\n      number: GPIO12\r\n      mode: OUTPUT\r\n    on_press:\r\n      then:\r\n        - light.turn_on:\r\n            id: light_led\r\n    on_release:\r\n      if:\r\n        lambda: 'return !id(output_sensor_2).value;'\r\n      then:\r\n        - light.turn_off:\r\n            id: light_led\r\n  - platform: gpio\r\n    id: output_sensor_2\r\n    pin:\r\n      number: GPIO5\r\n      mode: OUTPUT\r\n    on_press:\r\n      then:\r\n        - light.turn_on:\r\n            id: light_led\r\n    on_release:\r\n      if:\r\n        lambda: 'return !id(output_sensor_1).value;'\r\n      then:\r\n        - light.turn_off:\r\n            id: light_led\r\n  \r\nlight:\r\n  - platform: binary\r\n    id: light_light\r\n    name: Ložnice\r\n    output: light\r\n  - platform: binary\r\n    id: light_led\r\n    output: led\r\n    \r\nfan:\r\n  - platform: binary\r\n    id: fan_fan\r\n    name: Ložnice\r\n    output: fan\r\n\r\nlogger:\r\n\r\nota:\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/OttoWinter/esphomeyaml/issues/comments/408419289","html_url":"https://github.com/OttoWinter/esphomeyaml/issues/89#issuecomment-408419289","issue_url":"https://api.github.com/repos/OttoWinter/esphomeyaml/issues/89","id":408419289,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODQxOTI4OQ==","user":{"login":"zmrow","id":1527119,"node_id":"MDQ6VXNlcjE1MjcxMTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1527119?v=4","gravatar_id":"","url":"https://api.github.com/users/zmrow","html_url":"https://github.com/zmrow","followers_url":"https://api.github.com/users/zmrow/followers","following_url":"https://api.github.com/users/zmrow/following{/other_user}","gists_url":"https://api.github.com/users/zmrow/gists{/gist_id}","starred_url":"https://api.github.com/users/zmrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmrow/subscriptions","organizations_url":"https://api.github.com/users/zmrow/orgs","repos_url":"https://api.github.com/users/zmrow/repos","events_url":"https://api.github.com/users/zmrow/events{/privacy}","received_events_url":"https://api.github.com/users/zmrow/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T13:32:11Z","updated_at":"2018-07-27T13:32:11Z","author_association":"NONE","body":"This is really interesting.  If I can get some time this weekend, I'll try to dig into the code a bit to see if I can find any indication of a problem there.\r\n\r\nIt looks like @Boosik has experimented with various keep-alive values.\r\n\r\n@fcastroruiz, @edif30 : Have either of you played with keep-alive values?"}}
{"actor":{"display_login":"zmrow"}}