Service homeassistant.turn_on But why?

Environment
HA with Insteon integration. Also using emulated Hue for Alexa.
Now latest HA core + HA OS versions.
Nothing has been modified with config in over a year. Just periodic HA updates.

This entire week Sunday-Today an Insteon switch / floodlight is turning on within the same minute of the “sun rose” event.

H-Front Flood turned on triggered by service homeassistant.turn_on
6:20:59 AM - 4 hours ago
Sun rose
6:20:20 AM - 4 hours ago

If I pull up H-Front Flood entity related objects there is zero automations setup.
Only related items; Insteon + area House + Device H-Front Flood

I do use addon simple scheduler to control lights schedule. But its not enabled / controlling H-Front Flood switch.
And when simple scheduler calls for a device state change it logs:
Device turned on/off by service switch.turn_off (Supervisor)
Not service homeassistant.turn_on

What can I look for in config / yamls that would be related to Sun device event + service homeassistant.turn_on

Thank you.

For Insteon … do you have?

a) Insteon Cloud?
b) HA Cloud?
c) Both or none?

None. Completely local.

So we can rule out any scheduled tasks inside the Hub. I assume you never has such a task as you cannot reach those anymore without Insteon Cloud.

All my automations are in automations.yaml, maybe something is in there and not in the interface? You could search in that file maybe. Or maybe that light/switch in in an Insteon scene linked to another device? Assuming you have the Insteon Control Panel installed, you should be able to look through the Insteon scenes and be sure that device is not somehow linked to another device.

NOTE: My automations.yaml is in the same directory as configuration.yaml. But you can do many things with YAML includes so do not know your setup.

No scripts either eh? I have used Insteon since it came out (phasing the last of it out now) and I have had some strange behavior with devices before, including phantom on and off events - however yours sure sounds like it might be tied to a script somewhere since it happens with the sun.

The only automations setup (which do match correctly between webUI + automations.yaml) are for a 8 button insteon switch. Switches are paired together to allow for example button B to toggle another insteon switch / light. Not really automation per say but manual control of physical switch relay.

However none of these automations on this multi button switch are for the H-Front Flood.

Only actual scheduling we have has been done through Simple Scheduler which logs service switch.turn_on (Supervisor) rather than service homeassistant.turn_on

When (old) Insteon abandoned business we did too. Setup HA + Emulated Hue + Simple Scheduler.
(I’m aware that Insteon did get picked back up.)

Don’t have Insteon app anymore. In fact hub’s Internet blocked on firewall still. We just use either Alexa or Android HA dashboard.

I don’t believe any config within hub itself is culprit. Issue just popped up.
There is a direct tie between HA’s sun rose event and service homeassistant.turn_on.
The “sun rose” event has been shifting by min or two Last Sunday-Today. And the service homeassistant.turn_on has been shifting with it. Always within a minute. Which is quite unintuitive. Flood light on for sunrise? Already light outside :slight_smile:

That was going to be my next one. Search also n scripts.yaml.
As I do a lot of development sometimes I get sidetracked and sometimes other things change.

Example – had an automation for “arrival” lights coming on if wife’s phone enters the Home Zone from Near Home after sunset. She went and changed her phone (based on a lame friend recommendation) that broke her location status. It stopped working. Just left it running, her phone was always “Home” according to it. I didn’t even know she changed it.

She just recently changed it back and boom … works. She was greatly appreciative that I fixed her problem … I never knew there was one.

So starting with terminology so we are the same.
Yes, those are not automations, those are direct switch to switch links (or they are switch-hub-switch links depending on the controller/responder setup).
So they are Insteon Scenes.

So if you use the Insteon Control Panel and go through every button on those switches, you do not see any link to the H-Front Flood I assume. You would click switch, button, all-link database and see what exactly is in the database.

And I assume then you are saying that you have nothing at all that is triggered by sunrise. If you have anything at all triggered by sunrise, that is where I would dig. Sunrise should be the key.

Ya. You’re using HA on another level.
Our HA is quite vanilla. Scripts.yaml is empty. We don’t use any.

If there was any unknown scene / scheduled config within the hub itself done by the old Insteon app it would not reflect within HA as:

H-Front Flood turned on triggered by service homeassistant.turn_on
6:20:59 AM - 4 hours ago
Sun rose
6:20:20 AM - 4 hours ago

Would it?

Edit:
Next time I’m onsite I was going to delete H-Flood entiy. Hard reset switch. Re-pair Hub to switch. Add back to HA. About only thing I can think of to try…

Nothing in anything you have done triggered at sunrise at all? Not specifically for this light … I mean anything at all.

With 39 seconds between sunrise and service call, I’d say coincidence. Not triggerd by it because HA is faster than that to trigger.

1 Like

I would not think so BUT @teharris1 would be the definitive person to answer that. I would not think it would report as triggered by a home assistant service. I never used schedules in Insteon.

Yes or no. Could be sunrise plus delay or on for at least 30 secs.

How do you use Alexa? You said you do not have Insteon Cloud nor do you have Home Assistant Cloud. Then how is it you are talking to Alexa to turn something on? The only other option would be implementing essentially your own Lambda service.

Alexa works like this AFAIK:

Alexa → Home Assistant Connection to Alexa (aka Home Assistant Cloud) → Local Home Assistant → Hub → Light

It is not Alexa → Local Home Assistant → Hub → Light

Within simple scheduler there is a single schedule that uses sunrise +5 min offset to turn off two insteon switches. But its for two different outside lights not related to H-Front Flood switch.

C-Front Lanterns + O-Front Lantern (Turned off by simple scheduler via sunrise)

H-Front Flood has been used by Simple Scheduler in Winter but it uses set times like 5:15pm-5:45pm. (Its for staff leaving work day to have light getting in car.)
H-Front Flood has never been used by simple scheduler for Sunrise/set. And because its summer the H-Front flood schedule is disabled currently.

Here’s the logbook this morning.

H-Front Flood turned off
9:25:38 AM - 3 hours ago

SM-G973U Charger Type changed to none
8:50:22 AM - 4 hours ago

SM-G973U Battery State changed to discharging
8:50:22 AM - 4 hours ago

C-Front Lanterns turned off triggered by service switch.turn_off
6:23:02 AM - 6 hours ago - Supervisor

O-Front Lanterns turned off triggered by service switch.turn_off
6:23:01 AM - 6 hours ago - Supervisor

H-Front Flood turned on triggered by service homeassistant.turn_on
6:20:59 AM - 7 hours ago

Sun rose
6:20:20 AM - 7 hours ago

Sun Next rising changed to August 17, 2023 at 6:19 AM
6:18:48 AM - 7 hours ago

Sun Next dawn changed to August 17, 2023 at 5:48 AM
5:47:48 AM - 7 hours ago

Use the Insteon Control Panel, I will bet one of those lights has a direct connection (aka Insteon Scene) to H-Front Flood. But that shows things are quite off. You say sunrise +5mins but the scheduled events seem to be way before sunrise.

C-Front Lanterns turned off triggered by service switch.turn_off
6:23:02 AM - 6 hours ago - Supervisor

O-Front Lanterns turned off triggered by service switch.turn_off
6:23:01 AM - 6 hours ago - Supervisor

H-Front Flood turned on triggered by service homeassistant.turn_on
6:20:59 AM - 7 hours ago

Sun rose
6:20:20 AM - 7 hours ago

So …

Sun Rose
H-Front Flood came on 39 seconds later
O-Front and C-Front turned off 2 mins after that

Emulated Hue allows for completely local HA / Insteon / Alexa integration.

Hmm. I believe its Alexa → Emulated Hue → HA → Insteon Hub → Insteon device.
I just know I was really happy to discover it. It did take me a moment to figure out multicast / Net issues.
If Interested - Emulated Hue Alexa connect? - #11 by SMauto

OK. So report to Emulated Hue folks. I would suggest you debug deeper in that integration because that integration calls Home Assistant Turn On for lights based on the python code I read.

As for Emulated Hue, no thanks. Alexa + Nabu Casa is fine with me. I am more thean will to pay the few dollars for it. I have much more than lights to control from outside (like two weeks ago I set music up for my winery in California while I was in Italy).

1 Like

Ya the sun device has always been a strange to me…
Simple scheduler presently shows 6:19am as sunrise right now.
Yet Sun device “Next dawn” shows:
Last updated:8 hours ago
August 17, 2023 at 5:48 AM
My understand is its UTC but doesn’t make sense to me. I’m PST.
Lat + Long + elevation + country all defined in configuration.yaml.
And the logbook doesn’t reflect the exact time simple scheduler nor Sunrise UTC to PST conversion.

However despite few min discrepancy the C-Front Lanterns + O-Front Lanterns did as they we suppose to and turned off via simple scheduler. And this event is happening after the unexpected H-Front Flood turned on.
So I don’t see how any Insteon scene could be associated. Its happening first and by itself.
So could Sun device be malfunctioning to cause this?