Please login or register.

Login with username, password and session length

Author Topic: script for scheduler?  (Read 4529 times)

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
script for scheduler?
« on: January 28, 2021, 01:16:51 PM »

I am ready to retire a tired old slow as molasses win10 laptop running my cm15 at an office building across town.   Other than a couple light controls, it just has to arm and disarm the DS9000 security unit, and if I can get email to work, send messages confirming arm/disarm/tamper.

So I am ready to swap it out with a pi4.  Again, only to run on it will be HG and teamviewer to access it.

Could I impose on a programmer to convert for me the scheduler script to send a certain RF?  I can do this in a program but it is not as clean as a scheduler with nice crone timing.

So this works from any web browser:
http://192.168.x.xx:8080/api/HomeAutomation.X10/RF/Control.RfSend/29%2090%20xxxxxxxxx

And this works from a program built with the wizard:
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: script for scheduler?
« Reply #1 on: January 28, 2021, 02:08:33 PM »

I found in https://github.com/genielabs/x10-lib-dotnet

// Sending a raw message.
// The example below is the RF command A1 ON/OFF (RF works with CM15 only)
x10.SendMessage(new byte[] { 0xEB, 0x20, 0x60, 0x9F, 0x00, 0xFF });
x10.SendMessage(new byte[] { 0xEB, 0x20, 0x60, 0x9F, 0x20, 0xDF });

But I don't know how to convert this into a script line in a schedule?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: script for scheduler?
« Reply #2 on: January 28, 2021, 03:30:40 PM »

Why save a few coins and install Raspberry pi desktop on your slow laptop.
It looks and feels like the Raspi OS but is for PC & Mac desktops or laptops.
I converted one of my old slow Windows laptops to this.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: script for scheduler?
« Reply #3 on: January 28, 2021, 04:18:55 PM »

I never even considered this!  Wow, what a great idea!  That old laptop would speed right back up again.   Thanks for the idea.  I pretty much have  my 2nd pi4 programmed ready to go.  I did notice the pi processor runs too hot to touch if I plug in keyboard, hdmi, SSD, and mouse;  had to put a fan over it.  Not that it would run my app with anything other than cm15, but repurposing that useless tiny laptop to buster would be great!  I will put the pi4 in tomorrow to handle it while I reprogram the laptop.  tnx for the cool idea!

I gave up trying to get a script to send RF over cm15.  I just moved  my complex crone time sttements to my arm/disarm programs so they trigger appropriately m-f, only, and at right start and stop times. 
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: script for scheduler?
« Reply #4 on: January 28, 2021, 04:25:54 PM »

I had already converted that old laptop to running Linux  (debian stretch I believe) but the raspberry pi desktop is much faster and looks and feels like a Pi.
« Last Edit: January 28, 2021, 04:38:06 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
 

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