robertklep / bosch-xmpp

Protocol implementation for Bosch XMPP protocols
MIT License
48 stars 7 forks source link

retrieve multiple items from boscheasy client in one call? #25

Closed kafeenstra closed 2 years ago

kafeenstra commented 2 years ago

Hi Robert, great software, was using the nefit http server so far for the nefit easy thermostat, and switching to the bosch easycontrol was a breeze! Thanks for all your work ;-) I'd be logging thermostat readings every few minutes, and also using the room temperature as part of my control for self-built radiator fans (they only need to run if the radiator is warmer than the room temperature reading).

Thus I'd like to read various items from the thermostat from several zones (rooms) frequently, I was wondering if there is a more efficient way to do that than to just run the bosch-xmpp tool multiple times?

kafeenstra commented 2 years ago

p.s., I wouldn't mind contributing to the implementation, if this feature isn't available yet. But I'd need a few pointers on where to start adding this. And it'd require some thoughts about how to implement this on the UI side of the tool.

robertklep commented 2 years ago

I think that the "bridge" option of the bosch-xmpp CLI tool might be of use to you, that will start an HTTP server with a permanent connection to the Bosch backend. From your logging software, you can retrieve the endpoints you want periodically and log the values returned.

kafeenstra commented 2 years ago

Ah, thanks. So that is like what the server tool for nefit does. I'll look into that!

robertklep commented 2 years ago

Yeah, it's basically the same as the server for Nefit 😊

kafeenstra commented 2 years ago

I'm getting errors like 'Cannot GET /...'. Turning on DEBUG=*, I see what I think may be the cause: 'body-parser:json skip empty body'. But I don't know what 'body' is expected. Example (that doesn't work): curl http://localhost:3333/system/sensors/humidity/indoor_h1 Just for clarity, what does work is: bosch-xmpp --serial='...' --access-key='...' --password='...' easycontrol get /system/sensors/humidity/indoor_h1

robertklep commented 2 years ago

Ah sorry, looks like I never really documented this. Try http://localhost:3333/bridge/system/sensors/humidity/indoor_h1

robertklep commented 2 years ago

I added some documentation regarding bridge mode.