Heyu on FBF 7140

talkeasy

Neuer User
Mitglied seit
17 Mai 2009
Beiträge
7
Punkte für Reaktionen
0
Punkte
0
Apologies first for not speaking German. :(

Can you please explain how I can install Heyu (www.heyu.org) on my Fritzbox 7140? I do not wish to modify the firmware but I understand from reading through the forums, using Google Translate, that I can use a cross-compiler to create files I can add to the USB drive. Has anyone done this before or give me some (simple!) pointers, please?

Thank you very much.
 
Hi,

there are some hints in the wiki, but I will try to repeat them here. First you need a crosscompiler and then some small modifications to the "Configure" (or the resulting Makefile) to use the cross-compiler instead of the local compiler:
Code:
# first cd <source-dir of heyu>
# add cross-compiler to path 
PATH=~/freetz/trunk/toolchain/target/bin/:$PATH
# add own settings to "Configure" script
patch -p0 < mipsel_diff
#
# now configure and build binary
#
./Configure mipsel_linux
LDFLAGS=-static make
mipsel-linux-strip heyu

You will find a patch and the resulting binary as an attachment.

I have no clue, what the program does, but it seems to work ;-):
Code:
/var/tmp # ./heyu help

Usage: heyu [options] <command>   (Run 'heyu help' for commands)

 [Options]
    -v             Enable verbose mode
    -c <pathname>  Specify full configuration file pathname
    -s <pathname>  Specify full schedule file pathname
    -0 ... -9      Config file is in subdirectory /0 ... /9
                   of standard location, e.g., $HOME/.heyu/3/x10config

 [Administrative commands  (H = Housecode)]
  heyu  info                       Display CM11A registers, clock, and upload status
  heyu  help  [category|command]   This screen [category or command]
  heyu  help  help                 Explain help usage
  heyu  start                      Start Heyu background processes (daemons)
  heyu  stop                       Stop Heyu background processes
  heyu  restart                    Reconfigure running Heyu background processes
  heyu  engine                     Start the (optional) Heyu state engine daemon
  heyu  aux                        Start the (optional) Heyu auxiliary RF input daemon
  heyu  monitor                    Monitor X10 activity (end with <BREAK>)
  heyu  date                       Return date in date(1) input format
  heyu  erase                      Zero CM11A EEPROM, erasing all events and macros
  heyu  syn                        Display built-in synonyms for direct commands
  heyu  <label>                    Execute a scene or usersyn defined in the config file
  heyu  show  <option>             (Enter 'heyu show' to see options)
  heyu  script_ctrl  <option>      Launch scripts disable|enable
  heyu  initstate  [H]             Zero entire state table or just housecode H
  heyu  initothers                 Zero cumulative address table
  heyu  reset  [H]                 Reset interface to housecode H or default
  heyu  setclock                   Set CM11A clock to system clock (per schedule)
  heyu  readclock                  Display CM11A and system clocks (per schedule)
  heyu  newbattery                 Reset CM11A battery timer to zero
  heyu  purge                      Cancel pending CM11A delayed macros
  heyu  clear                      Clear CM11A registers
  heyu  list                       Display Lock, Spool, and System base directory names
  heyu  upload  [check|croncheck]  Upload schedule to CM11A or check schedule file
  heyu  upload  status|cronstatus  Display status of uploaded schedule
  heyu  catchup                    Emulate uploaded Timers from 0:00 to current time today
  heyu  trigger  Hu on|off         Emulate Trigger in uploaded schedule
  heyu  macro  <label>             Emulate Macro in uploaded schedule
  heyu  utility  <option>          (Enter 'heyu utility' to see options)
  heyu  logmsg  <"text">           Display text message in log file and/or monitor
  heyu  wait  [timeout]            Wait until macro execution is completed
  heyu  cm10a_init                 Initialize CM10A interface. (For CM10A only!)
  heyu  arm  [parameters]          Set security flag to armed
  heyu  disarm                     Set security flag to disarmed
  heyu  restore_groups             Restore extended group and xconfig settings
  heyu  logtail  [N]               Display tail [N lines] of log file
  heyu  launch  <parameters>       Launch script. Enter 'heyu launch' for usage
  heyu  version                    Display the Heyu version and exit

 [State commands  (H = Housecode, u = Single unit) - require heyu engine]
  heyu  enginestate        Display 1 if state engine is running, else 0
  heyu  armedstate         Bitmap: 1 = armed, 2 = home, 4 = armpending, 8 = tamper
  heyu  sensorfault        Bitmap: 1 = low battery, 2 = inactive, 8 = tamper
  heyu  flagstate  n       Boolean state of flag n
  heyu  nightstate         Boolean state of night flag
  heyu  darkstate          Boolean state of dark flag
  heyu  sunstate           Bitmap: 1 = night, 2 = dark
  heyu  statusstate  H[u]  Status-pending bitmap of H or Boolean Hu
  heyu  onstate  H[u]      On-state bitmap of H or Boolean Hu
  heyu  dimstate  H[u]     Dim-state bitmap of H or Boolean Hu
  heyu  chgstate  H[u]     Changed-state bitmap of H or Boolean Hu
  heyu  addrstate  H[u]    Addressed-state bitmap of H or Boolean Hu
  heyu  statestr  H        State mini-bitmaps of all units as ASCII string
  heyu  dimlevel  Hu       Brighness level of module Hu as 0-100%
  heyu  rawlevel  Hu       Native level (0-210, 1-32, or 0-63) of module Hu
  heyu  memlevel  Hu       Stored level 0-100% for module Hu with memory
  heyu  rawmemlevel  Hu    Stored native level for module Hu with memory
  heyu  heyu_state  Hu     Heyu script environment state bitmap (as integer)
  heyu  heyu_rawstate  Hu  Heyu script raw environment state bitmap (as integer)
  heyu  xtend_state  Hu    Xtend script environment state bitmap (as integer)
  heyu  rcstemp  H         RCS compatible temperature (stored value)
  heyu  fetchstate         See man page heyu(1)

 [RFXSensor state commands  (H = Housecode, u = Single unit) - require heyu engine]
  heyu  rfxtemp  Hu   Temperature
  heyu  rfxrh  Hu     Relative Humidity
  heyu  rfxbp  Hu     Barometric Pressure
  heyu  rfxpot  Hu    Potentiometer setting
  heyu  rfxvs  Hu     Supply Voltage
  heyu  rfxvad  Hu    A/D Voltage
  heyu  rfxvadi  Hu   Internal A/D Voltage
  heyu  rfxlobat  Hu  Low Battery state (Boolean)
  heyu  rfxtemp2  Hu  Second Temperature

 [RFXMeter state commands  (H = Housecode, u = Single unit) - require heyu engine]
  heyu  rfxpower  Hu   Watt-Hour meter reading
  heyu  rfxpanel  [n]  Total Watt-Hours for Power Panel [n]
  heyu  rfxwater  Hu   Water meter reading
  heyu  rfxgas  Hu     Gas meter reading
  heyu  rfxpulse  Hu   Pulse meter reading
  heyu  rfxcount  Hu   Raw counter of any meter

 [DigiMax state commands  (H = Housecode, u = Single unit) - require heyu engine]
  heyu  dmxtemp  Hu      DigiMax current temperature (C)
  heyu  dmxsetpoint  Hu  DigiMax setpoint temperature (C)
  heyu  dmxstatus  Hu    DigiMax On/Off status (1 = On)
  heyu  dmxmode  Hu      DigiMax Heat/Cool mode (1 = Heat)

 [Oregon state commands  (H = Housecode, u = Single unit) - require heyu engine]
  heyu  oretemp  Hu                Oregon sensor Temperature
  heyu  orerh  Hu                  Oregon sensor Relative Humidity
  heyu  orebp  Hu                  Oregon sensor Barometric Pressure
  heyu  ore_emu  Hu <func> <data>  Enter data in Oregon emulation module

 [Direct commands  (H = Housecode, U = Units list)]
  heyu  on  HU                     Turn units ON
  heyu  off  HU                    Turn units OFF
  heyu  bright  HU <level>         Brighten units by <level> (1-22)
  heyu  brightb  HU <level>        Brighten units by <level> (1-22) after full bright
  heyu  dim  HU <level>            Dim units by <level> (1-22)
  heyu  dimb  HU <level>           Dim units by <level> (1-22) after full bright
  heyu  obdim  HU <level>          Dim units by <level> (1-22) after full bright
  heyu  lightson  H                Turn All Lights ON
  heyu  lightsoff  H               Turn All Lights OFF (**)
  heyu  allon  H                   Turn Units 1-16 ON
  heyu  alloff  H                  Turn All Units OFF
  heyu  turn  HU <command>         Change state on|off|up|down [vv]
  heyu  preset  HU <level>         Preset units to <level> (1-32) (*)
  heyu  mpreset  HU <linked>       Limited Preset for macros - see manpage
  heyu  preset_level  <level>      Preset to <level> (1-32) (function only)
  heyu  status  HU                 Request ON/OFF status (two-way modules)
  heyu  status_on  HU              Status Acknowledge ON
  heyu  status_off  HU             Status Acknowledge OFF
  heyu  hail  [H]                  Hail other devices
  heyu  hailw  [H]                 Hail other devices, await ack (*)
  heyu  hail_ack  [H]              Hail Acknowledge
  heyu  data_xfer  H               Data Transfer (function code 0xC)
  heyu  xon  HU                    Extended Turn Units Full ON (LM14A)
  heyu  xoff  HU                   Extended Turn Units Full OFF (LM14A)
  heyu  xpreset  HU <level>        Extended Preset <level> (0-63) (LM14A)
  heyu  xallon  H                  Extended All Units ON (LM14A)
  heyu  xalloff  H                 Extended All Units OFF (LM14A)
  heyu  xstatus  HU                Extended Status Request (LM14A)
  heyu  xconfig  H <mode 0-3>      Extended config auto status mode (LM14A)
  heyu  xpowerup  HU               Extended module power-up signal (LM14A)
  heyu  xgrpadd  HU G              Include in Group (G = 0-3) at current level
  heyu  xgrpaddlvl  HU g <level>   Include in Group (g = 0-3) at <level>
  heyu  xgrprem  HU g[,g,...]      Remove HU from one or more Groups (g = 0-3)
  heyu  xgrpremall  H g[,g,...]    Remove H from one or more Groups (g = 0-3)
  heyu  xgrpexec  H G              Execute extended Group G function (LM14A)
  heyu  xgrpstatus  HU G           Extended Group G Status Request (LM14A)
  heyu  xfunc  <T/F> HU <Data>     Extended command - general
  heyu  xfuncw  <T/F> HU <Data>    Extended command - general, await ack (*)
  heyu  address  HU [HU [...]]     Send Housecode|Units addresses only (*)
  heyu  function  <command ...>    Send command function only
  heyu  kill_all_hc                Send All_Units_Off to All Housecodes
  heyu  pause  N.NNN               Pause for N.NNN seconds (*)
  heyu  sleep  N.NNN               Sleep for N.NNN seconds (*)
  heyu  rcs_req  <query_command>   Request RCS compatible status (*)
  heyu  temp_req  <query_command>  Request temperature (RCS compatible) (*)
  heyu  vdata  HU <byte>           Write data (0-255) to virtual module (*)
  heyu  setflag  n[,n...]          Set one or more flags (n = 1-16) (@) (*)
  heyu  clrflag  n[,n...]          Clear one or more flags (n = 1-16) (@) (*)
  heyu  settimer  N <hh:mm:ss>     Set countdown timer N (1-16) to hh:mm:ss (@) (*)
  heyu  clrtimers                  Reset all countdown timers 1-16 to zero (@) (*)
  heyu  clrstatus  H[U]            Clear status-pending flags (@) (*)
  heyu  clrtamper                  Clear security tamper flags (@) (*)
  heyu  setcount  N <count>        Set counter N (1-16) to <count> (0-64K) (*)
  heyu  inccount  N                Increment counter N (1-16) by 1 (*)
  heyu  deccount  N                Decrement counter N (1-16) by 1 (*)

 [Shutter (Extended Type 0) direct commands  (H = Housecode, U = Units list)]
  heyu  shopen  HU <level>         Open shutter to level (0-25) and cancel limit
  heyu  shopenlim  HU <level>      Open shutter to level (0-25), enforce limit
  heyu  shsetlim  HU <level>       Set limit (0-25) and open shutter to limit
  heyu  shopenall  H               Open all shutters fully and cancel limit
  heyu  shcloseall  H              Close all shutters fully

 [CM17A "Firecracker" commands (H = Housecode, U = Units list)]
  heyu  freset                     Reset CM17A device (*)
  heyu  fon  HU                    Transmit RF On (*)
  heyu  foff  HU                   Transmit RF Off (*)
  heyu  fbright  H[U] <count>      Transmit RF Brights [after On] (*)
  heyu  fdim  H[U] <count>         Transmit RF Dims [after On] (*)
  heyu  fdimbo  HU <count>         Transmit RF Dims after Off (*)
  heyu  flightson  H               Transmit RF All Lights On (*)
  heyu  flightsoff  H              Transmit RF All Lights Off (**) (*)
  heyu  falloff  H                 Transmit RF All Units Off (*)
  heyu  farb  xx xx <count>        Transmit RF Arbitrary 2-byte hex code (*)
  heyu  farw  xxxx xxxx ...        Transmit RF multiple 16-bit hex words (*)
  heyu  flux  <parameters>         Special for UX23A/UX17A - see manpage (*)
  heyu  ffbright  H[U] <count>     Transmit RF Brights [after On] (#) (*)
  heyu  ffdim  H[U] <count>        Transmit RF Dims [after On] (#) (*)
  heyu  ffdimbo  HU <count>        Transmit RF Dims after Off (#) (*)
  heyu  ffarb  xx xx <count>       Transmit RF Arbitrary 2-byte hex code (#) (*)
  heyu  ffarw  xxxx xxxx ...       Transmit RF multiple 16-bit hex words (#) (*)
  heyu  fflux  <parameters>        Special for UX23A/UX17A - see manpage (#) (*)

 [Internal engine precommands  (See man pages)]
  @setflag  n[,n...]       Set one or more flags (n = 1-16) (@) (*)
  @clrflag  n[,n...]       Clear one or more flags (n = 1-16) (@) (*)
  @settimer  N <hh:mm:ss>  Set countdown timer N (1-16) to hh:mm:ss (@) (*)
  @clrtimers               Reset all countdown timers 1-16 to zero (@) (*)
  @clrstatus  H[U]         Clear status-pending flags (@) (*)
  @vdata  HU <byte>        Write data (0-255) to virtual module (*)
  @setcount  N <count>     Set counter N (1-16) to <count> (0-64K) (*)
  @inccount  N             Increment counter N (1-16) by 1 (*)
  @deccount  N             Decrement counter N (1-16) by 1 (*)
  @decskpz  N              Decrement counter N and skip if Zero (*)
  @decskpnz  N             Decrement counter N and skip if Non-Zero (*)

  (*)  Not available for use in uploaded macros.
  (**) Many modules do NOT support this command.
  (#)  Fast CM17A command - see man x10cm17a(5) for configuration.
  (@)  Ignored unless state engine is running.

 Man pages:
 heyu(1), x10config(5), x10sched(5), x10scripts(5), x10aux(5), x10cm17a(5), x10rfxsensors(5), x10rfxmeters(5), x10digimax(5), x10oregon(5).

/var/tmp #

Good luck ;-)

Joerg
 

Anhänge

  • heyu.gz
    256.7 KB · Aufrufe: 8
  • mipsel_diff.gz
    661 Bytes · Aufrufe: 3
Joerg

Thank-you very much for taking the time to reply and explain what to do. I will be trying the attached binary tomorrow and will report back.

You have been very helpful!
 
The binary is working fine - which is great.

However, heyu is an X10 automation controller and needs to write to ttyS0.
On starting Heyu I get the error:

Code:
HEYU: Can't open tty line.  Check the permissions.

When I try to change the permissions on ttyS0 I get this error message:

Code:
# chmod 777 /dev/ttyS0
chmod: /dev/ttyS0: Read-only file system

I am now stuck! Any ideas how to resolve this, please?
 
Hello,

do you want to use the internal seriall port (ttyS0) with the 3,3V Level? On this seriall port there are also system messages and the possibility to use it as terminal. Maybe you should stop this before using it by heyu.

But on your 7140 with USB Host i would prefer to use a USB2seriall-converter. If you need TTL- or-3,3V-Level and RS and TS are enough, you can use a cheap handy-cable for it.
In freetz there are the needed kernel moduls (usb_serial.ko, pl2303, ftdi_sio.ko) included.

Mario
 
Thanks for the reply Mario.

I am not sure I understand all your suggestions, but thanks for making them!

Firstly, I need to know if it is possible to make ttyS0 readable? Is it possible to get root access to do this?

Thank-you.
 
Heyu communicates with a CM11A computer interface to send and receive X10 control signals using USB.

It appears there is no easy way to write to ttyS0 from what you say.

Unfortunately it looks as if this project is beyond my skills. Thanks for your help.
 
Heyu communicates with a CM11A computer interface to send and receive X10 control signals using USB.

So you want to connect your Interface with the USB Host of your Fritzbox 7140?
Yes? Then ttyS0 is wrong. This is the internal serial port inside the Fritzbox.

It seems like your USB-Adapter uses a internal USB2serial-chipset. So you have to use ttyUSB0. For this chipset you need the right kernel moduls.
In freetz there are the needed kernel moduls (usb_serial.ko, pl2303, ftdi_sio.ko) included.

Did you tested Heyu with your adapter before with a PC or laptop with linux before?
Try this with and without your adapter connected to this PC
Code:
lsusb
and post the output here.

Mario
 
Mario

Thanks for your persistance!

Without x10 controller:
debian40server:~# lsusb
Bus 001 Device 003: ID 0e0f:0002
Bus 001 Device 001: ID 0000:0000

With x10 controller:
debian40server:~# lsusb
Bus 001 Device 003: ID 6547:0232
Bus 001 Device 002: ID 0e0f:0002
Bus 001 Device 001: ID 0000:0000

Does that help? I am also including a screenprint from the vmware session, showing when the x10 controller is connected and disconnected.

lsusb.jpg


Thank-you very much!
 
You see, here it is also ttyUSB0.

But its a pitty the kernel moduls seems not to be in freetz. Maybe somebody with better skills can compile it for you or integrate it in freetz. My skills in coding and compiling are still too poor and in this forum i found only this thread without an solution for the ark3116: http://www.ip-phone-forum.de/showthread.php?t=151020

Maybe you ask under Freetz for an integration of the ARK3116.

Mario
 
Well, that seems to be the end of my dream! Thanks for your suggestions Mario.

Does anyone think it will be possible to get ARK3116 and ttyUSB0 working?
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.