gomotics

command module
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2017 License: MIT Imports: 2 Imported by: 0

README

gomotics

GitHub release Travis branch Coverage Status Go Report Card license

Niko Home Control - Jeedom interface in Go

  • expose API for interacting with NHC
  • real-time events using websocket
  • interface NHC with Jeedom (switche and dimmer)
  • automatically creates NHC items in Jeedom

More information/doc on the wiki and on my blog

See gomotics automatically creating NHC objects in Jeedom

gomotics v0.4

Installation:

Docker

A docker image is automatically build with Travis-CI. It is available on Docker Hub

Binaries

Download your platform binary from the release page, extract the executable from the archive.

See the wiki for an example of automating gomotics process startup with supervisor

Running

Config file

gomotics will run with default config if you do not provide a configuration file. If you want to link gomotics with Jeedom, provide the Jeedom URL and API key as follows

[jeedom]
url = "http://jeedom/core/api/jeeApi.php"
apikey = "abcdefgh1234"

To enable Gomotics to automatically create NHC items in Jeedom:

[jeedom]
url = "http://jeedom/core/api/jeeApi.php"
apikey = "abcdefgh1234"
autoCreateObjects= true

[server]
gmHostPort = "gomotics.local:8081"

A complete config file would like as follows:

[server]
listenPort = 8081
logLevel = "DEBUG"
logPath = "."
gmHostPort = "gomotics.local:8081"

[jeedom]
url = "http://jeedom-host/core/api/jeeApi.php"
apikey = "abcdefgh1234"
autoCreateObjects= false

[nhc]
host =          "x.x.x.x"
port =          8000

env variables

Config can also be setup as env variable:

LISTEN_PORT         optional    default 8081
LOG_LEVEL           optional    default INFO
LOG_PATH            optional    default . (specify stdout for docker)
JEE_URL             mandatory if using Jeedom
JEE_APIKEY          mandatory if using Jeedom
NHC_HOST            optional    autodiscover
NHC_PORT            optional    autodiscover on port 8000
AUTO_CREATE_OBJECTS optional    default false
GM_HOSTPORT         mandatory if using AutoCreateObjects feature, default localhost

Then start gomotics as follows:

gomotics -conf path/confg.toml

Or if using docker:

docker run -d -P --net host --name gomotics -e JEE_URL=http://jeedom-host/core/api/jeeApi.php -e JEE_APIKEY=abcdegf1234 -e LOG_PATH=stdout mch1307/gomotics

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL