Tiko Integration (France | Heating)

There is a new service in France, to control electric heaters, the hardware installation is done by a professional for a fixed price of 9€

https://tiko.fr/

I decided to go with that solution for the flat I rent, and I started to analyse their API (I don’t know if local management is possible)

I would like to know if there is devs who might be interested to bring this integration to HA

Hi @BenoitAnastay, I might be interested to join in!
where did you find API documentation?

There is no published documentation, neither they replied when I asked for it, but they made an Android App that may be used to reverse engine the API

1 Like

Hello, I finally found some time to work on this package, which is available here: GitHub - noiwid/tiko_heating_api: Component allowing to manage traditional radiators connected via the TIKO solution from within Home Assistant server. It requires hosting a web page that will serve as an endpoint to communicate with TIKO through their API.

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.

If you have any questions, don’t hesitate to ask!

Preview of the lovelace integration:

1 Like

Hello

Thanks for the work on the project !

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?

My suggestion would be to write an integration based on the reversed API to avoid unnecessary load on your ha instance

But you also might try to put this PHP code into an add-on, basically it’s just a Docker image, you can easily find dickerfiles for nginx+PHP exemple

Thanks for the suggestion, but even after googling, it’s not very clear for me how I could do it.

How can add this PHP code into an add-on, and which one.
If you could point me to starting point, would be great.

Later edit: following a full day of trying to learn how to properly create an addon with correct configuration for nginx and PHP, I used in the end the Apache custom addon hassio-addons/apache2 at master · FaserF/hassio-addons · GitHub

Hi!

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. :wink:

3 Likes

Well done, since I can no longer work on this project, I marked your post as solution

1 Like

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.

Hi

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"
    }```

Hey @asterixmic,

The latest version fixes all the issues related to authentication. :wink:

1 Like

Thank you @marvinroger !
I was actually part of the discussions on GitHub and already knew

I just released a native component to support Tiko heaters, if you are interested, you can check it here : GitHub - Maxou44/ha-tiko-component: Tiko integration for Home Assistant

The fact that it’s developed directly in Python, I hope, will allow it to be integrated directly into Home Assistant in the future :slight_smile:

2 Likes

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 ?