[Deprecated] At Home Simulator

Introducing 'At Home Simulator'
Turn lights on and off to simulate the appearance of an occupied home using YOUR normal routine.

What does this do?
This app is designed to give a lived in look based on your daily routine. This is not a random lights generator. Think about your normal daily routine and then program the lights to duplicate how you would normally move about the house. So if you get up at 6:00am but the sun doesn't come up until 8:00am, be sure to create a simulator that lasts at least 2 hours.

Best to make a different child app for Morning, another for Day and then another for Evening. Or as many as you may need (ie. weekdays vs weekends).

Requirements:

  • Rule Machine and a Virtual Switch

Using the power of Rule Machine, set up a rule to turn the Virtual Switch to control this simulator on. This way you get to use every type of restriction available including offsets, without reinventing the wheel over here.

Features:

  • Select as many devices from each group as needed.
  • Child Apps are activated/deactivated by the Control Switch or when user selected time runs out
  • Set how long each group of lights stays on
  • Each group can have a different pause between devices AND a different pause between groups
  • Special Random section allows additional lights to randomly turn on/off while the simulator is still running.
  • Parent/Child App structure
  • Create as many child apps as needed

Apps can be found on my GitHub or by using Bundle Manager.

When reporting problems...

  • Be sure you are on the latest version. I won't troubleshoot an older version.
  • Turn on debug and screenshot the issue happening in the log. One line or just the error doesn't cut it. I need a log.
  • Post the screenshot of the log with an explanation of the problem.

Thanks


He's a output from a quick Simulator I did just to show what it can do!

5 Likes

Wow, what's going on. One great app after another. You are goning to need an apps store pretty soon. :+1:

2 Likes

Nice work. Have been tinkering with Vacation Lighting Director port, but haven't had a lot of luck, that app is a bit of a mess.

Question for you.
There's two switches in the child apps that are confusing me.
The 'Control Switch' seems to allow for Rule Machine to turn the app on and off, leveraging restrictions etc.

Then at the bottom under General, just below the name of the child automation, there's an 'Enable/Disable child app with this switch'.

What's the difference in these two functions?

Thanks for giving it a try.

You are correct about the first switch, 'Control Switch'. This is the virtual device that RM will turn on/off to control when the simulation starts.

As for the switch under 'General', this is a kill switch I put into every app I make. Basically can be used as an override. For me I use a virtual switch in every room of the house, ie. Living Room Override. Any app that controls the Living Room lighting,... RM rules, Scene lighting, etc. can be overridden by turning on one virtual device. Comes in real handy if you have a impromptu party/get together and you want the lights to just stay the way they are!

Hope that makes sense!

2 Likes

New version on Github...

V0.0.4 - 01/16/19 - Changed the delay between groups to be a random time within a user selected range.

1 Like

Simulator child doesn't appear to be obeying the activation switch completely. It appears if the switch is turned off during the "delay" period it still turns on switches when the delay is complete regardless of activation switch state.

Strangely enough, the logs show the switches of all groups turned off when activation switch is turned off.

Thanks.

I noticed this last night too. Still trying to figure this one out.

1 Like

Even with the app "paused" in the child settings, it still continues.

Made some major advances in the app today. Time to give it another try. :sunglasses:

New beta on Github.

Last update for tonight...

V0.0.7 - 01/18/19 - Made some code changes and fixed some of the wording. Hopefully it makes more sense.

New version on Github...

V1.0.0 - 01/19/19 - Officially out of beta! (hopefully)

3 Likes

V1.0.1 - 01/22/19 - Added more randomness to Random section.

Gave this a try this week. I did find it a bit cumbersome to create virtual switches plus the rules for each associated child device. Having to think through "how many minutes does this really need to run" seems harder than it should be. Then having to go back into RM to figure out when I needed to toggle all my virtual switches. I feel like having time selectors in the app "between x and x do group 1" and keep them on a minimum of x percentage of time during that time might be more intuitive - no idea if how easy that would be to implement. Also don't know how that would work if you leave at say 5 pm and don't come back until the next day - will the rule trigger for my groups if the times are implemented in your app vs RM. Not trying to dis what you've done - it does what it says, just saying it does take time to lay it out to implement it fully as designed. It also didn't help that my device became unresponsive twice while running it (not sure if it's this or something else; had to roll back version to the 4th to see) - may be something else.

@bptworld Installing this and found a missing } on the last line for the parent code. Maybe I didn't copy it all the way to the bottom, but worth checking into.

Bryan, does the Control Switch need to remain on during the group phases, or is it just a trigger? If the latter, I was planning to set my control switch devices to auto-off for simplicity. Any reason you can see why this would create a problem?

Also, while I recognize this is NOT a random light generator, is there any reason one couldn’t leave the groups empty, and just use the random lighting portion? Wouldn’t that make it essentially a random lighting app?

Great app btw....

The control switch works like any other switch, when it is on the app will run... turn it off and it will finish the routine that it is in and then stop.

I've never tried it, try it and see what happens. :wink:

Thanks!

I did. It works great. You could copy the code in github, rename it "Random Light Generator", and bamm, a new bptworld app! :stuck_out_tongue_winking_eye:

2 Likes

Looks like a great app. Want to make sure I understand, the child app has 5 groups that run in sequence. When the 5th group runs, does it end? Or, does it loop back to Group 1 if the control switch is still active?

Yes, it will end

Hey, think I found a copy paste bug in the AHS child code. Look at lines 144 and 145, I believe the variables there are supposed to be pTo5 and pFrom5.

1 Like