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.

opensauce

Members
  • Joined

  • Last visited

Everything posted by opensauce

  1. Yeah, this is definitely a one-off thing. I'm likely going to give OpenHAB a shot, which means I'll have to write the binding for it. So I wanted something to meet my simple use case until I have time to dive into that.
  2. Sure, no problem. I looked at the perl module but on the rpi it took too long to load, not the authors fault just the lag in the pi. So I wrote that not to use any modules. Yeah, as you wrote I poll the ISY for the status of the lights and then I perform the opposite command on the light itself. Goes nice and fast: $ time ~/lights.pl '20 32 1E 1' real 0m0.362s user 0m0.140s sys 0m0.080s
  3. I figured I'd put this program here since rpi and ir is my use case. I wanted a way to hit a remote button and toggle a light. This is the leanest way I could come up with. I wanted a fast response so I didn't use any perl modules. #!/usr/bin/perl my $light = 'http://admin:admin@lights/rest/nodes/%s/cmd/%s'; my $status = 'http://admin:admin@lights/rest/status/'; my $node = $ARGV[0]; my $off,$on; $off = 'DOF'; $on = 'DON'; #Poll Status my $lights = `curl -silent -o - '$status'`; my %add = (); %add = $lights =~ /node id=\"(.*?)\".*?value=\"(.*?)\"/g; #Decide the toggle my $mode = ($add{$node} == 0) ? $on : $off; #Do Something $node =~ s/\ /%20/g; my $url = sprintf $light, $node, $mode; exec("curl -silent -o /dev/null '$url'"); my .liric file looks: begin remote = directv button = dash prog = irexec config = ~/lights.pl '20 32 1E 1' end

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.