Skip to content

Latest commit

 

History

History
92 lines (62 loc) · 3.26 KB

README.md

File metadata and controls

92 lines (62 loc) · 3.26 KB

About

This project provides a library and CLI programm for the HomeEasy (now Smartwares) HE853 USB RF remote control sender. The sender is used for toggling 433MHz (433.92MHz) RF controlled devices.

USB stick VID:PID identity and name: 04d9:1357 Holtek Semiconductor, Inc.

The library was extracted in 2012 from roseasy which is a part of the ROS (Robot Operating System) project. The code is no longer available.

Another project that provides a C# Windows SDK for the dongle is the HE853 Control Project.

Usage

You can build the CLI programm by simply running

make

To install the binary and the udev rule file to provide access for the users group run

sudo make install

The default protocol is EU - you can adjust this in the main.cpp or pass it in over the command line - see parameters below.

Usage: ./he853 [<DeviceID> <Command> [<Protocol>]]
  DeviceID - ID of the device to act on
  Command  - 0=OFF, 1=ON
    NOTE: AnBan has also values > 1
  Protocol - A=AnBan, U=UK, E=EU, K=KAKU, L=ALL
    Default protocol is 'E'
    NOTE: Protocol ALL is meant for tests and sends out with all protocols!
  Without parameters the device status will be shown

NOTE: You have to have proper access rigths to the USB stick to use it but the program will tell you if it can't properly access the stick. Either you can use sudo or by installing the udev rules file. Good documentation about udev usage and debug is here

The command is either a 0 for OFF or anything > 0 for ON. To program the power socket you have to place the power socket into learning mode and send the ON command to it:

./he853 2001 1

After that you can use the deviceId 2001 for toggling the power socket.

For the KAKU (KlikAanKlikUit, Archtech, Intertechno PAR, ...) protocol you can use https://isn-systems.com/tools/it2elro/ to calculate the number. But it's fairly easy - take group (A-P = 0-15), multiply by 16 and add devices number (0-15).

Requirements

  • libusb-1.0 development headers
  • udev development headers sometimes required for static builds, sometimes not :)

Compile Notes

he853.h allows setting of RUN_DRY and DEBUG

PHP Example

<?php exec("/opt/bin/he853 2001 1"); ?>

SynoCommunity

The CLI command is available for Synology NAS via SynoCommunity

Known Issues

  • doesn't compile on OSX
  • Compiling under Optware-ng works out of the box after installing all required dependencies, for Entware-ng you need to install include files manually but they recommend to crosscompile. Native build required some adjustments for the Makefile:
all: he853

hid-libusb.o: hid-libusb.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -Wl,-rpath,"/opt/lib" -I/opt/include/libusb-1.0 -c $< -o $@

he853: main.o he853.o hid-libusb.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $+ -Wl,-dynamic-linker,/opt/lib/ld-linux.so.3 -Wl,-rpath,"/opt/lib" -o $@ -lusb-1.0 -lpthread

clean:
	$(RM) *.o he853