Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Author Topic: CM11, Heyu, scripts, macro and trigger delay  (Read 337 times)

npaisnel

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 54
CM11, Heyu, scripts, macro and trigger delay
« on: July 27, 2018, 06:09:29 AM »

Trying to set up an 'off-delay-on' macro to send to a CM11 via programming with the heyu x10.sched file


Seems that in a macro in the format is:
MACRO | macro_name | delay | Function HU; Function HU; Function HU...etc

cant see a way to put a DELAY between the Function HU entries,  If I type a delay it fails with an error

How do I achieve a macro that has

Function HU; Delay Function HU;

at the moment I have 'got around it by filling the entry with false function HU entries.

Like below, I have used 'fake device'  on d6; off d6 string.  but surely there is a neater way.

Need about a 20-30 second delay between E1 off and E1 on...see the macro named cycle below

Not worked out how to trigger a script yet either ..any clues?
Edit:  think I found out, need heyu engine and connecting to the Pi to run the scripts


x10.sched
Code: [Select]
#Timer every day runs macro 'router_off' and one minute later 'router_on' macro

timer  smtwtfs    01/01-12/12 11:44 11:45   router_off  router_on



#Timer every day runs the SCENE 'cycle' as specified in x10conf

timer  smtwtfs    01/01-12/12 19:49 19:50 cycle nul

l


# The string of commands on d6;off d6 is merely to create a delay

macro cycle 0 off e1;off b2;on d6;off d6;on d6;off d6;on d6;off d6;on d6;off d6;on d6;off d6;on d6;off d6;on d6;off d6;on d6;off d6;on b1;on e1


macro  router_on  0  on e1


macro  router_off 0 off e1



# Hitting a3 on/off on a remote to activate macros router_on and router_off

trigger a3 off  router_off

trigger a3 on  router_on



# Hitting a4 on on a remote should macro cycle
trigger a4 on cycle




x10conf
Code: [Select]
TTY /dev/ttyUSB0



START_ENGINE AUTO

HOUSECODE   A



# Change to LOG_DIR  NONE to stop logging as it will grow too big

#Lookup 'unix command 'logrotate' to auto trim the log file


LOG_DIR /etc/heyu/


DATE_FORMAT DMY


LAUNCH_SOURCE ANYSRC



LONGITUDE         W002:05     
LATITUDE          N49:10     


WRITE_CHECK_FILES YES



# This scene turns off b1 and b2 20 second delay then back on again


SCENE  cycle off b1; off b2; pause 20; on b1; on b2




SCRIPT c3 on anysrc ::heyu off b1
« Last Edit: August 01, 2018, 02:49:01 PM by npaisnel »
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.