I have enhanced the script, which now has an installer that generates the complete package for Home Assistant.
You need to install this PHP script on a URL, and then access it:
Step 1 / The script asks for the TIKO APP login/password credentials, and creates a tiko.env file with the variables + URL & Token of the endpoint.
Step 2 / The user is redirected to the setup page of the script, which provides the complete code of the tiko.yaml package, as well as the Lovelace cards to install, with all detailed instructions.
Note that this script must remain hosted so that the link between Home Assistant and the TIKO API remains effective. This script serves as a gateway between the two.
What would be the easiest (but also secure) way to host the php application?
My understanding is that it will also hold the credentials to the tiko account, right?
I just released an add-on for tiko / Mon Pilotage Elec:
I tried to make it as easy to possible to get started, you only need to have the Mosquitto add-on installed, the MQTT integration setup and to input your email and password in the configuration and everything should be plug and play.
Thanks for this. Looks great and I really like the fact that I can control the preset mode individually for each room, which is not even possible with the Tiko app. Interestingly enough, when a room preset is applied, it shows correctly in the Tiko app.
Starting last week I get an incorrect password in the logs and the integration no longer functions. The Tiko app works fine and I also changed the password just in case. Did Tiko modify anything or they blocked 3rd party access?
Here is the log
[14:30:38] INFO: Running in Home Assistant mode
[14:30:39] INFO: MQTT_BROKER_URL not set, using MQTT addon service...
[14:30:41.250] ERROR (7): Failed to fetch data from Tiko; are the credentials correct?
err: {
"type": "ZodError",
"message": "[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"object\",\n \"received\": \"null\",\n \"path\": [\n \"data\",\n \"logIn\"\n ],\n \"message\": \"Expected object, received null\"\n }\n]",
"stack":
ZodError: [
{
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
"data",
"logIn"
],
"message": "Expected object, received null"
}
]
at get error [as error] (file:///app/node_modules/zod/lib/index.mjs:538:31)
at doTikoRequest (file:///app/dist/tiko/client.js:147:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async TikoClient.getToken (file:///app/dist/tiko/client.js:20:28)
at async TikoClient.fetchData (file:///app/dist/tiko/client.js:35:29)
at async file:///app/dist/index.js:16:27
"aggregateErrors": [
{
"type": "Object",
"message": "Expected object, received null",
"stack":
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
"data",
"logIn"
]
}
],
"issues": [
{
"code": "invalid_type",
"expected": "object",
"received": "null",
"path": [
"data",
"logIn"
],
"message": "Expected object, received null"
}
],
"name": "ZodError"
}```
Thanks a lot for the solution. That will help a lot.
On the thermostat entity, can you program the temperature by time slot like it is possible on the Tiko app ?