ESP Easy not always firing relay after .61

Hi

Finally upgraded from .38 to latest clean install hassbian .6xx.

i have espeasy installed on esp relay boards that fired every time without skipping a beat.

In .6xx the switches that fire these esp relays either do not respond (blue tab on/off) or do respond but dont fire the relay. and some work.

Nothings changed hardware wise. my config is below, i my have read something somewhere that mqtt changed payload from 1/0 to online/offline is this right? cant find the post anywhere and would it relate to what im doing?

switch ESP8CHNursery:
  platform: mqtt
  name: Nursery
  state_topic: "/understairs/NURS/state"
  command_topic: "/understairs/gpio/15"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPLounge:
  platform: mqtt
  name: Lounge
  state_topic: "/understairs/LNGE/state"
  command_topic: "/understairs/gpio/16"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPYard:
  platform: mqtt
  name: Yard
  state_topic: "/understairs/OS/state"
  command_topic: "/understairs/gpio/14"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPBathroom:
  platform: mqtt
  name: Bathroom
  state_topic: "/understairs/BATH/state"
  command_topic: "/understairs/gpio/12"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPComms:
  platform: mqtt
  name: Comms Cupboard
  state_topic: "/understairs/USTRS/state"
  command_topic: "/understairs/gpio/13"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPHeating:
  platform: mqtt
  name: Heating
  state_topic: "/understairs/HEAT/state"
  command_topic: "/understairs/gpio/10"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPLanding:
  platform: mqtt
  name: Landing
  state_topic: "/loft4/landing/state"
  command_topic: "/loft4/gpio/14"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESP8Bedroom:
  platform: mqtt
  name: Bedroom
  state_topic: "/loft4/masterbed/state"
  command_topic: "/loft4/gpio/16"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

switch ESPLoft:
  platform: mqtt
  name: Loft
  state_topic: "/loft4/loftmain/state"
  command_topic: "/loft4/gpio/12"
  payload_on: "1"
  payload_off: "0"
  qos: 0
#  retain: true
  optimistic: false

when logging the espeasy every time i trigger a switch via ha the connection to the broker is lost. Why would this be happening? It looks like this is stopping the relays firing but whats causing the problem?

cheers
folks

This is the breaking change you’re talking about:

Taken from the release notes:

The default availability payloads for the MQTT switch platform have changed from “ON” and “OFF” to “online” and “offline” (in order to match the majority of MQTT platforms that already supported availability reporting). (@DanNixon - #11336) (breaking change)

And i doubt if that is related to your problem.

Can you monitor MQTT with mosquito_sub to see what commands are sent? And maybe test them with moquito_pub.

Update

i have the following ESPEasy devices
1x Sonoff
2x Linksprite ESP8266 8Channel Relay boards

i didnt have any issues with them on 0.38 HA.

Now what ive noticed in the logs of ESPEasy is that the 2 8 channel units are constantly losing connection to the broker (never did on .38). The sonoff works as it should - see screenshots, connections on the network never drop out and the ESP’s dont reboot, just lose the broker.

linksprite

Now if i do sudo apt-get update or sudo hassbian-config install mosquitto i get sources list errors see screenshot. Could this be a bad install of Mosquitto which may be causing the underlying issues?

Hope someone can help as the other half aint happy :slight_smile:

Also thinking about it… i have a similar setup installed in my camper van, and now i think about it i have the same issue here with a 8Ch Linksprite. Sometimes the relay fires etc, i will check the logs on this when i can chance. i think the version running in the van is the release before christmas so .60 possibly

You you have the mosquitto client installed? If so, you can monitor all messages with a command like this:

mosquitto_sub -h 127.0.0.1 -v -V mqttv311 -t “#”

Where 127.0.0.1 should point to your mosquitto server

hi

yes hav done that. When i get a successful trigger i get 2 lines of response per trigger on and off
/understairs/gpio/14 1
/understairs/OS/state 1
/understairs/gpio/14 0
/understairs/OS/state 0

when unsuccessful i get one line

/understairs/gpio/16 1

But why the constant disconnections from the broker in ESP easy?

Thanks for your input on this.

My bad - sorted now, had duplicate unit Nr. inESP config, doh!!!

Thanks for your time