openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602

Home Page:https://openbekeniot.github.io/webapp/devicesList.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

faulty get payload to 1 when should be 0

Magnus-rosenborg opened this issue · comments

Describe the bug
I recieve mqtt messages with payload 1 when it is 0. I have set Flag 7 - [MQTT] [Debug] Always set Retain flag to all published values
but the messages are not retained. When i send an emty mqtt like mosquitto_put -t 37/1/get -m "" -u user -P password it respond correct with payload 0. But after som minute it sends the wrong mqtt again.

Firmware:

  • Version 1.17.546
  • Device? 3 button touch wall switch
  • Chip/model: BK7231N
  • Device config?

autoexec.bat
startDriver ntp
ntp_setServer 193.11.166.8
ntp_setLatlong 56.017833, 14.268284
AddChannel 10 1
AddChangeHandler Channel4 > 0 publish 37/KNAPP1 TOGGLE -1
AddChangeHandler Channel5 > 0 publish cmnd/KNAPP113 TOGGLE -1
AddChangeHandler Channel6 > 0 publish 37/KNAPP3 TOGGLE -1

FLAGS: "flags": "1075840224",
"pins": {
"6": "Rel;1",
"7": "dInput_n;6",
"8": "Rel;2",
"9": "Rel;3",
"11": "Rel_n;3",
"14": "Rel_n;1",
"20": "dInput_n;5",
"22": "Rel_n;10",
"24": "dInput_n;4",
"26": "Rel_n;7"
},

To Reproduce
note, it repeats every 3 minute.

Screenshots
image
image
IMG_4352

Additional context
Add any other context about the problem here.

The chip inside is a CB3S if it is helping?

Hey, why do you have Rel_n roles? Aren't you... just inverting the value yourself?

Hi, thats how it's constructed. Everything else is working correctt, but this faulty mqtt messages that is generated inside is wrong 0 means off etc. the relay is of when the device is sending 1. When i query the device it respond correct with 0.
What i think is even more strange this is the only messages that is wrong. The third button does not do this. So there must be something to that pin/gpio that triggers the mqtt messages.

image

You have both Rel and Rel_n on channel 1, does the problem persists if you remove temporarily one of them?

Hello! Sorry for not answering (got sick) and the hardware is broken now. I believe there were something wrong with that device only.