Config file(s) seems to be completely disregarded #32

Closed
opened 2022-11-06 18:36:52 +00:00 by Hunman · 4 comments
Contributor

(originally wrote on the aur)

Config seems to be completely disregarded, even after restarting the daemon.

Despite having on.reconnect.notify set to false, it still sends notifications on each reconnect, and transliteration is not working either.

The file is located at ~/.config/itd/itd.toml (it got moved from ~/.config/itd.toml).

Tried the following versions out and the problem was present:

  • itd-git 0.0.7
  • itd-git 0.0.8
  • itd-bin 0.0.8
  • itd-bin 0.0.9

The complete contents of the file:

[on.reconnect]
    notify = false
    setTime = true

[notifs.translit]
    use = ["eASCII", "Emoji"]
    custom = [
        "á", "a", "Á", "A",
        "é", "e", "É", "E",
        "í', 'i", "Í", "I",
        "ó', 'o', "Ó", "O",
        'ö', 'o', "Ö", "O",
        'ő', 'o', "Ő", "O",
        'ú', 'u', "Ú", "U",
        'ü', 'u', "Ü", "U",
        'ű', 'u', "Ű", "U"
    ]

[weather]
    enabled = false
(originally wrote on the aur) Config seems to be completely disregarded, even after restarting the daemon. Despite having `on.reconnect.notify` set to `false`, it still sends notifications on each reconnect, and transliteration is not working either. The file is located at `~/.config/itd/itd.toml` (it got moved from `~/.config/itd.toml`). Tried the following versions out and the problem was present: * itd-git 0.0.7 * itd-git 0.0.8 * itd-bin 0.0.8 * itd-bin 0.0.9 The complete contents of the file: ```toml [on.reconnect] notify = false setTime = true [notifs.translit] use = ["eASCII", "Emoji"] custom = [ "á", "a", "Á", "A", "é", "e", "É", "E", "í', 'i", "Í", "I", "ó', 'o', "Ó", "O", 'ö', 'o', "Ö", "O", 'ő', 'o', "Ő", "O", 'ú', 'u', "Ú", "U", 'ü', 'u', "Ü", "U", 'ű', 'u', "Ű", "U" ] [weather] enabled = false ```
Owner

Both of the configs are working for me. I get no notifications on reconnect and the transliteration is working as expected. I'm not sure what's causing this on your computer.

Both of the configs are working for me. I get no notifications on reconnect and the transliteration is working as expected. I'm not sure what's causing this on your computer.
Author
Contributor

I've cloned itd-git from the AUR (at #248beffa2f29741093feee220c6d745cb3bfab3a, the latest commit at the time of writing this) and managed to place some debug printing into the code (I've never worked with Go before)

image

And then ran ./itd (so I won't have debug things in system-wide installation).
Here is the output with the default /etc/itd.toml, the ~/.config/itd/itd.toml is the one I've sent before

12:19PM DBG Before loading default config
12:19PM DBG 
12:19PM DBG Loading default config
12:19PM DBG bluetooth.adapter -> hci0
conn.reconnect -> true
conn.whitelist.devices -> []
conn.whitelist.enabled -> false
music.vol.interval -> 5
notifs.ignore.body -> []
notifs.ignore.sender -> []
notifs.ignore.summary -> [InfiniTime]
notifs.translit.custom -> []
notifs.translit.use -> [eASCII]
on.connect.notify -> true
on.reconnect.notify -> true
on.reconnect.setTime -> true
socket.path -> /tmp/itd/socket

12:19PM DBG Reading: /etc/itd.toml
12:19PM DBG bluetooth.adapter -> hci0
conn.reconnect -> true
conn.whitelist.devices -> []
conn.whitelist.enabled -> false
logging.level -> info
metrics.battLevel.enabled -> true
metrics.enabled -> false
metrics.heartRate.enabled -> true
metrics.motion.enabled -> false
metrics.stepCount.enabled -> true
music.vol.interval -> 5
notifs.ignore.body -> []
notifs.ignore.sender -> []
notifs.ignore.summary -> [InfiniTime]
notifs.translit.custom -> []
notifs.translit.use -> [eASCII Russian Emoji]
on.connect.notify -> true
on.reconnect.notify -> true
on.reconnect.setTime -> true
socket.path -> /tmp/itd/socket
weather.enabled -> true
weather.location -> Los Angeles, CA

12:19PM DBG Reading: /home/alarm/.config/itd/itd.toml
12:19PM DBG bluetooth.adapter -> hci0
conn.reconnect -> true
conn.whitelist.devices -> []
conn.whitelist.enabled -> false
logging.level -> info
metrics.battLevel.enabled -> true
metrics.enabled -> false
metrics.heartRate.enabled -> true
metrics.motion.enabled -> false
metrics.stepCount.enabled -> true
music.vol.interval -> 5
notifs.ignore.body -> []
notifs.ignore.sender -> []
notifs.ignore.summary -> [InfiniTime]
notifs.translit.custom -> []
notifs.translit.use -> [eASCII Russian Emoji]
on.connect.notify -> true
on.reconnect.notify -> true
on.reconnect.setTime -> true
socket.path -> /tmp/itd/socket
weather.enabled -> true
weather.location -> Los Angeles, CA

12:19PM INF Connected to InfiniTime version=1.11.0
...

When I replace /etc/itd.toml with ~/.config/itd/itd.toml, the output is the following:

12:23PM DBG Before loading default config
12:23PM DBG 
12:23PM DBG Loading default config
12:23PM DBG bluetooth.adapter -> hci0
conn.reconnect -> true
conn.whitelist.devices -> []
conn.whitelist.enabled -> false
music.vol.interval -> 5
notifs.ignore.body -> []
notifs.ignore.sender -> []
notifs.ignore.summary -> [InfiniTime]
notifs.translit.custom -> []
notifs.translit.use -> [eASCII]
on.connect.notify -> true
on.reconnect.notify -> true
on.reconnect.setTime -> true
socket.path -> /tmp/itd/socket

12:23PM DBG Reading: /etc/itd.toml
12:23PM DBG bluetooth.adapter -> hci0
conn.reconnect -> true
conn.whitelist.devices -> []
conn.whitelist.enabled -> false
music.vol.interval -> 5
notifs.ignore.body -> []
notifs.ignore.sender -> []
notifs.ignore.summary -> [InfiniTime]
notifs.translit.custom -> []
notifs.translit.use -> [eASCII]
on.connect.notify -> true
on.reconnect.notify -> true
on.reconnect.setTime -> true
socket.path -> /tmp/itd/socket

12:23PM DBG Reading: /home/alarm/.config/itd/itd.toml
12:23PM DBG bluetooth.adapter -> hci0
conn.reconnect -> true
conn.whitelist.devices -> []
conn.whitelist.enabled -> false
music.vol.interval -> 5
notifs.ignore.body -> []
notifs.ignore.sender -> []
notifs.ignore.summary -> [InfiniTime]
notifs.translit.custom -> []
notifs.translit.use -> [eASCII]
on.connect.notify -> true
on.reconnect.notify -> true
on.reconnect.setTime -> true
socket.path -> /tmp/itd/socket

12:23PM INF Connected to InfiniTime version=1.11.0
...

File permissions are the same (the one with the tilde at the end was the original)

-rw-r--r-- 1 root root 424 dec   21 12.23 /etc/itd.toml
-rw-r--r-- 1 root root 778 dec   21 11.17 /etc/itd.toml

Hope it helps or gives you new ideas what else I could try.

I've cloned itd-git from the AUR (at #248beffa2f29741093feee220c6d745cb3bfab3a, the latest commit at the time of writing this) and managed to place some debug printing into the code (I've never worked with Go before) ![image](/attachments/952f5cbe-2295-49f2-8848-50baa74a9fee) And then ran `./itd` (so I won't have debug things in system-wide installation). Here is the output with the **default** `/etc/itd.toml`, the `~/.config/itd/itd.toml` is the one I've sent before ``` 12:19PM DBG Before loading default config 12:19PM DBG 12:19PM DBG Loading default config 12:19PM DBG bluetooth.adapter -> hci0 conn.reconnect -> true conn.whitelist.devices -> [] conn.whitelist.enabled -> false music.vol.interval -> 5 notifs.ignore.body -> [] notifs.ignore.sender -> [] notifs.ignore.summary -> [InfiniTime] notifs.translit.custom -> [] notifs.translit.use -> [eASCII] on.connect.notify -> true on.reconnect.notify -> true on.reconnect.setTime -> true socket.path -> /tmp/itd/socket 12:19PM DBG Reading: /etc/itd.toml 12:19PM DBG bluetooth.adapter -> hci0 conn.reconnect -> true conn.whitelist.devices -> [] conn.whitelist.enabled -> false logging.level -> info metrics.battLevel.enabled -> true metrics.enabled -> false metrics.heartRate.enabled -> true metrics.motion.enabled -> false metrics.stepCount.enabled -> true music.vol.interval -> 5 notifs.ignore.body -> [] notifs.ignore.sender -> [] notifs.ignore.summary -> [InfiniTime] notifs.translit.custom -> [] notifs.translit.use -> [eASCII Russian Emoji] on.connect.notify -> true on.reconnect.notify -> true on.reconnect.setTime -> true socket.path -> /tmp/itd/socket weather.enabled -> true weather.location -> Los Angeles, CA 12:19PM DBG Reading: /home/alarm/.config/itd/itd.toml 12:19PM DBG bluetooth.adapter -> hci0 conn.reconnect -> true conn.whitelist.devices -> [] conn.whitelist.enabled -> false logging.level -> info metrics.battLevel.enabled -> true metrics.enabled -> false metrics.heartRate.enabled -> true metrics.motion.enabled -> false metrics.stepCount.enabled -> true music.vol.interval -> 5 notifs.ignore.body -> [] notifs.ignore.sender -> [] notifs.ignore.summary -> [InfiniTime] notifs.translit.custom -> [] notifs.translit.use -> [eASCII Russian Emoji] on.connect.notify -> true on.reconnect.notify -> true on.reconnect.setTime -> true socket.path -> /tmp/itd/socket weather.enabled -> true weather.location -> Los Angeles, CA 12:19PM INF Connected to InfiniTime version=1.11.0 ... ``` When I replace `/etc/itd.toml` with `~/.config/itd/itd.toml`, the output is the following: ``` 12:23PM DBG Before loading default config 12:23PM DBG 12:23PM DBG Loading default config 12:23PM DBG bluetooth.adapter -> hci0 conn.reconnect -> true conn.whitelist.devices -> [] conn.whitelist.enabled -> false music.vol.interval -> 5 notifs.ignore.body -> [] notifs.ignore.sender -> [] notifs.ignore.summary -> [InfiniTime] notifs.translit.custom -> [] notifs.translit.use -> [eASCII] on.connect.notify -> true on.reconnect.notify -> true on.reconnect.setTime -> true socket.path -> /tmp/itd/socket 12:23PM DBG Reading: /etc/itd.toml 12:23PM DBG bluetooth.adapter -> hci0 conn.reconnect -> true conn.whitelist.devices -> [] conn.whitelist.enabled -> false music.vol.interval -> 5 notifs.ignore.body -> [] notifs.ignore.sender -> [] notifs.ignore.summary -> [InfiniTime] notifs.translit.custom -> [] notifs.translit.use -> [eASCII] on.connect.notify -> true on.reconnect.notify -> true on.reconnect.setTime -> true socket.path -> /tmp/itd/socket 12:23PM DBG Reading: /home/alarm/.config/itd/itd.toml 12:23PM DBG bluetooth.adapter -> hci0 conn.reconnect -> true conn.whitelist.devices -> [] conn.whitelist.enabled -> false music.vol.interval -> 5 notifs.ignore.body -> [] notifs.ignore.sender -> [] notifs.ignore.summary -> [InfiniTime] notifs.translit.custom -> [] notifs.translit.use -> [eASCII] on.connect.notify -> true on.reconnect.notify -> true on.reconnect.setTime -> true socket.path -> /tmp/itd/socket 12:23PM INF Connected to InfiniTime version=1.11.0 ... ``` File permissions are the same (the one with the tilde at the end was the original) ``` -rw-r--r-- 1 root root 424 dec 21 12.23 /etc/itd.toml -rw-r--r-- 1 root root 778 dec 21 11.17 /etc/itd.toml ``` Hope it helps or gives you new ideas what else I could try.
Author
Contributor

Update:

I noticed I had ' at some letters at the config and " at some, after I ran my custom config through a toml validator.

My toml was not valid, and

Update: I noticed I had `'` at some letters at the config and `"` at some, after I ran my custom config through a toml validator. My toml was not valid, and
Author
Contributor

The toml file was invalid, see pull request 47 right above this comment

The toml file was invalid, see pull request 47 right above this comment
Sign in to join this conversation.
No description provided.