Alwinator / aw-watcher-utilization

An Activity Watch watcher that monitors CPU, RAM, disk, network, and sensor usage.
Mozilla Public License 2.0
60 stars 2 forks source link

Static content: index.html of watcher: aw-watcher-utilization not found! #8

Closed erngab closed 1 year ago

erngab commented 1 year ago

Windows 10

  1. Unzip as aw-watcher-utilization folder.
  2. Move the folder to "C:\Program Files (x86)\ActivityWatch" directory.
  3. I go to the "C:\Users\ernga\AppData\Local\activitywatch\activitywatch\aw-qt" directory.
  4. To aw-qt.toml file I add the aw-watcher-utilization.
[aw-qt]
autostart_modules = ["aw-server", "aw-watcher-afk", "aw-watcher-window", "aw-watcher-utilization"]

[aw-qt-testing]
autostart_modules = ["aw-server", "aw-watcher-afk", "aw-watcher-window", "aw-watcher-utilization"]

In ActivityWatch I add Custom Visualization Watcher name: aw-watcher-utilization Visualisation title: Utilization

It doesn't start, text appears in its place: Static content: index.html of watcher: aw-watcher-utilization not found!

Log file in aw-watcher-utilization folder:

2023-01-02 13:37:01 [INFO ]: aw-watcher-utilization started  (aw_watcher_utilization.watcher:26)
2023-01-02 13:37:02 [INFO ]: Connection to aw-server established by aw-watcher-utilization  (aw_client.client:419)
MarshMello0 commented 1 year ago

I'm currently struggling with this as well. Did you happen to find a way to set it up @erngab?

erngab commented 1 year ago

I haven't found a solution.

Alwinator commented 1 year ago

@erngab @MarshMello0 The static content of aw-watcher-utilization will probably not work with the current version because it was my PoC implementation of how the "custom-visualization" feature could look like. Afterward, the ActivityWatch team changed some things before merging it.

See the feature request: https://github.com/ActivityWatch/activitywatch/issues/453 And the pull request: https://github.com/ActivityWatch/aw-server/pull/83

To summarize: Instead of having a URL/GET Variable that includes the data, you need to use the Activity Watch Client and only get the timespan from the URL parameters.

Unfortunately, I had no time to implement the new version for aw-watcher-utilization, however, that would be a nice and simple pull request, if you have time. :) I would love to merge it!

You can find a working example of a custom visualization here (PR of visualization: https://github.com/ActivityWatch/aw-watcher-input/pull/12)

BLACK4585 commented 1 year ago

Is there a chance this gets implemented sometime?

Alwinator commented 1 year ago

@BLACK4585 I will try to find time in the next few days.

Alwinator commented 1 year ago

@erngab @MarshMello0 @BLACK4585

Good news!

I've successfully implemented visualizations for aw-watcher-utilization. (https://github.com/Alwinator/aw-watcher-utilization/commit/b6449bd26b9a22ed5fd79db98ba4c8307934fc3a)

You can now follow my guide on how to set them up for you. Make sure you have the new v1.2.0 version installed.

Unfortunately, for now, there is only the cpu_percent visualization because I cannot add more before this PR is merged: https://github.com/ActivityWatch/aw-webui/pull/475

@ErikBjare Feel free to use my watcher as an example. I tried to keep the visualization as simple as possible by only using plain HTML. (Instead of setting up a whole project with Vue or Webpack)

img

ErikBjare commented 1 year ago

@Alwinator Excellent work! I decided to mention it in the docs: https://github.com/ActivityWatch/docs/commit/369bcb8d51f09530f48010f420da34ba2d0cbd64

Alwinator commented 1 year ago

@ErikBjare That's a great idea, thanks! :)