Skip to content

Go library for programmatically controlling HOT Boxes.

Notifications You must be signed in to change notification settings

YakirOren/hotremote

Repository files navigation

HotRemote

Go

HotRemote is a simple and user-friendly Go library for programmatically controlling HOT Boxes.

Features

  • Hot Box Control: Programmatically control your Hot Box, for example changing channels.
  • Button Press: Simulate pressing buttons on your Hot Box's remote control, enabling you to automate tasks and create custom interactions.
  • API Abstraction: Abstracts the complexity of Hot Box protocol, providing a simple and unified interface.
  • Feature Coverage: Full capability with the mobile app.

Installation

To use HotRemote in your Go project, you need to have Go installed and set up. You can install the library by running the following command:

go get github.com/yakiroren/hotremote

Usage

To use HotRemote in your Go code, import the library into your project:

import "github.com/yakiroren/hotremote"

Connecting to a Hot Box

package main

import (
	"log"
	"github.com/yakiroren/hotremote"
)

func main() {
	client, err := HotRemote.New()
	if err != nil {
		log.Fatal(err)
	}

	// Use the `client` object to interact with the Hot Box
}

List Connected Devices

devices, err := client.ListDevices()
if err != nil {
log.Fatal(err)
}

for _, device := range devices {
log.Println(device.ID, device.Name)
}
420254005266 HOT FiberBox266
316501071005 Hot FiberBox0000
321307003805 HOT mini FiberBox805

Using Sessions

Use the device ID to create a session

session := client.CreateSession("316501071005")

session.SwitchToChannel(13)

session.SwitchToChannel(12)

Buttons

// Power on or off the device
session.PressPower()

// color buttons
session.PressRed()
session.PressGreen()
session.PressBlue()
session.PressYellow()

// movement buttons
session.PressUp()
session.PressDown()
session.PressLeft()
session.PressDown()

// open search menu
session.OpenSearch()
session.SendStr("value to search")
session.PressSelect()

session.PressInfo()
// or direct call
session.Press(Buttons.Info)

See more at the examples folder.

About

Go library for programmatically controlling HOT Boxes.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages