Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documention and reality are not matching? #296

Open
Pewibe opened this issue Sep 28, 2024 · 11 comments
Open

Documention and reality are not matching? #296

Pewibe opened this issue Sep 28, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@Pewibe
Copy link

Pewibe commented Sep 28, 2024

In Wiki - View mode customization - Windows the file tdm.cfg location is noticed as C:\Users<username>\TDM\tdm.cfg.
Once running tdmgr_2024.9.3.3_win_64bit.exe I discovered the location C:\Users<username>\AppData\Roaming\tdm\tdm.ini for the ini-file.

Additional problem: I added a view X in front of the actual views (before Home). Starting TDM once again it highlights the view X but shows columns of view Home. Clicking to view mode Home and back X the correct columns are shown. Start-up problem?

@jziolkowski
Copy link
Owner

Yes, you're correct. I forgot to update docs regarding now location of tdm.ini.

As for the new view being default: seems like a bug indeed. I'll have a look.

Thx for feedback.

@jziolkowski jziolkowski added the bug Something isn't working label Sep 28, 2024
@Pewibe
Copy link
Author

Pewibe commented Sep 28, 2024

If you update the wiki maybe you can add a sentence about meaning of section [BSSId]. The repeating of Views is confusing a little bit. Something like "don't touch this section" would help.

@jziolkowski
Copy link
Owner

WDYM repeating of views?

Also no need for "don't touch this", nothing important relies on what you have in views. It only displays data, internal logic happens irrelevant from that.

@Pewibe
Copy link
Author

Pewibe commented Sep 28, 2024

To explain "repeating of views" I shorten the tdm.ini to these lines:
[General]
[BSSId]
BSSId\Views\Home="..."
Views\Home="..."
[Views]
Home="..."
You recognize that the view name "Home" appears 3 times. But anyhow, I understood that the section [BSSId] can be ignored. So my request for the wiki is only: Write "section [BSSId] is for internal purposes and can be ignored by the user".

@jziolkowski
Copy link
Owner

that looks broken.

please copy paste me your entire tdm.ini file

@Pewibe
Copy link
Author

Pewibe commented Sep 28, 2024

[General]
version=
window_geometry=@bytearray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\t\xc7\0\0\0j\0\0\xe\xc8\0\0\x3\xe4\0\0\t\xc8\0\0\0\x89\0\0\xe\xc7\0\0\x3\xe3\0\0\0\x1\0\0\0\0\a\x80\0\0\t\xc8\0\0\0\x89\0\0\xe\xc7\0\0\x3\xe3)
views_order="Home;Compact;Health;Firmware;Wifi;MQTT"
hostname=vServer
port=1883
username=
password=
connect_on_startup=true
client_id=tdm-3O9AA6
tls=false
tls_file=/etc/opentls/certs/ca.crt
tls_insecure=false
tls_version=@variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0'\x80\x4\x95\x1c\0\0\0\0\0\0\0\x8c\x3ssl\x94\x8c\x10PROTOCOL_TLSv1_2\x94\x93\x94.)

[BSSId]
hostname=vServer
port=1883
username=
password=
connect_on_startup=true
client_id=tdm-SCWQF5
tls=false
tls_file=/etc/opentls/certs/ca.crt
tls_insecure=false
tls_version=@variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0'\x80\x4\x95\x1c\0\0\0\0\0\0\0\x8c\x3ssl\x94\x8c\x10PROTOCOL_TLSv1_2\x94\x93\x94.)
BSSId\version=
BSSId\window_geometry=@bytearray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0~\0\0\0)\0\0\x5\xb0\0\0\x3\x95\0\0\0\x7f\0\0\0H\0\0\x5\xaf\0\0\x3\x94\0\0\0\0\0\0\0\0\a\x80\0\0\0\x7f\0\0\0H\0\0\x5\xaf\0\0\x3\x94)
BSSId\views_order="Home;Compact;Health;Firmware;Wifi;MQTT"
BSSId\Views\Compact="Module;LoadAvg;LinkCount;Uptime"
BSSId\Views\Home="Module;RSSI;IPAddress;Channel;Uptime;MqttCount;StatTopic;Version;ProgramSize;Free"
BSSId\Views\Health="Uptime;BootCount;RestartReason;LoadAvg;Sleep;MqttCount;LinkCount;Downtime;RSSI"
BSSId\Views\Firmware="Version;Core;SDK;ProgramSize;Free;OtaUrl"
BSSId\Views\Wifi="Hostname;Mac;IPAddress;Gateway;SSId;BSSId;Channel;RSSI;LinkCount;Downtime"
BSSId\Views\MQTT="Topic;FullTopic;CommandTopic;StatTopic;TeleTopic;FallbackTopic;GroupTopic"
version=
window_geometry=@bytearray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\a\xe0\0\0\0(\0\0\f\xe1\0\0\x3\xa2\0\0\a\xe1\0\0\0G\0\0\f\xe0\0\0\x3\xa1\0\0\0\x1\0\0\0\0\a\x80\0\0\a\xe1\0\0\0G\0\0\f\xe0\0\0\x3\xa1)
views_order="Compact;Home;Health;Firmware;Wifi;MQTT"
Views\Compact="Module;RSSI;IPAddress;Channel;Uptime;MqttCount;StatTopic;Version;ProgramSize;Free"
Views\Home="Module;LoadAvg;LinkCount;Uptime"
Views\Health="Uptime;BootCount;RestartReason;LoadAvg;Sleep;MqttCount;LinkCount;Downtime;RSSI"
Views\Firmware="Version;Core;SDK;ProgramSize;Free;OtaUrl"
Views\Wifi="Hostname;Mac;IPAddress;Gateway;SSId;BSSId;Channel;RSSI;LinkCount;Downtime"
Views\MQTT="Topic;FullTopic;CommandTopic;StatTopic;TeleTopic;FallbackTopic;GroupTopic"

[Views]
Home="Module;RSSI;IPAddress;Channel;Uptime;MqttCount;StatTopic;Version;ProgramSize;Free"
Compact="Module;LoadAvg;LinkCount;Uptime"
Health="Uptime;BootCount;RestartReason;LoadAvg;Sleep;MqttCount;LinkCount;Downtime;RSSI"
Firmware="Version;Core;SDK;ProgramSize;Free;OtaUrl"
Wifi="Hostname;Mac;IPAddress;Gateway;SSId;BSSId;Channel;RSSI;LinkCount;Downtime"
MQTT="Topic;FullTopic;CommandTopic;StatTopic;TeleTopic;FallbackTopic;GroupTopic"

@jziolkowski
Copy link
Owner

yep, that's a mess. My recommendation is to delete the entire file, TDM will recreate it. Setup the broker again.

@Pewibe
Copy link
Author

Pewibe commented Sep 28, 2024

OK done. Now I have only the 2 sections [General] and [Views]. Sorry for confusing you. Maybe showing the virgin content of tdm.ini in wiki will help to recognize such a mess for all simple users like me. Thanks and keep fun for your great work :-)

@jziolkowski
Copy link
Owner

I think this mangled file is a result of a bug I had sometime in config saving logic.

As for the example contents: the file syntax will be changing soon anyway, because I will be adding multi-broker support anyway. I'll make an updated wiki entry when it's done.

Is the issue with your custom view/columns still valid?

@Pewibe
Copy link
Author

Pewibe commented Sep 28, 2024

To answer your last question: Yes, TDM starts always by highlighting first view (my custom X) but shows content of view Home. Clicking first to any view and second to X view everything is good.

I did some testing back and forth and got struggled until TDM was not able to start. I think deleting tdm.ini is not enough - I deleted the whole created directory and started over again which works. Meantime the tdm.ini is quite similar to my initial one again, where you said "messed up". I cannot decide by my own how it looks correct. And as you said you will change it soon, it looks like a dead horse :-)

Just my 2 cents: The tdm.ini file is NOT an .ini file, it is a .cfg file because it is not only read for initialisation, it's also written for changing configuration. This leads to confusion again. Has the TDM written a correct config or is it a mess?

And last: In absence of explaining BSSId aliases editor I discovered this nice help for deciding between my 3 access points. But starting TDM again it shows NOT the aliases. You first have to start the editor again to show the aliases. Not a bug but not nice. If you open again the alises editor and close by "cancel", the aliases are deleted in the aliases table, but for sake not in the tdm.ini. This lokks like a bug.

@jziolkowski
Copy link
Owner

It seems that indeed it defaults to the home view, directly by its contents and not selection. I'll update it to correctly start with whatever the first defined view is.

I will have a look again about that malformed file. I've been testing TDM a lot recently and I didn't notice this bug appearing. I'll try to manually edit the views, maybe that triggers something.

And yes, BSSId is for multi-AP networks. Good you figured it out. The inconsistency with its behavior is definitely related to the mess with the ini file. Another bug to fix.

As for ini/cfg - this is a nomenclature I'm borrowing from QT, which defaults to ini extenstion. But like I said, it will be replaced with a different solution soon. I want to minimize the need of manually tinkering with that file anyway, by including view editor in app itself, but that's on the drawing board. I'll let you know when new release drops with your fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants