Concept of day times ("Tageszeiten") to control lights?

Hello!

I just now observed that the Phoscon app has a menu entry about 1. morning, 2. day, 3. evening, and 4. night, where we can apply changes such as adding or subtracting hours/minutes in relation to sunrise or sunset, or set fixed times for start and end of each of the 4 periods.

Can we use these to control lights? How? E.g. I would like to apply a “morning” scene during morning period, another one during day period, etc. However, when I go to the light scenes/times, I can only set absolute start and end times for the scenes, i.e. there is nothing that can be used from the elsewhere defined day times/periods.

Am I missing something?

Are automations what I should use? But there, I only see my motion sensor and the virtual daylight sensor, none of them I could use for my use case.

Thanks for pointing me into the right direction. :blush::+1:

Sorry to bump my initial post, but I’m really lost how to control lights depending on sunrise/ sunset (with offset). Thanks for providing some hints!

Hi did you already have a look at the Automations documentation?
For an Automation you can specify the segments like “morning” in which it is active.

https://phoscon.de/en/app/doc#group-automation-en

Yes, I have already adjusted the 4 time periods under automations, but I understand that automations involve sensors, which I don’t have in my setting. I want to switch lights on in relation to sunset (period “night” start) and switch them off in relation to sunrise (period “morning” start). This is not triggered by a motion sensor that are displayed in the documentation. What am I missing?

I still don’t get it. Here are 4 automations (to switch a scene each for morning, noon, evening, and to switch off lights at night). Sorry about the mixture of English and German in the screenshots.

In the morning (1st automation), I want to use the scene “EG_Gelb” (turn ground floor lights to yellow). The delay time on the action tab does not make sense here (at least to my understanding), because the next automation will take care for it, i.e. when the morning is over and noon starts, the 2nd automation should start; hence, no delay of the 1st (or any following automation) is needed. Therefore, I shortened the delay to the minimum of 10 seconds (could have left it unchanged, though) and set it to “Do nothing”.

At noon (2nd automation), I want to use the scene “EG_White” (turn ground floor lights to white), etc., followed by the 3rd (evening) automation to dim the lights, and the 4th automation (night) to switch the lights off (till next morning, when the 1st automation should start again). Should be simple, I thought. :face_with_hand_over_mouth:

Now back to the 1st automation: Its trigger tab is still empty, and I have no idea what I should add there:

grafik

I could add a motion sensor, but noghting else:

grafik

However, I want to control the lights in relation to sunrise etc., not by motion. So what to do here?

I moved on to the action time tab. For the 1st automation (morning), I thought I need to just enable the “Morning” period (which I adjusted to 1h after sunrise till 3h after sunrise):

Since my 1st automation (morning) has nothing to do with the afternoon, evening or night, I disabled these other 3 periods on this action time tab for the morning automation.

However, now there is no trigger, because the trigger tab is empty, and I cannot add any sunrise-related trigger there, but just a motion trigger. The same applies for the other automations, too.

Maybe I’m misunderstanding the whole concept of automations, but I thought it should work very intuitively, since there is a virtual daylight sensor - but it cannot be added here.

I’m really struggling to understand this and appreciate any further help the community/ experts can offer. Thank you so much! :heart:

Hi. Ok I try to make things clear with this post.

  1. Automations is the successor of the old “Sensor Control” menu of the Phoscon App. It will get out of beta status with the next release so I planned to write something at a later time here in the forum.
  2. The “Daily Schedule” menu was created only for the new automations page and can only be used there.
  3. With daily schedules you can define 4 time segments that you can then use with the automations to trigger different actions depending on the time of day.
  4. So you create a new automation, then define the action for start and end of the automation. Then you define a sensor as a trigger and you can define a time period where the automation is active. So you could define different actions with the same sensor at different times of day.
  5. The “action after delay time” triggers when the sensor does not sense any more inputs. For example a motion sensor with a delay time of 10 seconds will trigger the automation when it detects movement. And And when it does not detect any more movement it will trigger the “Action after delay time” after 10 seconds (which will be “put lights off” in most cases).

And 6. The virtual daylight sensor can not be used in automations. So if you want to just put your lights on or off at a given time you can use the “Schedules” page of the Phoscon app. Perhaps it is possible to add the virtual sensor to the automations page. Do you think this is a good idea? It is basically just like a schedule then…

Thanks for your kind summary. From this I understand that currently, we cannot trigger lights or other actors based on daylight (sunrise, sunset, or offsets) but only on fixed time schedules (which I currently use).

Fixed time schedules, though, need to be adjusted throughout the year. E.g., I want the lights on during evening hours. In summer, this is much later than in winter. As there is no way to use automations for this (currently) and schedules are always fixed, users need to adjust the hours/minutes throughout the year. If automations could be used to trigger lights based on (virtual) daylight (i.e. sunset, sunrise, or offsets thereof), this would be very convenient.

For the time being, automations can only be used with triggers like motion sensors, correct?

That’s a point. I’ll check if the virtual daylight sensor can be integrated into automations or even schedules. But don’t expect this comming very soon.

Automations are only for use with sensor triggers.

1 Like

Hi,

The daily schedule function is good, but I cant get i to work correctly. I have a room with a Philips motion sensor and a dimmable light. I have configured two automations, one that dimmes the light to 30% and after a period turnes the light off, and then the other with the same settings but dimming to 100%. The first one is assigned to morning, night and evening, and the second to daytime. But, it seems like the to automations is competing, so the light dimmes up and down ‘randomly’ when I’m in the room and trigger the sensor. If I configure one of the automations do “do nothing”, then the one active work as intended. I have double checked time assignment for each of the automaitons several times, verified the daily schedule times…Can’t get it stable. (RPI 3 with stable SSD image, 2.27.6, RaspBee II).

Could you send a backup file from your phoscon app (gateway settings menu) to support@dresden-elektronik.de so that I can check If there is a bug in the created rules?

And are you using the Phoscon App from Android/iOS store or the Browser version that comes with deCONZ? Which Phoscon App version are you running?

When you deselect/select the active times in the automation again this could fix the rules. In the worst case delete the two automations and create it again to fix the problem.

But it would help me a lot if you create and send the backup before that. So I can debug the error.

Hi,

Thanks for reply! I’ve tried to adjust both using android app and in browser(Chrome). I’m running v.1.8.57. And I have in fact tried to delete the rules and recreated a couple of times already. This is a clean install from a few days back so everything should be fresh.

Before sending the backup, I can try to deselect/select and se if that fix the issue.

Would it be possible to send a log file rather than the complete backup?

Edit:
*I tried to uncheck all times for the 30%, but still it ‘kicks’ in. So I have to change it to “Do nothing” to disable the 30% automation.

Thx

If you would like to send only the logs, then the rules and resourcelinks logs from the Phoscon App/Help/Api Informations page would be enough.

That would still help me to identify the error.

Just FYI. I created the same automations directly in HA, and it works smooth (same sensors/lights/timing).

Is there anything I could help with to make it happen? I’m no programmer but might help with testing.

@BEJacobsen I have an assumption where the problem might be.

It could be a problem when you have automations with the same name in different groups.

Could you test it for me and rename your automations to different names. Or best is to delete the troublesome automation and create a new with a different name.

I think it is no problem to integrate the sensor in the automations trigger list of sensors.
I just need some time beacause we are currently working on something big.

maybe I can squeeze it in between.

1 Like

@ChrisHae Sure thing, I will test. (If you have time…you could consider to add a function under turn on/off that switch the light on directly to a given percent not only dim to a percent).

I think you can use the dimm function to put on your lights with the given dimm level.
When you choose “dimm all lights” all your off lights will go on with that dimm level.

perhaps the text is a little bit misleading.

The on/off function is used to put on your lights with the current brightness settings.

@ChrisHae I testet, but no lock, sorry. I’ll move it back to HA for now.

@BEJacobsen Thx to your support I found some issues in the code that I had fixed. First it should not be possible to name 2 automations with the same name. This is possible in the current version but will be fixed in the next update.

Then I found an issue that could happen when de-/selecting time segments. I also improved that.

The update will be available in the next Android App update perhaps already next week. And in the next deCONZ version for the browser app.

I have found some issues in the rules that you provided me in your backup. For example the automation in your group 6 somehow affected the automations of group 1.

So it would be best to delete them and create them new. To be sure it would be the best to create all automations new after the next update. (At least renaming them and checking the time segments).

@7wells I think I can also add the feature daylightsensor as trigger in the next update.