Author Topic: UDP command as effect?  (Read 1235 times)

Offline esset

  • Newbie
  • *
  • Posts: 27
    • View Profile
UDP command as effect?
« on: December 14, 2015, 11:44:36 AM »
Hi, I have several lights that are controlled by homeautomation system, I would like to shut them off when a show starts. It could be triggered by a given url, listen on a file that write something to disk. I am open for all possible way for the sequencer to tell, hey I'm running. The best should have been if there is a effect that load an url or send a UDP command that you can add in the sequnce

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: UDP command as effect?
« Reply #1 on: December 14, 2015, 12:04:55 PM »
Somewhere around here was a post talking about how to launch a batch file from the scheduler.  You can also use an FPP and have an event do pretty much anything you can think of.

Offline esset

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: UDP command as effect?
« Reply #2 on: December 16, 2015, 12:34:26 PM »
Many thanks,

Here is how I solve it.

Code: [Select]
100 REM *
101 REM * Created: 12/16/15 20:28:06
102 REM * Random: off
103 REM * Repeat: off
104 REM * First Item Once: off
105 REM * Last Item Once: off
106 REM *
110 LET ListName$="Demo"
120 SETPLAYLIST ListName$
140 ONPLAYBACKEND 300
180 LET NextItem=1
200 REM *
201 REM * Play item NextItem
202 REM *
203 EXEC "c:\xlights\wget --user=myusername --password=mypassword " +"http://192.168.2.15/%20JSON?request=controldevicebyvalue&ref=261&value=0"
210 LET LastItemPlayed=NextItem
215 PRINT "At:", FORMATDATETIME$(NOW,5)
220 PRINT "Playing:",ITEMNAME$(NextItem)
230 PLAYITEM NextItem
240 WAIT
300 REM *
301 REM * Jump here at end of song or sequence
302 REM *
303 EXEC "c:\xlights\wget --user=myusername --password=mypassword " +"http://192.168.2.15/%20JSON?request=controldevicebyvalue&ref=261&value=100"
307 IF TXOVERFLOWCNT = 0 THEN 310
308 PRINT "Serial transmit overflows:",TXOVERFLOWCNT,", length:", TXOVERFLOWTOTAL
310 IF SECONDSREMAINING <= 0 THEN 400
320 LET NextItem=LastItemPlayed+1
330 IF NextItem <= PLAYLISTSIZE THEN 200
400 REM *
401 REM Reached scheduled end time
402 REM *
490 LIGHTSOFF