Switch that turn on random

Hi there all,
I have on my Hassio a switch that open a chicken coop door.
I use that switch only some time cause I have another sunrise automation that open the door.

But this night I so in the logbook that the switch was turned on at 2:38 AM…
I don’t know who or how is possible.

So my question is… ca I see some log in some place in order to understand
who or why the switch was turned on at that hour please ?

My Hassio is in docker version on a Qnap Nas.

Thanks a lot all
Denis

1 Like

/config/home-assistant.log

Thanks for the answer… but where I found the config folder please ?
I found a file home-assistant.log in the folder:
/usr/share/hassio/homeassistant/
… but there is only one record about my cam.

I remember that I installed Hassio like a docker in my virtual ubuntu 18 the is installed in My Qnap NAs.

Thanks a lot again
Denis

Hi there all
I have still need your help cause also this night my switch was turned on/off
and I don’t undestand the reson:

sonoff

The “Porta Pollaio” is the open a chicken coop door and this morning was opened :slight_smile:

Here is the switch codes:

#########################################
# Switch  ###############################
#########################################
switch 1:
  - platform: mqtt
    name: "Switch Router Sonoff1"
    state_topic: "stat/sonoffpow1/POWER"
    command_topic: "cmnd/sonoffpow1/POWER"
    #payload_available: “Online”
    #payload_not_available: “Offline”
    payload_on: "ON"
    payload_off: "OFF"
    qos: 1
    retain: true
    icon: mdi:garage-open

### nu pune / in fata la topic pt. ca MQTT trimite oricum fara /
switch 2:
  - platform: mqtt
    name: "Porta Pollaio"
    state_topic: "pollaio/switchStatus/"
    command_topic: "pollaio/switchCMD/"
    qos: 0
    payload_on: "1"
    payload_off: "0"
    retain: true

And here is the automation of door open:

# al sorgere del sole, apre la porta al pollaio (SUN TRIGGER)
# https://www.home-assistant.io/cookbook/automation_sun/
- alias: sun_apri_porta_pollaio
  id: sun_apri_porta_pollaio
  trigger:
    - platform: sun
      event: sunrise
#      offset: "+00:13:00"
  action:
  - service: mqtt.publish
    data:
      topic: "pollaio/switchCMD/"
      payload: "1"

The Sun was rising today aprox. at 5:41 AM
so there was no reason to open the door and switch sonoff at 4:11 AM

Can anybody help me please to descover where is from this commands ?

Thanks again
Denis

1 Like

Still no logs.

I had another time at 4:11 the sonoff power (on/off)
but at thiat time there nothing intristing in my log:

2019-07-09 04:10:54 ERROR (Thread-3) [pychromecast.socket_client] [KDL-43W808C:8009] Failed to connect to service BRAVIA-2015-8dc35bb49dd0425d0a79872378acbca4._googlecast._tcp.local., retrying in 5.0s
2019-07-09 04:10:59 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ping binary_sensor took longer than the scheduled update interval 0:00:30
2019-07-09 04:11:30 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ping binary_sensor took longer than the scheduled update interval 0:00:30
2019-07-09 04:12:00 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ping binary_sensor took longer than the scheduled update interval 0:00:30
2019-07-09 04:12:31 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating ping binary_sensor took longer than the scheduled update interval 0:00:30

In the Logbook I had an errore also and I just renamed the home-assistant_v2.db file
and restart Hassio.

Now I have no more error on Logbock… but I have no more logs also.
I’ll take a loock tomorow in order to see any new log or Logbook.

Now I just control the Node-Read In order to see if I have there something
automation at 4:11 … but I found nothing.

Thanks for your interest.
Denis

Can anybody help me please ?
Every day I have a reset of sonoff switch at hour 04:11 and I don’t know how to find it.
Thanks again
Denis

Have you found out who or what it was?

I currently have the same problem. My lights turned on at 3AM and I don’t know who it was. It could have been a failure in the remote switches, or it could have been anyone in the house with access to the HA app (probably, but who?).

It was my WiFi router… it was programmed to reset everi night
and with power off/on of the wifi, and some wrong settings on my sonoff
the conclusion was that wrong turnon :slight_smile: