Skip to content

Unofficial library to communicate with F&Home API – the worst smart home system ever.

License

Notifications You must be signed in to change notification settings

bartekpacia/fhome

Repository files navigation

Welcome to F&Home – the worst smart home system ever.

– me

I did this thing not because it's easy, but because I thought it would be easy.

fhome

Go Reference Go Report

Package and CLI to communicate with F&Home – a smart home system.

F&Home doesn't provide any kind of API, but I managed to figure out how it works using Chrome Devtools and by looking at the messages it sends over websockets.

Then I started putting together this project.

Package

The api package implements the F&Home API. Use it if you want to make your own program interact with it.

Command-line apps

fhome

Command-line program to easily interact with your F&Home-enabled devices.

Depends on the api package.

Build

$ go build -o fhome ./cmd/fhome/*.go

Install

$ go install ./cmd/fhome

Help

$ fhome help

fhomed

Provides integration between F&Home and HomeKit. Intended to be used as a background daemon.

Depends on the api package.

Registering with systemd

  1. Copy the binary to a common location

    $ sudo cp ./fhomed /usr/local/bin
  2. Create a service file

    $ sudo cp ./fhomed.service /etc/systemd/system
  3. Reload changes

    $ sudo systemctl daemon-reload

Extracing status logs from journald

$ journalctl \
  _SYSTEMD_UNIT=fhomed.service \
  --no-pager \
  --output json-pretty \
  | jq --slurp \
    --compact-output \
     '.[] | {timestamp: .__REALTIME_TIMESTAMP, msg: .MESSAGE}'

Or in a single line:

$ journalctl _SYSTEMD_UNIT=fhomed.service --no-pager -o json-pretty | jq -s -c  '.[] | {timestamp: .__REALTIME_TIMESTAMP, msg: .MESSAGE}'

Build

$ go build -o fhomed ./cmd/fhomed/*.go

Install

$ go install ./cmd/fhomed

About

Unofficial library to communicate with F&Home API – the worst smart home system ever.

Resources

License

Stars

Watchers

Forks

Languages