Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with this code, causing lights to flicker

Featured Replies

Posted

I have, what I thought was a very simple code as follows to turn my porch light on at a certain time if I was home and at a different time if I was not home, however whenever the light comes on, this code is causing the then, else to stay in a continuous loop making the light go on and off constantly.   

I also tried to remove the else statement as I have a different program to turn the light off if it's not within these time allowances and the light is on, but that didn't seem to work either.

 

Can someone please advise as to what is wrong with my code here and help me understand and advise how to fix it?   Thanks;

 

Turn Light On

If
     (
        $iPhone_New Geofence is 0
     And From 11:00:00PM
         To    7:00:00AM (next day)
     )
Or   (
       $iPhone_New Geofence is 1
     And From 7:45:00PM
         To   1:00:00AM (next day)
     )
And Status 'Porch Light' is not on

Then
     Set 'Porch Light' On
Else
     Set 'Porch Light' Off

Turn Light Off

If
    $iPhone_New Geofence is 1
  And Status 'Porch Light' is On
  And From  1:01:00AM
      To    7:44:00PM (same day)

Then
    Set 'Porch Light' Off
  • Author

I use Mobilinc Location Controller to set the geofence.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.