I there, I have a similar issue with Tasmota and Sonoff Pro 4Ch. When it loses the connection and reconnect, the mqtt server send a payload with on and immidiatly off causing my garage to open randomly PowerOnState ignore setup to 0. A small work around, but I hope to find a real solution, was to setup an Automation that every 30 seconds reset the stored status on relay4
There si somethink wrong with mqtt on HassIO or on Sonoff?! I canât figure out
This is strange. Having the retain flag set for a the topic would explain one message when it connects, but not two with different payloads. Do you have some automation in HA that would send the second message?
@Tommmii This is the PIR i use: HC-SR501.
As for your other question:
When i disable the PIR, (see image), It works as you said: Sonoff power up, light ON, Light remain ON.
okay, well⌠could it be that the PIR is in fact ordering the Sonoff to switch off, because once the PIR has started up (+/- 3 seconds) it detects no movement ?
Are you referring to the conflict within wifi and the PIR sensor going crazy?
I think i am ok with that, i have placed the PIRs (kind of) far away from the module, they seem to be reporting movement pretty accurately.
My problem is only on startup.
(i do have a couple of sensors like the ones that Ben is recommending, will try them out at some point to see if itâs been a pir sensor issue)
Even if the pir detects no movement, there is no automation ordering such function.
Why would it turn off?
ok, i figured your PIR might have been right onto the Sonoff.
Your tasmota logs donât seem to show maximum detail, have you put the Sonoff into âmore debugâ mode, it should display the origin of every action in the device ?
Find this in Configuration / Configure Logging / Web log level / 4 More debug
ok, went through that threadâŚ
I would connect the PIR to another sonoff, just the pir and nothing else, to try and find out what the pir sensor is publishing.
Am also expecting a mailbag with some PIR sensors, so i will try to replicate this.
I have the same effect on two sonoffs with the same pirs connected, so I donât think something is mulfunctioning.
(upper and lower end of a staircase)
yes, i understood that.
I 'm just trying to simplify things, to make debugging easier.
1 device with PIR, publishing a topic to mqtt broker
1 (other) device without PIR, subscribing to this topic
Then we should clearly be able to see if PIR is sending poweroff, or if mqtt is retaining poweroff, or if the lamp/sonoff is getting the poweroff from own memory.
or none of the above
Thanks a ton! I would love to try it, any idea how i can run those in the hassio docker?
I can stop and start the service from within the hassio.
When i run rm /var/lib/mosquitto/mosquitto.db from putty i get No such file or directory
Any clues?
Iâm not sure, I think you might need to connect to the Mosquitto container.
This is way above my paygradeâŚhopefully some one more knowledgeable will help.
edit :
Iâve asked on the discord app⌠got the usual âno replyâ from the ppl present over there. @krash you might have luck with this :