Replies: 12 comments
-
The only suggestion I can give you is not to do it in an X10-interface macro, but instead to do it in the computer connected to the interface. Real programming, I'm afraid...
|
Beta Was this translation helpful? Give feedback.
-
Ah OK I do have the supplied Windows Active Home Pro, but was hoping to do it from the Cmd line on the Raspberry Pi rather than dig out old Windows laptop every time I wanted to upload a sched |
Beta Was this translation helpful? Give feedback.
-
Still need to finish getting my own Pi set up to act as an x10 bridge. If I do anything interesting, I'll publish.______________________________________"Your data is important to us. Please stay on the port, and your connection will be accepted by the next available thread."
|
Beta Was this translation helpful? Give feedback.
-
Heyu with HA-Bridge with a CM11 and Alexa works well ... Well, as well as can be expected with X-10 and the half deaf Alexa and her constant miss hearing of words and utter repetitive crap it talks. |
Beta Was this translation helpful? Give feedback.
-
Try this link: http://coreyswrite.com/electronics/home-automation/amazon-echo-x10-home-control-updated/ |
Beta Was this translation helpful? Give feedback.
-
Ha, yes that is the very 'walk through' that I had been using to get as far as I have. If you scroll to the last few comments you will see I have had a few questions there...NeilP I'd like to have the CM11 programmed up with a few 'router reboot macros ' etc so they can be triggered without needing the RPi connected all the time. As I said, I can create a delay within a macro by inserting lots of false commands, but was hoping that there was a delay command to sue within the macrso...the Delay at the beginning of the macro is no use ..I need it in the middle. |
Beta Was this translation helpful? Give feedback.
-
Ok. I did not have that requirement. I just have the ha-bridge and heyu running on a RPiZero simply forwarding commands from Alexa to the X-10 modules. The electrical footprint of the Zero is small, so I keep it running all the time, and have a scheduled reboot of the RPiZero, like once a week or so. My Router I reboot occasionally manually. If you have an X-10 timer, you could plug the router into an X-10 module and do it on a timer. Along with using Alexa to turn X-10 lights on/off, I have some lights on an X-10 timer controller. Just wanted to be able to override timer lights with Alexa on demand. |
Beta Was this translation helpful? Give feedback.
-
On Tuesday 31 July 2018 08:41:24 Joe Kesselman ***@***.*** [heyu_users] wrote:
The only suggestion I can give you is not to do it in an X10-interface
macro, but instead to do it in the computer connected to the
interface. Real programming, I'm afraid...
Do it in a bash script. Send heyu the command, make bash sleep for 3
seconds, and send the command again. Repeat for 3 times. I have an
evening christmas lights schedule that doesn't alway work on the first
command as the switch is quite some distance from the cm11a, but with
three sends spaced a few seconds apart, hasn't failed in 10 years. It
then sleeps for 3 hours, and turns them off 3 times.
That same basic schedule, uploaded a year at a time so sunset times are
automatic, has worked about 99.5% of the time for the next decade and
change. That way I can have a cron job to refresh the cm11a's memory,
set to fire off at 01:00, Jan 1, so its all automatic. Hasn't been
touched in 8 years.
Now if I could figure out a way to get the DST switches to update the
clock in the cm11a. it would be even better. But I haven't really
researched it either. I keep running out of round tuits. :)
According to the man page heyu now maintains its cm11a clock on local
time so it compensates for DST, but right now, its 11:26 local, and heyu
info says its 10:26, and the schedule has expired. WTH? Using the exact
command cron runs, it worked and now the raw clock is EST, and its local
clock is EDT. No clue why it failed to update back in January, so I
moved the trigger time ahead about an hour just in case the DST switch
made it miss the upload command. It should not be a powerfail forget as
I have an automatic 20kw standby generator so any power failures are sub
10 seconds in duration. And the battery usage in the info report says
00:01.
And "info" says my ~/heyu can be deleted as its using /usr/local/etc/heyu
as its reference data source. One less directory full of unused stuff to
clutter up /home/$me.
The head scratcher is, if the schedule was expired, why was it still
working? Good question, that, because it was, as of last evening, still
running the lights.
New feature request:
heyu needs to send the admin, $me, an email when the schedule expires,
daily until its refreshed.
Or has that been done?, this is a 2.11-rc2 build, do doubt old & as white
bearded as I am...
…--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
|
Beta Was this translation helpful? Give feedback.
-
That is exactly my setup Roy. I do have an Alexa timer, that is what the CM11 you can setup timers in it . You create the timer in the x10.conf file and x10.sched file, then use hyeu upload to up load the timers to the CM11. I do already have the router on an X10 appliance module, and it is in the attic. So I can reboot it from downstairs manually with a remote. I too have just set up a timer to reboot it once a week or so. Occasionally other stuff goes down ( the wireless bridge from home to shed for instance) and that needs rebooting manually ( also via another x-10 module in the attic).. But sometimes I want to reboot it while I am away from home . Using the iPhone app for the TIP10RF module I can shut down the X-10 devices, via the web and my DDNS host name. trouble is ..once shut down I can't reboot I again as connection is lost as the router is down. using a macro in x10.sched I can do this using the trigger command to trigger the macro. The iPhone sends the command over the internet to my home router via DDNS, to the TIP10RF. TIP10RF transmits the d4 on command, which runs the macro called cycle. I just wondered if there was a command to put in place of the d6;off d6;on d6;off d6;on. This is what I have : but that string of on d6; off d6 is a bit 'bulky' and I wanted to trim it to a neater command I wanted
but I did not know what 'code word' to use to replace delay 20 seconds |
Beta Was this translation helpful? Give feedback.
-
Could you show me your cron entry to do this please. I am guessing it uses the heyu upload command . I am new to this usni command line stuff and I have heard of cron jobs cron tab etc but never yet even looked at how to create one. As for the DST times settings ...no idea. Not had mine running long enough to know about this . Bash script, another phrase I have heard, but no idea about them or how to create or make them run I would be interested in a cron job that auto reboots the Pi once a week though, how would that be achieved ? Current release seems to be 2.11 rc3 so you are not far behind |
Beta Was this translation helpful? Give feedback.
-
On Tuesday 31 July 2018 16:26:20 npaisnel ***@***.*** [heyu_users] wrote:
> That way I can have a cron job to refresh the cm11a's memory,
set to fire off at 01:00, Jan 1, so its all automatic
Could you show me your cron entry to do this please. I am guessing it
uses the heyu upload command . I am new to this usni command line
stuff and I have heard of cron jobs cron tab etc but never yet even
looked at how to create one.
First, spend some time reading both the heyu man page, and the crontab man page.
As for the DST times settings ...no idea. Not had mine running long
enough to know about this .
I just added a daily setclock just to make sure its got the right time.
Here is my $user's crontab:
(wordwrap off)
#!/bin/sh
# m h dom mon dow command
# load next years xmas lights schedule once annually st 3 minutes past 2am every year
3 2 1 1 * /usr/local/bin/heyu upload
# reset the cm11a's clock at 2 minutes after 2am in case a DST switch has been done
2 2 * * * /usr/bin/heyu setclock
Thats not all of it obviously, but thats the heyu maintenance.
Bash script, another phrase I have heard, but no idea about them or
how to create or make them run
See man bash. Warning though, that man page is hundreds of kilobytes,
you nor I will not ever get it without the man page for reference. Its
quite a complete shell language. Not quite as capable as ARexx was on
the amiga's but fairly close.
I would be interested in a cron job that auto reboots the Pi once a
week though, how would that be achieved ?
That you would have to setup a passwordless root to do. I've done that
but it was over a year ago, and I've long since forgotten how I did that.
But you might try this, put in roots crontab which will bypass that
problem:
#!/bin/bash
# m h dom mon dow command
1 1 * * 1 reboot
Where it should/will reboot it at 1 minute after 1 any day of the month,
any month, and 1st day of the current week.
Now this will be run from the root crontab, where it shouldn't run from
the user account as I do not think the reboot command is in the users
normal $PATH but is in roots normal $PATH.
Current release seems to be 2.11 rc3 so you are not far behind
Good. Thanks. I hope this is helpfull.
…--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
|
Beta Was this translation helpful? Give feedback.
-
Thanks so much for those examples, that is exactly what a *nix cmd prompt newbie needs. You do see the advice
about reading man pages just about every where, but I am afraid to say that man pages to a newbie are generally as good as totally useless. Yes they list lots of options, ut virtually none of them give actuall working examples of the syntax, how to build the command etc. I have been 'tinkering' with this sort of stuff once or twice every few years for well..15 years or so and man pages ...grrr never got my head around them..the phrase "chocolate fireguard ' comes to mind. I've just installed Home Assistant on a spare SD card for the RaspPi 3B+, in a Virtual Python environment. All from online tutorials not my own work ! Why I Python VE no one has said, but eventually got it working Thanks for he help Neil |
Beta Was this translation helpful? Give feedback.
-
I have read man pages x10config(5) and x10sched plus read arounf many guides and checked the sample files.
I can't seem to find a neat way to create a delay WITHIN a macro.
Yes I see you can put a delay at the start of a macro, but I want a delay in the middle, like:
macro cycle 0 off e1 ; **SOME delay of 30 seconds or so ** ; on e1
I can achieve this by inserting random commands between the off and on commands , but not very 'neat' and wastes space
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
This is to power cycle a router that does not have a scheduled Reboot option in the Router WebGUI, Many other uses too, like powering on a TV, then giving it chance to boot before powering on DVD etc,
Beta Was this translation helpful? Give feedback.
All reactions