Luc-S / Toon-HASS

HomeAssistant integration with Toon thermostat.
20 stars 12 forks source link

No token found #21

Open pmaal2 opened 4 years ago

pmaal2 commented 4 years ago

Hi,

The app seems not to open the token file or to make a empty one. (if I understand the code correctly) If I place a token.txt file with the token in /qmf/qml/apps/homeassistant-1.0.8 It say's it is empty. I enabled the debug messages and I get:

Please verify token.txt. Error: No token found

    if (!homeAssistantLegacy) {
        try {
            homeAssistantToken = tokenFile.read().trim();
            if (homeAssistantToken.length == 0) {
                throw "Error: No token found";
            }
        }
        catch (err) {
            var doc1 = new XMLHttpRequest();
            doc1.open("PUT", "file:///HCBv2/qml/apps/homeassistant/token.txt");
            doc1.send('');
            logText("Please verify token.txt. " + err);
        }
pmaal2 commented 4 years ago

Nevermind;

i installed it though the toon store, but it seem that code is different then your git. Found the file @ /mnt/data/tsc