Apollon77 / ioBroker.siegenia

ioBroker adapter for Siegenia climate devices
MIT License
6 stars 3 forks source link

Explanation of SendRequest API #239

Closed PrzemyslawKlys closed 9 months ago

PrzemyslawKlys commented 9 months ago

Hi,

I'm trying to write NET version of your API and I'm pretty happy with what I have with one small thing. I have no idea on how to send open window requests

https://github.com/Apollon77/ioBroker.siegenia/blob/17f3ab871da5dac6b6c6bce180b06d32ddb9a88f/lib/mapper.js#L25C1-L30C7

I've been looking at this table, but i have hard time understanding what is that I actually send.

I tried a lot of different settings to sent, but nothing works. I get the status and all, but I can't find out what goes into params JSON

Sending: {
  "command": "setDeviceParams",
  "id": 3,
  "params": {
    "openclose": 1
  }
}
Received: {
  "id": 3,
  "status": "ok"
}

Would appreciate it if you can explain the fieldMapping, device Mapping you did. More over I would be interested how did you get the mapping in the first place ;) when i send the commands i don't get that much information allowing me to figiure out what is what.

I am specifically interested in MHS Family devices.

Apollon77 commented 9 months ago

Hi, hm ... honestly thats a dificult question ... Implementing this is some years ago and works till then. I think the easiest way would be installing iobroker with the plugin and enable debig logging and see what it logs. it shpuld log requests and responses.

I worked back then with the officially available API PDFs on the sigenia website ... check there

PrzemyslawKlys commented 9 months ago

I see, I can't find any API PDFs that's why I am asking. I thought that maybe you have a clue on the const you have built and how it all is connected but i understand. I'll keep digging thank you.

Apollon77 commented 9 months ago

Additionally ... Write the Siegenia guys, they were alwys willing to support

PrzemyslawKlys commented 9 months ago

I tried using ioBroker but to me it looks like doesn't work (or I don't understand how to use it)

image

I mean I can change states in that page to Close or Open, but basically nothing happens. The "reading" of states works tho, which acts similar to my app. But either I don't know how to use ioBroker, or it seems the API for closing is not working either

Apollon77 commented 9 months ago

Thats interesting and noone reported so far. Could you enable debug logging please and check logs when you control it?

Debug log: Admin - Instances - enable Export mode (the head icon) - expand the instacne and change loglevel to debug. Logs then opn disk in /opt/iobroker/log/...

PrzemyslawKlys commented 9 months ago

Ok, weird - when i enabled debug mode, suddently things started to work. Maybe debug triggered restart and it magically works. Thank you. I should be good now.

{"command":"setDeviceParams","params":{"openclose":{"0":"CLOSE"}},"id":16}

Once I sent this - it works :)