Giter VIP home page Giter VIP logo

Comments (3)

Lngramos avatar Lngramos commented on September 26, 2024 1

Thanks for lightning fast response, @duggan! 😃

The API response I'm getting only shows the Smartbox device, not the individual heaters. Our setups are certainly different, as you predicted.

Here's the snippet from my API response for reference:

[
    {
        "id": "cafeXXXXX",
        "name": "Home",
        "devs": [
            {
                "dev_id": "e698XXXXX",
                "name": "Smartbox",
                "product_id": "0106",
                "fw_version": "1.33.3",
                "serial_id": "12"
            }
        ],
        "owner": true
    }
]

The /api/v2/grouped_devs API isn't listing the heaters that are peered to my smartbox hub. I'll poke around their app a bit to understand how the "sub-devices" can be individually identified and controlled. I'm guessing that the product_id might be key to how the client behaves to different device types.

Thanks for putting me in the right direction! I'll come back with what I find and hopefully land a PR to add support for the DSM hubs (a.k.a. smartboxes)

from homebridge-technotherm.

duggan avatar duggan commented on September 26, 2024

Hey @Lngramos, I hope you can get it working for you!

I had my own set of these radiators installed a couple of months ago, and was told a couple of weeks before install that I'd be getting a more recent set that didn't require the smartbox, so that might be where the discrepancy is coming in.

If you enable debug mode you may be able to get enough information out of the logs to match up where my code is making assumptions about the API structure that aren't true for your own setup.

Just from what I remember of poking around with the API results, it may be that your results returned from getGroupedDevices are slightly different from mine.

If it helps, this is an example of the data I receive for groupedDevices:

[
  {
    "id": "f796dce0bc57XXXXXXXXXXXX",
    "name": "Home",
    "devs": [
      {
        "dev_id": "38a7f960XXXXXXX",
        "name": "Living Room",
        "product_id": "0433",
        "fw_version": "1.2.3",
        "serial_id": "2"
      },
      {
        "dev_id": "ef65b760XXXXXXXX",
        "name": "Ash’s Office",
        "product_id": "0433",
        "fw_version": "1.2.3",
        "serial_id": "2"
      },
      {
        "dev_id": "e882fc60XXXXXXXXX",
        "name": "Ross’s Office",
        "product_id": "0433",
        "fw_version": "1.2.3",
        "serial_id": "2"
      }
    ],
    "owner": true
  }
]

If you want to take a look at your own API results with more control rather than divining from the logs, this is how I use the client interactively:

Get an interactive Typescript prompt:

$ npx ts-node

Set up the client:

import { HelkiClient } from './src/helki_client';
const helki = new HelkiClient('api-lhz', '54bccbfb41a9a5113f0488d0', 'vdivdi', 'USERNAME', 'PASSWORD'); 

You should then be able to interact with the available methods to see what they return, and where it might be failing for you, e.g.:

const devices = await helki.getGroupedDevices();
JSON.stringify(devices);

from homebridge-technotherm.

Lngramos avatar Lngramos commented on September 26, 2024

I've raised a PR to fix the discovery for me whilst keeping it compatible with your setup.

Changing the target temperature of the heaters isn't currently working for me due to some API errors. I'll continue to look into this other issue and raise a second PR to cover this separately.

from homebridge-technotherm.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.