GithubHelp home page GithubHelp logo

joshuar / go-hass-agent Goto Github PK

View Code? Open in Web Editor NEW
118.0 118.0 8.0 3.54 MB

A Home Assistant, native app for desktop/laptop devices.

License: MIT License

Go 98.58% Shell 0.85% Dockerfile 0.57%
automation fyneapp go golang-app hass home-assistant linux-app mqtt scripting

go-hass-agent's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar jaynis avatar joshuar avatar kamaradclimber avatar vrutkovs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-hass-agent's Issues

[BUG] Not all drives are recognised / not named recognisable

Go Hass Agent Version
7.3.1

Describe the bug
go-hass-agent seems to only create a sensor for one of my two drives. And interestingly this is the temperature of the second drive or sdb not sda. This sensor is named HOSTNAME_drivetemp_temp1_temp.

To Reproduce
Steps to reproduce the behaviour:

  1. have two drives
  2. start go-hass-agent

Expected behaviour
I would expect go-hass-agent to create two sensors. And it would be great, if the sensor represents the path or name of the drive.

Logs
go-hass-agent.log

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Proxmox
  • Version 6.2.16-4-pve

[SENSOR] connected webcam usage

What are the sensors you would like to see in Go Hass Agent? What do they measure? Why are they useful? How would you use them in Home Assistant?

  • A sensor indicating when a webcam is on/in-use
  • Just whether the webcam is on and currently recording/receiving images.
  • As a binary sensor, to indicate that someone is currently recording a video/streaming/on a video conference. To control lighting/doors etc.

How do you access the sensor(s) currently?

  • No clear location that this is even recorded. Pipewire on Linux might be key.

[BUG] KDE Neon is reported as Debian Bookworm/Sid

Describe the bug
When a computer is running go-hass-agent with KDE Neon, the distribution is instead reported as Debian Bookworm/Sid. (Neon is based on Ubuntu LTS.)

To Reproduce
Steps to reproduce the behavior:

  1. Install go-hass-agent on a machine/VM running KDE Neon
  2. Open Home Assistant
  3. Look at the reported distribution

Expected behavior
The distribution should report KDE Neon.

Screenshots
image

Logs
go-hass-app.log

Desktop (please complete the following information):

  • OS: KDE neon 5.27 x86_64 (Kernel: 6.2.0-39-generic)
  • Browser: I suspect this template was made for a web dev, but I use Microsoft Edge (Chromium version)
  • Version: Version 120.0.2210.91 (Official build) (64-bit)

[SENSOR] connected microphone usage

What are the sensors you would like to see in Go Hass Agent? What do they measure? Why are they useful? How would you use them in Home Assistant?

  • A sensor that records when a connected microphone is being used
  • Just whether the microphone is in use or not.
  • As a binary sensor, could be used to change lights/shut doors/send notifications to indicate someone is on a call/streaming etc.

How do you access the sensor(s) currently?

  • It's not clear whether this is exposed anywhere or easily measure. Pipewire on Linux might hold something like this.

[BUG] VersionUnavailable: GLX: Failed to create context: BadValue (integer parameter out of range for operation)

Describe the bug
The application doesn't start properly. If started from gui, the hass icon bounces a moment and then nothing happens. If started from terminal VersionUnavailable: GLX: Failed to create context: BadValue (integer parameter out of range for operation) error appears and the program runs forever.

To Reproduce
Steps to reproduce the behavior:

  1. Download go-hass-agent-0.0.2-1-x86_64.pkg.tar.zst
  2. Install with 'sudo pacman -U go-hass-agent-0.0.2-1-x86_64.pkg.tar.zst '
  3. Open Terminal and start 'go-hass-agent'
  4. See error

Expected behavior
I expected the application to start normaly.

Logs
A log will be very helpful to look into this bug report. To get the log:

  1. Run go-hass-agent from a terminal or command-line with the --debug flag:
3:52PM DBG Debug logging enabled.
3:52PM INF Starting agent.
3:52PM DBG /home/joshua/git/go-hass-agent/internal/agent/config.go:74 > Setting language to [de].
3:52PM DBG /home/joshua/git/go-hass-agent/internal/config/config.go:94 > Config seems invalid.
3:52PM WRN No suitable existing config found! Starting new registration process
3:52PM INF Looking for Home Assistant instances on the network...
3:52PM DBG /home/joshua/git/go-hass-agent/internal/agent/register.go:52 > Found a record 192.168.0.15:8123
2023/04/12 15:52:27 Fyne error:  window creation error
2023/04/12 15:52:27   Cause: VersionUnavailable: GLX: Failed to create context: BadValue (integer parameter out of range for operation)
2023/04/12 15:52:27   At: /home/joshua/gocode/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/driver_notwindows.go:9

Desktop (please complete the following information):

  • OS: Arch-Linux

Thank you in advance for your trouble.

go-hass-agent errors out on first run

Go Hass Agent Version
7.1.0

Describe the bug
go-hass-agent errors out after entering required info

To Reproduce
Steps to reproduce the behaviour:

  1. Execute go-hass-agent
  2. Enter details
  3. Hit continue
  4. See error.

Expected behaviour
Not exactly sure - but not the error.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
mwright yoda go hass agent.txt.gz

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Ubuntu
  • Version 24.1

Additional context
Add any other context about the problem here.

[BUG] go-hass-agent version not working

Go Hass Agent Version
Retrieve with go-hass-agent version. i can't ...
but i tried with the latest : V9.5.1 yesterday

Describe the bug
this is the bug , no version appear when i do go-hass-agent version

I'm on Debian 12 and used the .tar.xz.

To Reproduce
Steps to reproduce the behaviour:

 su user -c "/home/duser/.local/bin/go-hass-agent  --terminal  version"
 INF Go Hass Agent:

it was working well with v9.2.0 ;) , other version after i don't know.

Thanks

Trying to setup docker container and faced with the error

Hello!

This situation is present with first step of registration of agent and the next with the container also.

Ubuntu Focal server and Docker version 20.10.9, build c2ea9bc.

Registration step:
docker run --rm --network host --volume /home/docker_storage/homeassistant-agent:/home/gouser ghcr.io/joshuar/go-hass-agent register --server http://homeassistant:8123 --token mytoken

Compose:

version: '3.9'
services:
  ha-agent:
    container_name: homeassistant-agent
    image: ghcr.io/joshuar/go-hass-agent:latest
    hostname: homeassistant-agent
    network_mode: host
    volumes:
    - /proc:/host/proc:ro
    - /sys:/host/sys:ro
    - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
    - /run/user/1000/bus:/run/user/1000/bus:ro
    restart: unless-stopped
runtime/cgo: pthread_create failed: Operation not permitted
SIGABRT: abort
PC=0x7f7a91fc3d3c m=0 sigcode=18446744073709551610

goroutine 0 [idle]:
runtime: g 0: unknown pc 0x7f7a91fc3d3c
stack: frame={sp:0x7fff6c0a9d80, fp:0x0} stack=[0x7fff6b8ab200,0x7fff6c0aa210)
0x00007fff6c0a9c80:  0x0000000000000000  0x0000ffff00001fa0 
0x00007fff6c0a9c90:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9ca0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cb0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cc0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cd0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9ce0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cf0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d00:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d10:  0x00007f7a9210c703  0x00007f7a9210c703 
0x00007fff6c0a9d20:  0x2525252525252525  0x2525252525252525 
0x00007fff6c0a9d30:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d40:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d50:  0x00000000000000ff  0x0000000000000000 
0x00007fff6c0a9d60:  0x0000000000000000  0x0000000000f4b613 
0x00007fff6c0a9d70:  0x0000000000000003  0x00007f7a91fc3d2e 
0x00007fff6c0a9d80: <0x7020746f6e206e6f  0x0363964a819f3f00 
0x00007fff6c0a9d90:  0x0000000000000006  0x00007f7a91e09740 
0x00007fff6c0a9da0:  0x00007fff6c0aa050  0x0000000000000000 
0x00007fff6c0a9db0:  0x0000000001eb6440  0x00007f7a91f74f32 
0x00007fff6c0a9dc0:  0x00007f7a9210ce70  0x00007f7a91f5f472 
0x00007fff6c0a9dd0:  0x0000000000000020  0x0000000000000006 
0x00007fff6c0a9de0:  0x0000000001f07f2a  0x0000000000000000 
0x00007fff6c0a9df0:  0x0000000000f4d030  0x0000000000000004 
0x00007fff6c0a9e00:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9e10:  0x0000000000000000  0x0000000001eb6440 
0x00007fff6c0a9e20:  0x0000000000000006  0x00007f7a91fbaee9 
0x00007fff6c0a9e30:  0x00007f7a9210c680  0x00007f7a91fbb2f3 
0x00007fff6c0a9e40:  0x00007f7a9210c680  0x000000000000000a 
0x00007fff6c0a9e50:  0x00007f7a91e09740  0x00007f7a91fb687a 
0x00007fff6c0a9e60:  0x00007f7a9210c840  0x0363964a819f3f00 
0x00007fff6c0a9e70:  0x00007f7a9210c840  0x00007f7a9210c840 
runtime: g 0: unknown pc 0x7f7a91fc3d3c
stack: frame={sp:0x7fff6c0a9d80, fp:0x0} stack=[0x7fff6b8ab200,0x7fff6c0aa210)
0x00007fff6c0a9c80:  0x0000000000000000  0x0000ffff00001fa0 
0x00007fff6c0a9c90:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9ca0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cb0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cc0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cd0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9ce0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9cf0:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d00:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d10:  0x00007f7a9210c703  0x00007f7a9210c703 
0x00007fff6c0a9d20:  0x2525252525252525  0x2525252525252525 
0x00007fff6c0a9d30:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d40:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9d50:  0x00000000000000ff  0x0000000000000000 
0x00007fff6c0a9d60:  0x0000000000000000  0x0000000000f4b613 
0x00007fff6c0a9d70:  0x0000000000000003  0x00007f7a91fc3d2e 
0x00007fff6c0a9d80: <0x7020746f6e206e6f  0x0363964a819f3f00 
0x00007fff6c0a9d90:  0x0000000000000006  0x00007f7a91e09740 
0x00007fff6c0a9da0:  0x00007fff6c0aa050  0x0000000000000000 
0x00007fff6c0a9db0:  0x0000000001eb6440  0x00007f7a91f74f32 
0x00007fff6c0a9dc0:  0x00007f7a9210ce70  0x00007f7a91f5f472 
0x00007fff6c0a9dd0:  0x0000000000000020  0x0000000000000006 
0x00007fff6c0a9de0:  0x0000000001f07f2a  0x0000000000000000 
0x00007fff6c0a9df0:  0x0000000000f4d030  0x0000000000000004 
0x00007fff6c0a9e00:  0x0000000000000000  0x0000000000000000 
0x00007fff6c0a9e10:  0x0000000000000000  0x0000000001eb6440 
0x00007fff6c0a9e20:  0x0000000000000006  0x00007f7a91fbaee9 
0x00007fff6c0a9e30:  0x00007f7a9210c680  0x00007f7a91fbb2f3 
0x00007fff6c0a9e40:  0x00007f7a9210c680  0x000000000000000a 
0x00007fff6c0a9e50:  0x00007f7a91e09740  0x00007f7a91fb687a 
0x00007fff6c0a9e60:  0x00007f7a9210c840  0x0363964a819f3f00 
0x00007fff6c0a9e70:  0x00007f7a9210c840  0x00007f7a9210c840 

goroutine 1 [running]:
runtime.systemstack_switch()
	/usr/local/go/src/runtime/asm_amd64.s:474 +0x8 fp=0xc000056740 sp=0xc000056730 pc=0x473a48
runtime.main()
	/usr/local/go/src/runtime/proc.go:169 +0x6d fp=0xc0000567e0 sp=0xc000056740 pc=0x4422cd
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0000567e8 sp=0xc0000567e0 pc=0x475a21

rax    0x0
rbx    0x1
rcx    0x7f7a91fc3d3c
rdx    0x6
rdi    0x1
rsi    0x1
rbp    0x7f7a91e09740
rsp    0x7fff6c0a9d80
r8     0x0
r9     0x73
r10    0x8
r11    0x246
r12    0x6
r13    0x0
r14    0x1eb6440
r15    0x6
rip    0x7f7a91fc3d3c
rflags 0x246
cs     0x33
fs     0x0
gs     0x0

[BUG] Unsupported or unknown portal. App sensors will not run.

Describe the bug
Not seeing sensors in HA, WRN in debug shows unknown portal is an issue.

To Reproduce
Steps to reproduce the behavior:
I'm running the terminal command...
go-hass-agent register --terminal --token Token --server URL
*** where Token and URL are the actual token and URL for my home assistant***
[Output]
12:21AM WRN No UI. Will not display tray icon.
12:21AM WRN No UI. Likely running headless. Not running Fyne UI loop.
12:21AM INF Device registered with Home Assistant.

Expected behavior
I expect some sensors in home assistant, but nothing shows up.

Logs
go-hass-agent info
12:15AM INF Device Name Desktop2.Device ID 24d0d3ec-8c60-4939-a116-f7acb0ce4f48.
go-hass-agent version
12:15AM INF go-hass-agent: v5.3.0
go-hass-agent --debug
12:17AM DBG Debug logging enabled.
12:17AM DBG Setting language to [en-US].
12:17AM DBG Running UpgradeConfig.
12:17AM DBG Registration status is true
12:17AM DBG Running ValidateConfig.
12:17AM DBG Could not export secret. error="key hass.secret not set"
12:17AM DBG Could not find any script files.
12:17AM WRN Unsupported or unknown portal. App sensors will not run.
12:17AM WRN Unable to execute org.freedesktop.problems.GetProblems on org.freedesktop.problems (args: []) error="The name org.freedesktop.problems was not provided by any .service files"
panic: interface conversion: interface {} is nil, not string

goroutine 42 [running]:
github.com/joshuar/go-hass-agent/internal/linux.(*upowerBattery).marshalBatteryStateUpdate(0xc000013968, {0x1192fd0, 0xc000424270}, 0x9)
/home/runner/work/go-hass-agent/go-hass-agent/internal/linux/batterySensor.go:95 +0x4f4
github.com/joshuar/go-hass-agent/internal/linux.BatteryUpdater({0x1192fd0?, 0xc000424270}, {0x118b1c0, 0xc0003f5320})
/home/runner/work/go-hass-agent/go-hass-agent/internal/linux/batterySensor.go:320 +0x1c5
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).startWorkers.func1(0x0?)
/home/runner/work/go-hass-agent/go-hass-agent/internal/agent/agent.go:305 +0x76
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).startWorkers
/home/runner/work/go-hass-agent/go-hass-agent/internal/agent/agent.go:303 +0x316

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.3 LTS
  • Browser chrome

Additional context
I am not great on linux, but I can try and muscle my way around. I did my best to read and understand the provided instructions.
With that said I am human and may have missed a step. I actually missed that as I didn't see a gui even though I am running Ubuntu desktop. I may have also just read the terminal command and just ran it without looking at the gui. If you can walk me through re-install I will try the gui and see if that works.

[BUG] v7.3.1 script not working

Go Hass Agent Version
v7.3.1

Describe the bug
Maybe it's not a bug, i could miss something ?

My go-hass-agent starting well, no crash , but my script still not working, i have starting with --debug and i see :

RN Cannot run script error="could not unmarshal script output" script=/home/debian32/.config/com.github.joshuar.go-hass-agent/scripts/check_version_ha_agent_json.sh

the script have a good right, and the output is :

{ "schedule": "@every 1h", "sensors": [ { "sensor_name": "go hass agent version_installed", "sensor_icon": "mdi:package", "sensor_state": "7.3.1" } ] }

I would check the current go-hass-agent vesion installed to automate warning when new version.

and don't see any new sensor.

Thanks for this great tool ;)

[SENSOR] Disk read/write rate & volume sensors

What are the sensors you would like to see in Go Hass Agent? What do they measure? Why are they useful? How would you use them in Home Assistant?

  • Sensors that record the disk read/write rates (B/s or similar) and volume (B written or similar)
  • Useful for alerting and graphing in Home Assistant on IO load/saturation. For example, why is my Home Assistant server slow to respond?

How do you access the sensor(s) currently?

  • Unsure. I believe it'll be somewhere in the linux kernel sysfs...
  • Netdata or similar monitoring tools might have code that can be examined for inspiration.

Screen Lock Sensor Not Functioning

Hello
As far as I can tell, the screen lock sensor doesn't seem to be functioning, all is set up and working otherwise.

Installed from go-hass-agent-5.1.0-1-x86_64.pkg.tar.zst (onto arch)

I've seen where the code for the screen lock is and grepped through the debug output for "lock", which should hit any strings, and I don't see any errors nor the sensor appear in home assistant (when many others do).

I'm not running a DE, just awesome with xscreensaver, but I've looked and definitely have org.freedesktop.ScreenSaver as a service, so I don't think it's on my end (very happy to be proven wrong though).

[BUG] go-hass-agent does not creat state folder for log file, crashes therefore on fresh install.

Go Hass Agent Version
7.3.1

Describe the bug
On a fresh install and if the state folder is not existing, the ~/.local/state/go-hass-agent.log log file is not created and go-hass-agent crashes.

To Reproduce
Steps to reproduce the behaviour:

  1. (Delete the log file if existing)
  2. (Delete or rename state folder if existing)
  3. Start go-hass-agent

Expected behaviour
I would expect go-hass-agent to create the state folder if not existing.

Logs

9:41AM ERR Unable to open log file for writing. error="open ~/.local/state/go-hass-agent.log: no such file or directory"

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Arch Linux
  • Version 6.8.5-arch1-1

[BUG]

Go Hass Agent Version

johns@theo:~$ go-hass-agent version
7:28AM INF Go Hass Agent: v9.5.0

Describe the bug
Agent won't start when MQTT is configured on Ubuntu 24.04

To Reproduce
Steps to reproduce the behaviour:

  1. Configure and enable MQTT Settings
  2. Restart Agent
  3. Bob's your Uncle....
  4. See error.

Expected behaviour
I expect the agent to start and connect to my HA MQTT Server

Screenshots

johns@theo:~$ go-hass-agent run
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd6548d]

goroutine 162 [running]:
github.com/jfreymuth/pulse/proto.(*Client).error(0xc000636b60, {0x120c2c0, 0x18ae3e0})
	/home/joshua/go/pkg/mod/github.com/jfreymuth/[email protected]/proto/client.go:229 +0x20d
github.com/jfreymuth/pulse/proto.(*Client).readLoop(0xc000636b60)
	/home/joshua/go/pkg/mod/github.com/jfreymuth/[email protected]/proto/client.go:128 +0x86e
created by github.com/jfreymuth/pulse/proto.(*Client).Open in goroutine 116
	/home/joshua/go/pkg/mod/github.com/jfreymuth/[email protected]/proto/client.go:54 +0x125

Logs

johns@theo:~$ go-hass-agent --log-level debug run
7:33AM DBG Debug logging enabled.
7:33AM DBG Setting language to [en-US].
7:33AM DBG Read sensor registry from disk.
7:33AM DBG Agent already registered.
7:33AM DBG Listening for notifications.
7:33AM DBG Could not find any script files.
7:33AM WRN Unable to connect to Pulseaudio. Volume control will be unavailable. error="could not connect to pulseaudio: EOF"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd6548d]

goroutine 109 [running]:
github.com/jfreymuth/pulse/proto.(*Client).error(0xc000126d00, {0x120c2c0, 0x18ae3e0})
	/home/joshua/go/pkg/mod/github.com/jfreymuth/[email protected]/proto/client.go:229 +0x20d
github.com/jfreymuth/pulse/proto.(*Client).readLoop(0xc000126d00)
	/home/joshua/go/pkg/mod/github.com/jfreymuth/[email protected]/proto/client.go:128 +0x86e
created by github.com/jfreymuth/pulse/proto.(*Client).Open in goroutine 104
	/home/joshua/go/pkg/mod/github.com/jfreymuth/[email protected]/proto/client.go:54 +0x125
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xdd344f]

goroutine 104 [running]:
github.com/joshuar/go-hass-agent/internal/agent.(*linuxMQTTDevice).Subscriptions(0xc00031a380)
	/home/joshua/git/go-hass-agent/internal/agent/mqtt_linux.go:43 +0x22f
github.com/joshuar/go-hass-agent/internal/agent.runMQTTWorker({0x1215008, 0xc000406270}, {0xc000320280, 0x42})
	/home/joshua/git/go-hass-agent/internal/agent/runners.go:257 +0x149
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2.4()
	/home/joshua/git/go-hass-agent/internal/agent/agent.go:122 +0xde
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2 in goroutine 33
	/home/joshua/git/go-hass-agent/internal/agent/agent.go:118 +0x2c5

Ubuntu Linux 24.04

[BUG] Network offline state not correctly reported to HA

Hi. Apparently the Offline state of an network interface is not correctly reported to HA. In the event of an network interface disconnection the state either stays at Online or at Deactivating (depending on the type of the interface). I think the reason is that the following switch-case statement just closes the channel in case of Offline but does not send the state before:

switch {
case currentState == 4:
log.Debug().Str("connection", c.Name()).Str("path", string(c.path)).
Msg("Unmonitoring connection state.")
close(sensorCh)
case currentState != c.state:
c.state = currentState
sensorCh <- c
}

Would be cool to detect Zoom call status

Is your feature request related to a problem? Please describe.
Detect if the agent host is on a zoom call

Describe the solution you'd like

Using something like xdotool you can detect if a zoom meeting is current or not,etc.

xdotool search --class zoom
xdotool search --class zoom getwindowname 92274836

or some simple example:

#!/bin/bash

while true; do
  # search --sync waits for the window to show up.
  #if xdotool search --sync --name "Zoom Meeting ID:" > /dev/null; then
  if xdotool search --sync --name "Zoom Meeting" > /dev/null; then
    echo "In zoom :)"
  else
    echo "No zoom"
  fi
  sleep 1
done

Things you might use this status for:

  • turn on the "On Air" light outside your home office door to let people know you're on a call
  • dim/set lights a certain way for calls
  • mute noisy things in your environment to avoid distractions in Zoom calls

[Question] run privileged

Hi i have a short question, i want to run it on a linux based server and want to do with it also some things which i need root privileges. so i want to run it as root. but already at the time of doing the first registration i get the "FTL go-hass-agent should not be run with additional privileges or as root." message. how can i say to it i know that i run it as root and i want to do it?

[BUG] Crash after 60s

Describe the bug

After starting go-hass-agent, it crashes after ~60s

To Reproduce

Launch go-hass-agent binary.

Expected behavior

The process should remain up until interrupted.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
A log will be very helpful to look into this bug report. To get the log:

6:08PM DBG Debug logging enabled.
6:08PM INF Starting agent.
6:08PM DBG internal/agent/config.go:74 > Setting language to [en-US].
6:08PM DBG internal/agent/config.go:53 > Using URL https://ha.familleseux.net:443/api/webhook/b1dbfd47be7bcf0852b096a3ed90535667f11e814434f3397a7a95a825b8d860 for Home Assistant access
6:08PM DBG internal/agent/config.go:53 > Using URL https://ha.familleseux.net:443/api/webhook/b1dbfd47be7bcf0852b096a3ed90535667f11e814434f3397a7a95a825b8d860 for Home Assistant access
6:08PM DBG internal/device/device.go:84 > Registering Battery sensors.
6:08PM DBG internal/device/device.go:84 > Registering Apps sensors.
6:08PM DBG internal/device/device.go:84 > Registering Network sensors.
6:08PM DBG internal/agent/agent.go:158 > Setting up sensors for Battery.
6:08PM DBG internal/agent/agent.go:158 > Setting up sensors for Apps.
6:08PM DBG internal/agent/agent.go:158 > Setting up sensors for Network.
6:08PM DBG internal/hass/websocket.go:98 > Using wss://ha.familleseux.net:443/api/websocket for websocket connection.
6:08PM WRN Unsupported desktop/window environment.
6:08PM ERR Unable to execute org.freedesktop.NetworkManager.GetDevices on org.freedesktop.NetworkManager (args: ) error="The name org.freedesktop.NetworkManager was not provided by any .service files"
6:08PM DBG internal/device/network_linux.go:352 > Could not list devices from network manager
6:08PM DBG internal/device/apps_linux.go:126 > Unsupported or unknown portal
2023/04/12 18:08:46 systray error: failed to register our icon with the notifier watcher (maybe no tray is running?): The name org.kde.StatusNotifierWatcher was not provided by any .service files
6:08PM DBG internal/agent/config.go:53 > Using URL https://ha.familleseux.net:443/api/webhook/b1dbfd47be7bcf0852b096a3ed90535667f11e814434f3397a7a95a825b8d860 for Home Assistant access
6:08PM DBG internal/agent/notifications.go:45 > Requesting authorisation for websocket.
6:08PM DBG internal/agent/notifications.go:54 > Registering app for push notifications.
2023/04/12 18:09:46 Message recipient disconnected from message bus without replying

it is likely relevant to note in journalctl at the same time

Apr 12 18:09:46 gagarine geoclue[1609514]: Service not used for 60 seconds. Shutting down..
Apr 12 18:09:46 gagarine systemd[1]: geoclue.service: Deactivated successfully.

Desktop (please complete the following information):

  • OS: Archlinux
  • Version 0.0.2 + #4

[BUG] Crash when geoclue is not installed

Go Hass Agent Version

11:35PM INF Go Hass Agent: v9.3.0-75-gbfc0c89-dirty

Describe the bug
Crash at startup (SIGSEGV) when Geoclue2 is not installed.

To Reproduce
Steps to reproduce the behaviour:

  1. Don't install Geoclue2.
  2. Register using the GUI (go-hass-agent register --force)
  3. go-hass-agent run
  4. See error.

Expected behaviour
It shouldn't crash, and instead should just ignore the location sensor.

Logs

10:03PM WRN Could not activate a worker. error="unable to monitor for active applications: no portal present"
10:03PM WRN Could not activate a worker. error="unable to monitor for desktop settings: no portal present"
10:03PM WRN Could not activate a worker. error="unsupported hardware for laptop sensor monitoring"
10:03PM ERR Could not set up a geoclue client. error="SystemBus: unable to get data org.freedesktop.GeoClue2.Manager.GetClient from org.freedesktop.GeoClue2: The name org.freedesktop.GeoClue2 was not provided by any .service files"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xd19a9d]

goroutine 83 [running]:
github.com/joshuar/go-hass-agent/pkg/linux/dbusx.WatchBus({0x11b9198, 0xc00071c2d0}, 0x0)
	/home/whitelynx/Development/Other/go-hass-agent/pkg/linux/dbusx/dbus.go:250 +0x3d
github.com/joshuar/go-hass-agent/internal/linux.(*SensorWorker).Updates(0xc000716270, {0x11b9198, 0xc00071c2d0})
	/home/whitelynx/Development/Other/go-hass-agent/internal/linux/worker.go:137 +0x10d
github.com/joshuar/go-hass-agent/internal/agent.runWorkers({0x11b9160, 0xc00044d080}, {0x11b8f30, 0xc0005322e0}, {0x11b8f68, 0xc0005322d0})
	/home/whitelynx/Development/Other/go-hass-agent/internal/agent/runners.go:58 +0x3f1
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2.2()
	/home/whitelynx/Development/Other/go-hass-agent/internal/agent/agent.go:104 +0x65
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2 in goroutine 29
	/home/whitelynx/Development/Other/go-hass-agent/internal/agent/agent.go:102 +0x19a

Desktop:

  • OS: Linux
  • Distribution: Void
  • Version: rolling

Additional context
I encountered this because there's no go-hass-agent package on Void Linux, and when building manually, the documentation doesn't mention Geoclue2 being a prerequisite. Even after installing it, I'm unable to get Geoclue2 to actually run, so I'm still blocked by this error. (some of the specifics changed, of course - it now says Launch helper exited with unknown return code 253 instead of The name org.freedesktop.GeoClue2 was not provided by any .service files but the logs otherwise look practically identical)

For use on a desktop, it doesn't make sense to require a location sensor. (related to the first part of #171)

[BUG] MQTT controls not working anymore

Hi. After updating to v7.0.0 the agent does not connect to the MQTT broker anymore from my system, resulting in all MQTT controls such as screenlock not working anymore. In the course of this major update I deleted the entire configuration folder and started over again from scratch. But apparently the mqtt.enabled setting in the newly created preferences.toml file is ignored.

I tracked down the issue to the following line, which seems to always return an empty default configuration:

prefs := preferences.FetchFromContext(ctx)

When I replace this line with a simple prefs, err := preferences.Load() the preferences are retrieved properly and MQTT works again. But I assume FetchFromContext is used here for some reason. Can you elaborate how those context based preferences are supposed to work and what their advantage is over simply loading them? If I understand it correctly EmbedInContext stores the preferences in the context and FetchFromContext can be used to retrieve them aftewards. However, I can only find a single occurrence of EmbedInContext in the entire project (apart from the tests) and this is in some UI package.

[BUG] Preferences area is empty

Go Hass Agent Version
(go-hass-agent: v9.0.0)

Describe the bug
Preference area is empty

To Reproduce
Steps to reproduce the behaviour:

  1. Open the program
  2. Try to access settings

Expected behaviour
Accessing settings

Screenshots
Istantanea_2024-05-15_12-10-14

Logs
12:15PM DBG Debug logging enabled.
12:15PM DBG Setting language to [it].
12:15PM DBG Read sensor registry from disk.
12:15PM DBG Agent already registered.
12:15PM DBG Listening for notifications.
12:15PM DBG Starting worker funcs.
12:15PM DBG Could not find any script files.
12:15PM WRN Unable to monitor for active applications. No app tracking available.
12:15PM DBG Retrieved address. address=172.17.0.1 path=/org/freedesktop/NetworkManager/IP4Config/4 prefix=16
12:15PM DBG Monitoring connection state. connection="docker0 Connection State" path=/org/freedesktop/NetworkManager/ActiveConnection/2
12:15PM DBG Monitoring address changes. connection="docker0 Connection State" path=/org/freedesktop/NetworkManager/ActiveConnection/2
12:15PM DBG Retrieved address. address=192.168.1.54 path=/org/freedesktop/NetworkManager/IP4Config/2 prefix=24
12:15PM DBG Retrieved address. address=fd00::24c3:7fb3:f282:b7a6 path=/org/freedesktop/NetworkManager/IP6Config/2 prefix=64
12:15PM DBG Monitoring connection state. connection="Connessione via cavo 1 Connection State" path=/org/freedesktop/NetworkManager/ActiveConnection/1
12:15PM DBG Monitoring address changes. connection="Connessione via cavo 1 Connection State" path=/org/freedesktop/NetworkManager/ActiveConnection/1
12:15PM WRN Could not retrieve problem list. error="The name org.freedesktop.problems was not provided by any .service files"
12:15PM DBG Unable to retrieve property LidClosed (org.freedesktop.login1.Manager) error="dbus: invalid property LidClosed"
12:15PM WRN Could not retrieve lid status from D-Bus. Not tracking status. error="dbus: invalid property LidClosed"
12:15PM DBG Unable to retrieve property net.hadess.PowerProfiles.ActiveProfile (net.hadess.PowerProfiles) error="The name net.hadess.PowerProfiles was not provided by any .service files"
12:15PM DBG Cannot retrieve a power profile from D-Bus. Will not run power sensor. error="The name net.hadess.PowerProfiles was not provided by any .service files"
12:15PM WRN Unable to monitor for desktop settings. No accent color/theme tracking available.
12:15PM DBG Listening for location updates.
12:15PM DBG Listening for sensor updates.
12:15PM ERR Could not connect to websocket. error="dial tcp [REDACTED]: i/o timeout"

Desktop

  • OS: Linux
  • Distribution Linux Mint
  • Version 21.3

[BUG] Wrong config path for mqtt

Go Hass Agent Version
v7.3.0

Describe the bug
If mqtt is enabled, I get an error message with a wrong path to the config file. It says ERR Failed to register with MQTT. error="open /home/USER/.config/go-hass-anything/mqtt-config.toml: no such file or directory". But the config is in /home/USER/com.github.joshuar.go-hass-agent/. I don't know if my not working mqtt commands is related to that.

To Reproduce
Steps to reproduce the behaviour:

  1. run go-hass in terminal
  2. set up mqtt connection
  3. restart
  4. watch output

Expected behaviour
I would expect to point to the correct config folder.

Logs
The log does not seem to include anything useful.
go-hass-app.log

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Arch Linux
  • Version 6.8.4-arch1-1

Additional context
Fresh setup, nothing else configured.

[BUG] Errors Running Headless on Ubuntu Server

Describe the bug
When trying to run on a headless ubuntu server, I got the following errors it seems to fail to run due to a lack of a display environment.

 PlatformError: X11: The DISPLAY environment variable is missing
 panic: NotInitialized: The GLFW library is not initialized

To Reproduce
Steps to reproduce the behavior:

  1. Installed the 64bit deb package on ubuntu 23.04.
    sudo dpkg -i go-hass-agent_5.1.2-1_amd64.deb
  2. Attempt to run the following command:
    go-hass-agent register --token LONGLIVEACCESSTOKEN --server https://myserver.domain.com

Expected behavior
Expected this to register with home assistant and then run as service reporting details to home assistant that I could display in a dashboard.

Logs

7:46AM DBG Debug logging enabled.
7:46AM DBG Setting language to [en-US].
7:46AM DBG Running UpgradeConfig.
7:46AM DBG Registration status is false
7:46AM DBG Running ValidateConfig.
7:46AM INF Registration required. Starting registration process.
2023/11/22 07:46:04 PlatformError: X11: The DISPLAY environment variable is missing
panic: NotInitialized: The GLFW library is not initialized

goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError({0x0, 0x0, 0xc00031f768?})
        /home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:173 +0x1ae
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
        /home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:184
github.com/go-gl/glfw/v3.3/glfw.CreateStandardCursor(0xebf5c0?)
        /home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/input.go:512 +0x45
fyne.io/fyne/v2/internal/driver/glfw.initCursors()
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window_desktop.go:49 +0x5f
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).initGLFW.func1()
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/loop_desktop.go:22 +0x54
sync.(*Once).doSlow(0xc00031f878?, 0x4484e5?)
        /opt/hostedtoolcache/go/1.20.10/x64/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /opt/hostedtoolcache/go/1.20.10/x64/src/sync/once.go:65
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).initGLFW(0x7f791bdb4d28?)
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/loop_desktop.go:15 +0x45
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1()
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:954 +0x4a
fyne.io/fyne/v2/internal/driver/glfw.runOnMain(0xc000486180)
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/loop.go:53 +0x110
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow(0xc00022df10, {0xfe787e, 0xe}, 0x1)
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:953 +0xd8
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).CreateWindow(...)
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/window.go:945
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).SetSystemTrayMenu.func1()
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/driver_desktop.go:56 +0xd4
sync.(*Once).doSlow(0x43291d?, 0xedefc0?)
        /opt/hostedtoolcache/go/1.20.10/x64/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /opt/hostedtoolcache/go/1.20.10/x64/src/sync/once.go:65
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).SetSystemTrayMenu(0xc00022df10?, 0xc000486150?)
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/driver_desktop.go:39 +0x5f
fyne.io/fyne/v2/app.(*fyneApp).SetSystemTrayMenu(0x43cc30?, 0xe80ae0?)
        /home/runner/go/pkg/mod/fyne.io/fyne/[email protected]/app/app_xdg.go:143 +0x42
github.com/joshuar/go-hass-agent/internal/agent/ui/fyneUI.(*fyneUI).DisplayTrayIcon(0xc000013878, {0x118f160, 0xc000423d80})
        /home/runner/work/go-hass-agent/go-hass-agent/internal/agent/ui/fyneUI/fyneUI.go:135 +0x9db
github.com/joshuar/go-hass-agent/internal/agent.Register({{0x1001c33, 0x20}, 0x0, 0x0}, {0x7ffc271f6659, 0x1f}, {0x7ffc271f6598, 0xb7})
        /home/runner/work/go-hass-agent/go-hass-agent/internal/agent/agent.go:161 +0x22d
github.com/joshuar/go-hass-agent/cmd.glob..func2(0x17abb20?, {0xfd2d44?, 0x5?, 0x5?})
        /home/runner/work/go-hass-agent/go-hass-agent/cmd/register.go:25 +0x51
github.com/spf13/cobra.(*Command).execute(0x17abb20, {0xc00044e8c0, 0x5, 0x5})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x17abe00)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x425
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
github.com/joshuar/go-hass-agent/cmd.Execute()
        /home/runner/work/go-hass-agent/go-hass-agent/cmd/root.go:51 +0x25
main.main()
        /home/runner/work/go-hass-agent/go-hass-agent/main.go:29 +0x17

[BUG] go-hass-agent pulls nabu casa config without consent or explanation, resulting in errors in installs where remote nabu casa is not enabled

Describe the bug
During setup, go-hass-agent pulls what would be the nabu casa dashboard URL from configs. somehow.

This results in a lot of errors as I have nabu casa remote control disabled, as I have my own WAF and forwarding setup in use, i just pay to support the project and for the cloud voice stuff. I don't want it attempting to use nabu casa as a result.

As such, I've been getting errors in logs about failing to send data to home assistant, even tho i had entered the URL manually to be the URL that is accessible both on my LAN and external to my LAN

I also don't see any thing in docs about how to prevent it from attempting to touch the nabu casa endpoints

image

[FEATURE REQUEST] armhf architecture

Is your feature request related to a problem? Please describe.
There are some devices like rpi 2 prior to 1.2v with armhf processor architecture, unfortunatelly go-hass-agent cannot be installed with either arm or arm64 package there.

Describe the solution you'd like
I see both arm and arm64 so maybe enabling armhf would be possible?

[BUG] Unable to detect battery charge level / status on archlinux on Thinkpad t480

Describe the bug
When starting, the text output shows that it can't get battery data, and no battery data is sent to hass

To Reproduce
Steps to reproduce the behavior:

  1. Start agent
  2. Read logs
  3. See error

Expected behavior
This could partly be a configuration issue, however there's no documentation that I can find in the git other than reading code directly that would point me to where it's looking for this battery info

Logs

thonkslab% go-hass-agent --debug
11:30AM DBG Debug logging enabled.
11:30AM DBG Setting language to [en-US].
11:30AM DBG Running UpgradeConfig.
11:30AM DBG Registration status is true
11:30AM DBG Running ValidateConfig.
11:30AM DBG Could not export secret. error="key hass.secret not set"
11:30AM DBG Could not find any script files.
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Unable to convert dbus variant "" to type uint32. error="dbus.Store: type mismatch: cannot convert string to uint32"
11:30AM WRN Battery does not have a usable path. Will not monitor.
11:30AM WRN Unable to retrieve property net.hadess.PowerProfiles.ActiveProfile (net.hadess.PowerProfiles) error="The name net.hadess.PowerProfiles was not provided by any .service files"
11:30AM DBG Cannot retrieve a power profile from D-Bus. Will not run power sensor. error="The name net.hadess.PowerProfiles was not provided by any .service files"
11:30AM WRN Unable to execute org.freedesktop.problems.GetProblems on org.freedesktop.problems (args: []) error="The name org.freedesktop.problems was not provided by any .service files"

Desktop (please complete the following information):

  • OS: Arch Linux running kernel 6.6.6
  • Version 6.0.1
  • Hardware: Lenovo Thinkpad T480 laptop

[SENSOR] Webcam in use

This should be easy enough to do, I think - you should be able to look at fuser /dev/video0. If it reports something, then the webcam is on - otherwise it's off. (You might be able to get fancy and check video1 as well.)

Microphone might be handy, too, but I don't think you can get there from /dev/ - Google says you need to look at find /proc/asound -name status -exec grep -v closed {} + and see if it reports an output or not.

Even if it isn't natively built-in, it might be handy as an example script for people who want to write their own scripts?

Proposal: Add capabilities to the hass agent to control some functions of the OS

Right now the go-hass-agent only collects metrics from the OS and registers them as sensors in HA. What I would find really useful would be some controls in HA to operate certain areas of the OS where the agent runs on. For example:

  • Shutdown / Hibernate
  • Lock screen
  • Audio control

I think the biggest challenge here would be implementing this in a generic way which works for all / most of the systems. Especially screen lock and audio control can be quite distribution / desktop environment specific. What of course could be done is adding the option to execute arbitrary commands on the system, but this however might pose a security risk because anyone who has access to the MQTT broker could take over the system. A further way would be to add the option to pre-configure certain commands in the go-hass-agent UI which can be triggered from HA.

Hard to say what the best way of solving this would be and I think first of all it would be good to know whether this functionality is wanted at all or if the agent should rather stay read-only 😃 .

[BUG] MQTT settings does not accept value with format <IP>:<Port>

Describe the bug
When I use a IP Address for MQTT Server settings in UI settings, the form say "string is invalid"

To Reproduce

  1. Open App settings
  2. Use any IP address with port e.g. "192.168.1.6:1883" as value for MQTT Server
  3. Leave the field

Expected behavior
MQTT Server also accepts format <IP>:<Port>

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 23.10
  • Browser: Chrome
  • Version: 6.0.1

Crash using i3

Describe the bug

The app crashes immediately after configuration when getting Unsupported desktop/window environment.

To Reproduce

Steps to reproduce the behavior:

  1. Use i3 along with Arch
  2. Launch go-hass-agent binary (v4.1.1)

Expected behavior

It should not crash, at least, it should skip to the next part.

Logs

go-hass-agent --debug
2:13AM DBG Debug logging enabled.
2:13AM DBG Setting language to [fr-FR].
2:13AM DBG Registration status is true
2:13AM WRN Unsupported desktop/window environment.
2:13AM DBG ../runner/work/go-hass-agent/go-hass-agent/internal/linux/appSensor.go:128 > Unsupported or unknown portal
2:13AM WRN Unable to execute org.freedesktop.problems.GetProblems on org.freedesktop.problems (args: []) error="The name org.freedesktop.problems was not provided by any .service files"
2:13AM WRN Unable to retrieve property net.hadess.PowerProfiles.ActiveProfile (net.hadess.PowerProfiles) error="The name net.hadess.PowerProfiles was not provided by any .service files"
2:13AM DBG Cannot retrieve a power profile from DBus. error="The name net.hadess.PowerProfiles was not provided by any .service files"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x876552]

goroutine 84 [running]:
github.com/joshuar/go-hass-agent/internal/hass/api.StartWebsocket.func1()
	/home/runner/work/go-hass-agent/go-hass-agent/internal/hass/api/websocket.go:65 +0x112
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer.func1()
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:18 +0x1b
github.com/cenkalti/backoff/v4.doRetryNotify[...](0xc0005b1e58?, {0x7fd4ecbbb008, 0xc00068e320}, 0x0, {0x0, 0x0?})
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:88 +0x152
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0x0?, {0x7fd4ecbbb008?, 0xc00068e320?}, 0xdbbcc0?, {0x0?, 0x0?})
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:61 +0x65
github.com/cenkalti/backoff/v4.RetryNotify(...)
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:49
github.com/cenkalti/backoff/v4.Retry(...)
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:38
github.com/joshuar/go-hass-agent/internal/hass/api.StartWebsocket({0x10b6328?, 0xc000122050}, {0x10aec40, 0xc0002fbcc0}, 0xc0006aa0c0, 0xc0006aa120)
	/home/runner/work/go-hass-agent/go-hass-agent/internal/hass/api/websocket.go:73 +0x27c
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).runNotificationsWorker.func2()
	/home/runner/work/go-hass-agent/go-hass-agent/internal/agent/notifications.go:43 +0xad
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).runNotificationsWorker
	/home/runner/work/go-hass-agent/go-hass-agent/internal/agent/notifications.go:40 +0x1ea

Desktop (please complete the following information):

  • OS: Arch
  • Version: 4.1.1
  • Desktop env: i3 version 4.22 (2023-01-02)

Thanks for your work 🙏

[FEATURE REQUEST] deactivate swap if non is present

Is your feature request related to a problem? Please describe.
The log is "flooded" with the following three warings every minute.

WRN Sensor not found in registry. id=swap_usage
WRN Sensor not found in registry. id=swap_usage
WRN Update failed. error="swap_usage update failed: malformed response\nunexpected end of JSON in input" id=swap_usage

Describe the solution you'd like
If the swap is not present or not bigger than 0K, then the sensor is deactivated.

Describe alternatives you've considered
I deactivated the sensor in HA, but the error message persisted.

Additional context
go-hass-agent is running on a headless rasperry pi with Arch Linux.

[BUG] Won't start due to issue with libc.so.6 file missing !

Describe the bug
Complains about a libc.so.6 dependency missing but file exists on my system, and exit.

To Reproduce
Steps to reproduce the behavior:

  1. Install the deb package on Debian 11
  2. Start the go-hass-agent program
  3. Program exit immediately complaining about missing dependencies:
root@fixe:/lib/x86_64-linux-gnu# go-hass-agent 
go-hass-agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by go-hass-agent)
go-hass-agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by go-hass-agent)

but the file exists on my system (it's a link to the real file)

Expected behavior
Program starts normally

Can do some additional tests if needed ;)

Thanks

Vincèn

Add sensor and switch for connected monitor

A binary sensor that inidcates if the connected monitor is on or off.
A switch or buttons to turn the connected monitor on or off.

Both would be really nice for a Linux driven dashboard that autmonatically turns on or off on certain circumstances.

[BUG] Immediate crash when not using network-manager

Describe the bug

The app crashes immediately after configuration when not using a network-manager.

To Reproduce

Launch go-hass-agent binary (version 0.0.2)

Expected behavior

It should warn network-manager is not reachable/available.

Logs
A log will be very helpful to look into this bug report. To get the log:

4:54PM INF Starting agent.
4:54PM WRN No suitable existing config found! Starting new registration process
2023/04/12 16:54:42 systray error: failed to register our icon with the notifier watcher (maybe no tray is running?): The name org.kde.StatusNotifierWatcher was not provided by any .service files
4:54PM INF Looking for Home Assistant instances on the network...
4:55PM WRN Unsupported desktop/window environment.
4:55PM ERR Unable to execute org.freedesktop.NetworkManager.GetDevices on org.freedesktop.NetworkManager (args: ) error="The name org.freedesktop.NetworkManager was not provided by any .service files"
panic: interface conversion: interface {} is nil, not []dbus.ObjectPath

goroutine 164 [running]:
github.com/joshuar/go-hass-agent/internal/device.NetworkUpdater({0xfd3780, 0xc001ceecf0}, 0xc001b4b860)
	/home/grego/go/pkg/mod/github.com/joshuar/[email protected]/internal/device/network_linux.go:349 +0x625
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).tracker.func3(0xc000158dc0?)
	/home/grego/go/pkg/mod/github.com/joshuar/[email protected]/internal/agent/agent.go:162 +0x6a
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).tracker
	/home/grego/go/pkg/mod/github.com/joshuar/[email protected]/internal/agent/agent.go:160 +0x2ce

Desktop (please complete the following information):

  • OS: Archlinux
  • Version 0.0.2

[BUG]

Go Hass Agent Version
8.0.0

Describe the bug
My four go-hass-agents running as systemd services in terminal mode stop reporting data after I log out. For my raspberry pis this happens after about 3 minutes, for one Server around half an hour and another server around 5 minutes after logout. From the log, I suppose it is because the logout is interpreted as Crtl+C.

To Reproduce
Steps to reproduce the behaviour:

  1. Start go-hass-agent as systemd service
  2. logout from pc
  3. watch sensor in HA stop getting data

Expected behaviour
I would assume that go-hass-agent would continue running.

Screenshots
Raspberry Pi
raspi

Server 1
server1

Server 2
server2

Logs
I logged out at 8:55 and around 10:47. After the logout at 8:55 there is nothing reported until next loging at 10:44 and the Ctrl+C is mentioned :

…
{"level":"debug","name":"Bytes Received Throughput","id":"bytes_received_throughput","state":1196618,"units":"B/s","time":"2024-04-30T08:55:26+02:00","message":"Sensor updated."}
{"level":"debug","name":"Bytes Received","id":"bytes_received","state":129359045801,"units":"B","time":"2024-04-30T08:55:26+02:00","message":"Sensor updated."}
{"level":"debug","name":"Bytes Sent","id":"bytes_sent","state":99104703901,"units":"B","time":"2024-04-30T08:55:26+02:00","message":"Sensor updated."}
{"level":"debug","name":"Bytes Sent Throughput","id":"bytes_sent_throughput","state":1771136,"units":"B/s","time":"2024-04-30T08:55:26+02:00","message":"Sensor updated."}
{"level":"debug","name":"CPU Usage","id":"cpu_usage","state":7.73176146370674,"units":"%","time":"2024-04-30T08:55:27+02:00","message":"Sensor updated."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Ctrl-C pressed."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Agent done."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped power state sensor."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped problems sensor."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped load average sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopping cron scheduler for script sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped CPU usage sensor."}
{"level":"error","error":"read unix @->/run/dbus/system_bus_socket: use of closed network connection","time":"2024-04-30T08:55:27+02:00","message":"Could not set up a geoclue client."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped disk IO sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped disk usage sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped memory usage sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped time sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped temp sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped network stats sensors."}
{"level":"debug","time":"2024-04-30T08:55:27+02:00","message":"Stopped users sensors."}
{"level":"debug","time":"2024-04-30T10:44:32+02:00","message":"Read sensor registry from disk."}
{"level":"debug","time":"2024-04-30T10:44:32+02:00","message":"Agent already registered."}
{"level":"debug","time":"2024-04-30T10:44:32+02:00","message":"Starting worker funcs."}
{"level":"warn","error":"The name org.freedesktop.UPower was not provided by any .service files","time":"2024-04-30T10:44:32+02:00","message":"Could not retrieve battery list."}
{"level":"warn","time":"2024-04-30T10:44:32+02:00","message":"Unable to monitor for active applications. No app tracking available."}
{"level":"debug","error":"The name org.freedesktop.NetworkManager was not provided by any .service files","time":"2024-04-30T10:44:32+02:00","message":"Unable to retrieve property
…

go-hass-agent.log

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Proxmox, Arch Linux and Arch Linux Arm
  • Version 6.8.4-2-pve, 6.8.7-arch1-1, 6.6.28-2-rpi

[BUG] Panic caused by sending on closed channel

Hi. From time to time my go-hass-agent crashes with a panic caused by sending on an already closed channel in the networkConnection.go:

panic: send on closed channel

goroutine 451368 [running]:
github.com/joshuar/go-hass-agent/internal/linux/net.(*connection).monitorAddresses.func2.1()
	/home/runner/work/go-hass-agent/go-hass-agent/internal/linux/net/networkConnection.go:171 +0x1af
created by github.com/joshuar/go-hass-agent/internal/linux/net.(*connection).monitorAddresses.func2 in goroutine 296569
	/home/runner/work/go-hass-agent/go-hass-agent/internal/linux/net/networkConnection.go:163 +0x17a
exit status 2

I can reproduce this issue by manually connecting/disconnecting to/from my WiFi. However, it does not happen every time but only at maybe every 10th attempt. Therefore I assume this might be some kind of race condition.

[BUG] Crash with script (invalid memory address or nil pointer dereference)

Go Hass Agent Version
go-hass-agent: v7.3.0

Describe the bug
If I try to include my script, go-hass-agent will not even start. It does not matter if it is written in bash or go. I get the error

10:17AM DBG Debug logging enabled.
10:17AM DBG Setting language to [de].
10:17AM DBG Agent already registered.
10:17AM DBG Listening for notifications.
10:17AM DBG Starting worker funcs.
10:17AM WRN Cannot run script error="fork/exec /home/peter/.config/com.github.joshuar.go-hass-agent/scripts/system update info.sh: exec format error" script="/home/peter/.config/com.github.joshuar.go-hass-agent/scripts/system update info.sh"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xd4e178]

goroutine 80 [running]:
github.com/joshuar/go-hass-agent/internal/scripts.(*script).Schedule(...)
        /home/joshua/git/go-hass-agent/internal/scripts/scripts.go:63
github.com/joshuar/go-hass-agent/internal/agent.runScripts({0x1161720, 0xc00036b080}, {0xc0001f5080?, 0x1d49c0001d456?}, {0x1161560, 0xc000396780}, {0x1161598, 0xc000113c20})
        /home/joshua/git/go-hass-agent/internal/agent/runners.go:90 +0x158
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2.3()
        /home/joshua/git/go-hass-agent/internal/agent/agent.go:96 +0x145
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2 in goroutine 69
        /home/joshua/git/go-hass-agent/internal/agent/agent.go:93 +0x248

To Reproduce
Steps to reproduce the behaviour:

  1. copy script in config
  2. make it executable
  3. start go-hass-agent

Expected behaviour
I would expect it to start and run the program.

Logs
go-hass-agent.log

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Arch Linux
  • Version Linux 6.8.2-arch1-1

Additional context
Here is my script in go and in bash

system update info.sh.txt
system_update_info.go.txt

[SENSOR] Add an IsDocked sensor

What are the sensors you would like to see in Go Hass Agent? What do they measure? Why are they useful? How would you use them in Home Assistant?

  • binary sensor that reports whether the machine is connected to a dock.
  • true if docked, false if not
  • useful to understand if you are mobile or not, could be used as an additional sensor for location tracking both within an area or in general, and other automations.

How do you access the sensor(s) currently?

  • Appears to be available in D-Bus. So can be an event-driven sensor.

Additional context

  • Related to #6

MQTT auto-reconnect

Hi. I sometimes experience that MQTT stops working. Unfortunately I do not have much more information apart from that messages sent to the go-hass-agent are not received anymore. In my case this sometimes happens after I wake up my computer from hibernation or after it was idling for a long period of time (some hours). When I restart the agent in such situation it immediately works again afterwards. Therefore I was wondering whether it would be possible to introduce some kind of auto-reconnect mechanism within the agent. The eclipse/paho.mqtt.golang lib which is used for the MQTT functionality offers a SetAutoReconnect() option. Do you think it would be beneficial to enabled that?

[BUG] device gets overwritten from another one (identical hardware different hostname)

Go Hass Agent Version
8.0.0

Describe the bug
I tried to set up two raspberry pi 4s. The hardware is identical only the hostname is different. But everytime I register the second raspberry pi the old one in HA gets change to the hostname of that raspberry pi I recently tried to register. They have different tokens, to be sure.

To Reproduce
Steps to reproduce the behaviour:

  1. register the first raspberry pi.
  2. register the second rasberry pi.
  3. See the name in HA change from first to second.

Expected behaviour
I would expect a different entity to appear in HA.

Logs

12:51PM DBG Debug logging enabled.
12:51PM INF Registration required. Starting registration process.
12:51PM INF Successfully registered agent.
12:51PM DBG Stopping agent.

Desktop (please complete the following information):

  • OS: Linux
  • Distribution Arch Linux Arm
  • Version 6.6.28-2-rpi

[BUG] Crash after standby

Describe the bug
After resume of standby, the program crashes with error:

...
3:59PM DBG Sensor updated. id=bytes_sent_throughput name="Bytes Sent Throughput" state="1786 B/s"
panic: runtime error: index out of range [1] with length 1

goroutine 242 [running]:
github.com/joshuar/go-hass-agent/internal/linux.BatteryUpdater.func1(0xc00031bfa8?)
	/home/runner/work/go-hass-agent/go-hass-agent/internal/linux/batterySensor.go:365 +0x50f
github.com/joshuar/go-hass-agent/pkg/dbushelpers.(*busRequest).AddWatch.func1()
	/home/runner/work/go-hass-agent/go-hass-agent/pkg/dbushelpers/dbus.go:207 +0xa2
created by github.com/joshuar/go-hass-agent/pkg/dbushelpers.(*busRequest).AddWatch
	/home/runner/work/go-hass-agent/go-hass-agent/pkg/dbushelpers/dbus.go:198 +0x151

To Reproduce

  1. start go-hass-agent --debug
  2. standby the computer
  3. resume the computer
  4. program crashes

Expected behavior
Program also resumes after standby

Logs

...
3:59PM DBG Sensor updated. id=bytes_sent_throughput name="Bytes Sent Throughput" state="1786 B/s"
panic: runtime error: index out of range [1] with length 1

goroutine 242 [running]:
github.com/joshuar/go-hass-agent/internal/linux.BatteryUpdater.func1(0xc00031bfa8?)
	/home/runner/work/go-hass-agent/go-hass-agent/internal/linux/batterySensor.go:365 +0x50f
github.com/joshuar/go-hass-agent/pkg/dbushelpers.(*busRequest).AddWatch.func1()
	/home/runner/work/go-hass-agent/go-hass-agent/pkg/dbushelpers/dbus.go:207 +0xa2
created by github.com/joshuar/go-hass-agent/pkg/dbushelpers.(*busRequest).AddWatch
	/home/runner/work/go-hass-agent/go-hass-agent/pkg/dbushelpers/dbus.go:198 +0x151

Desktop:

  • Ubuntu 23.10.1
  • Dell Latitude 5511
  • go-hass-agent v5.3.1

Add Suspend to MQTT

Describe the solution you'd like
I think being able to Suspend/Standby via MQTT would be great.

As a side note, I think it should be configurable if you want to be able to unlock a session via mqtt.

Websocket connection does not work with letsencrypt

          Hi @joshuar,

Sorry for the delay. I tried the snapshot you gave me and, indeed, it seems to work well.

However, I still have an error :

Could not connect to websocket. error="tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config"

It does not seems to prevent it from working.

The hass.websocketurl and WebSocketURL looks like this :

wss://HOST:PORT/api/websocket

My certificate is generated with letsencrypt and is currently valid.

Let me know if you want me to create a new issue about that.

Thanks !

Originally posted by @CaporalDead in #47 (comment)

[FEATURE REQUEST] Audio control

Describe the solution you'd like
The ability to control the volume of the current/default audio device. Volume up/down and toggle mute.

Describe alternatives you've considered
No other alternatives AFAIK.

Additional context
Unsure where to source these controls on Linux at least. Likely will need to resort to command-line utilities.

[FEATURE REQUEST] Opt-Out of Sensors and Agent Side Command Definitions

Hey there!

  1. Would it be a lot of effort to make the built-in sensors configurable, so that I may turn off everything I don't need? That would lower power consumption and save resources.

  2. I tried adding turn screen off and on with dpms without locking the screen for my info panel and this was quite complicated as I had to write a python script that registers a new dbus service in order to use the arbitrary dbus PR that was merged recently. Of course I had to configure two buttons in the scripts configuration of hass in order to publish the according mqtt messages.
    Wouldn't it be nice to parse a commands.toml on the agent side where we can define commands and on launch the agent will register e.g. buttons or switches with ways to execute commands for each state of the switch. This could be enhanced with "query state" so that we could e.g. read if the monitor is really turned of or on.

I could fiddle with the code a bit but I'm more the offensive person who searches for vulns in apps. 😂 What do you think of the ideas?

[BUG] panic: runtime error: invalid memory address or nil pointer dereference (on LXC Desktop)

Go Hass Agent Version
Go Hass Agent: v9.2.0

Describe the bug
Upon running go-hass-agent i get this output:

system@desktop2:~$ go-hass-agent run
11:21AM WRN Could not retrieve battery list. Cannot find any existing batteries. error="SystemBus: unable to get data org.freedesktop.UPower.EnumerateDevices from org.freedesktop.UPower: The name org.freedesktop.UPower was not provided by any .service files"
11:21AM WRN Sensor not found in registry. id=agent_version
11:21AM WRN Sensor not found in registry. id=agent_version
11:21AM WRN Sensor not found in registry. id=mountpoint_root
11:21AM WRN Sensor not found in registry. id=mountpoint_root
11:21AM WRN Sensor not found in registry. id=nvme0n1_disk_reads
11:21AM WRN Sensor not found in registry. id=nvme0n1_disk_reads
11:21AM WRN Sensor not found in registry. id=nvme0n1_disk_read_rate
11:21AM WRN Sensor not found in registry. id=nvme0n1_disk_read_rate
11:21AM WRN Sensor not found in registry. id=kernel_version
11:21AM WRN Sensor not found in registry. id=kernel_version
11:21AM WRN Sensor not found in registry. id=cpu_load_average_(15_min)
11:21AM WRN Sensor not found in registry. id=cpu_load_average_(15_min)
11:21AM WRN Sensor not found in registry. id=bytes_sent_throughput
11:21AM WRN Sensor not found in registry. id=bytes_sent_throughput
11:21AM WRN Sensor not found in registry. id=power_state
11:21AM WRN Sensor not found in registry. id=power_state
11:21AM WRN Sensor not found in registry. id=idle
11:21AM WRN Sensor not found in registry. id=idle
11:21AM WRN Sensor not found in registry. id=last_reboot
11:21AM WRN Sensor not found in registry. id=last_reboot
11:21AM WRN Sensor not found in registry. id=current_users
11:21AM WRN Sensor not found in registry. id=current_users
11:21AM WRN Sensor not found in registry. id=uptime
11:21AM WRN Sensor not found in registry. id=uptime
11:21AM WRN Sensor not found in registry. id=lo_connection_state
11:21AM WRN Sensor not found in registry. id=lo_connection_state
11:21AM WRN Sensor not found in registry. id=bytes_sent
11:21AM WRN Sensor not found in registry. id=bytes_sent
11:21AM WRN Sensor not found in registry. id=cpu_load_average_(1_min)
11:21AM WRN Sensor not found in registry. id=cpu_load_average_(1_min)
11:21AM WRN Sensor not found in registry. id=distribution_name
11:21AM WRN Sensor not found in registry. id=distribution_name
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xd487ae]

goroutine 39 [running]:
github.com/joshuar/go-hass-agent/pkg/linux/hwmon.GetAllSensors()
        /home/runner/work/go-hass-agent/go-hass-agent/pkg/linux/hwmon/hwmon.go:394 +0xae
github.com/joshuar/go-hass-agent/internal/linux/system.HWSensorUpdater.func1(0xc000408400?)
        /home/runner/work/go-hass-agent/go-hass-agent/internal/linux/system/hwmon.go:99 +0x25
github.com/joshuar/go-hass-agent/internal/device/helpers.PollSensors.func1()
        /home/runner/work/go-hass-agent/go-hass-agent/internal/device/helpers/polling.go:27 +0x6f
created by github.com/joshuar/go-hass-agent/internal/device/helpers.PollSensors in goroutine 245
        /home/runner/work/go-hass-agent/go-hass-agent/internal/device/helpers/polling.go:25 +0x125

Expected behaviour
I understand the error about not able to find Upower. This as i'm using a virtualized environment. I uninstalled all power-saving stuff (such as upower). Otherwise the environment would controll the whole machine/host.

Desktop (please complete the following information):

  • OS: Linux
  • Distribution: LXC virtualized Debian 12 + Plasma desktop
  • Version: 12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.