waringer / broadlink

Go library for Broadlink RM devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go library for Broadlink RM devices pipeline status Go Report Card

This library where created with work from the following pages:

The library is designed to work with Broadlink RM Mini3 or similar devices. It can configure the WLan settings of the device and learn and send IR commands over the device.

In the root directory is a sample command line program "main.go" where you can see the usage of the library.

Link to documentation in GoDoc

How to's

* Setup a new device

  • Put device in "AP-Mode"
  • Run "broadlinkrm.Hello" to find the device (usually it will have the an IP like 192.168.10.1)
  • Run "broadlinkrm.Join" to let the device join your Wireless LAN

* Bring the device in "AP-Mode"

  • Long press the reset button until the blue LED is blinking quickly.
  • Long press again until blue LED is blinking slowly.
  • Manually connect to the WiFi SSID named BroadlinkProv.

Function's in the library

Hello

  • In: timeout time.Duration, deviceIP net.IP

  • Out: chan Device

  • Description: Find devices and get info's about it.

Auth

  • In: dev *Device

  • Description: Authenticate against an device. Updates the security info's of the device struct for further usage.

Command

  • In: cmd uint32, data []byte, dev *Device

  • Out: []byte

  • Description: Send a command to device.

Join

  • In: ssid string, password string, securityMode byte, deviceIP net.IP

  • Out: []byte

  • Description: Setup a device in AP-mode to use the specified wlan

About

Go library for Broadlink RM devices

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%