diff --git a/Makefile b/Makefile index 5a46af5..c6dc81d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: build run run-bash -IMAGE_NAME := go-telldus-matter +IMAGE_NAME := matst80/go-telldus build: docker build -t $(IMAGE_NAME) . @@ -9,4 +9,7 @@ run: docker run --rm --privileged -p 8081:8080 -v /dev/bus/usb:/dev/bus/usb -v $(PWD)/tellstick.conf:/etc/tellstick.conf -v $(PWD)/db:/go/src/app/db -e MQTT_URL=10.10.3.12:1883 -e MQTT_USER=telldus-dev -e MQTT_PASSWORD= $(IMAGE_NAME) run-bash: - docker run --rm -it --privileged -p 8081:8080 -v /dev/bus/usb:/dev/bus/usb -v $(PWD)/tellstick.conf:/etc/tellstick.conf -v $(PWD)/db:/go/src/app/db --entrypoint /bin/bash $(IMAGE_NAME) \ No newline at end of file + docker run --rm -it --privileged -p 8081:8080 -v /dev/bus/usb:/dev/bus/usb -v $(PWD)/tellstick.conf:/etc/tellstick.conf -v $(PWD)/db:/go/src/app/db --entrypoint /bin/bash $(IMAGE_NAME) + +push: build + docker push $(IMAGE_NAME) \ No newline at end of file diff --git a/db/telldus.db b/db/telldus.db index 7a86f42..7696274 100644 Binary files a/db/telldus.db and b/db/telldus.db differ diff --git a/main.go b/main.go index 58583bf..8adf12a 100644 --- a/main.go +++ b/main.go @@ -1,17 +1,18 @@ package main import ( - "app/pkg/datastore" - "app/pkg/devices" - "app/pkg/mqtt" - "app/pkg/telldus" - daemon "app/pkg/telldus-daemon" "encoding/json" "log" "net/http" "os" "os/signal" "strconv" + + "git.k7n.net/mats/go-telldus/pkg/datastore" + "git.k7n.net/mats/go-telldus/pkg/devices" + "git.k7n.net/mats/go-telldus/pkg/mqtt" + "git.k7n.net/mats/go-telldus/pkg/telldus" + daemon "git.k7n.net/mats/go-telldus/pkg/telldus-daemon" ) const ( diff --git a/pkg/devices/manager.go b/pkg/devices/manager.go index 2ded7ea..eda3a86 100644 --- a/pkg/devices/manager.go +++ b/pkg/devices/manager.go @@ -1,15 +1,16 @@ package devices import ( - "app/pkg/datastore" - "app/pkg/mqtt" - "app/pkg/telldus" "fmt" "log" "strconv" "strings" "sync" "time" + + "git.k7n.net/mats/go-telldus/pkg/datastore" + "git.k7n.net/mats/go-telldus/pkg/mqtt" + "git.k7n.net/mats/go-telldus/pkg/telldus" ) // EventManager handles telldus events and callbacks diff --git a/pkg/devices/sync.go b/pkg/devices/sync.go index c16887d..55b3071 100644 --- a/pkg/devices/sync.go +++ b/pkg/devices/sync.go @@ -1,10 +1,11 @@ package devices import ( - "app/pkg/datastore" - "app/pkg/telldus" "fmt" "log" + + "git.k7n.net/mats/go-telldus/pkg/datastore" + "git.k7n.net/mats/go-telldus/pkg/telldus" ) // Syncer handles synchronization of devices and sensors to the database diff --git a/pkg/mqtt/discovery.go b/pkg/mqtt/discovery.go index 249cd39..e3c516c 100644 --- a/pkg/mqtt/discovery.go +++ b/pkg/mqtt/discovery.go @@ -1,10 +1,11 @@ package mqtt import ( - "app/pkg/datastore" - "app/pkg/telldus" "fmt" "log" + + "git.k7n.net/mats/go-telldus/pkg/datastore" + "git.k7n.net/mats/go-telldus/pkg/telldus" ) // DeviceDiscovery represents Home Assistant device discovery payload diff --git a/pkg/mqtt/mqtt.go b/pkg/mqtt/mqtt.go index 5fedba9..465a193 100644 --- a/pkg/mqtt/mqtt.go +++ b/pkg/mqtt/mqtt.go @@ -1,10 +1,11 @@ package mqtt import ( - "app/pkg/datastore" - "app/pkg/telldus" "fmt" + "git.k7n.net/mats/go-telldus/pkg/datastore" + "git.k7n.net/mats/go-telldus/pkg/telldus" + mqtt "github.com/eclipse/paho.mqtt.golang" ) diff --git a/pkg/telldus-daemon/daemon.go b/pkg/telldus-daemon/daemon.go index f0c553d..4b57f5c 100644 --- a/pkg/telldus-daemon/daemon.go +++ b/pkg/telldus-daemon/daemon.go @@ -9,7 +9,7 @@ import ( "syscall" "time" - "app/pkg/telldus" + "git.k7n.net/mats/go-telldus/pkg/telldus" ) // Manager handles the telldusd daemon lifecycle