Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting values for via IVT times out #31

Open
axel-loewe opened this issue Feb 21, 2022 · 3 comments
Open

Setting values for via IVT times out #31

axel-loewe opened this issue Feb 21, 2022 · 3 comments

Comments

@axel-loewe
Copy link

Hi,

I manage to query information from our Bosch Compress 7400 heat pump via get requests. This list was extremely helpful.

bosch-xmpp ivt get /dhwCircuits/dhw1/operationMode --serial=xxxxxxxxx --access-key=xxxx-xxxx-xxxx-xxxx --password=xxxxxxxx             
{"id":"/dhwCircuits/dhw1/operationMode","type":"stringValue","writeable":1,"recordable":0,"value":"low","allowedValues":["Off","low","high","ownprogram","eco"]}

However, setting values via put requests does not work even if the endpoint says it's "writeable" as above. After several attempts, the request times out and returns "404" (debug log see below). Same issue with other writable endpoints. Increasing the timeout limit to 60s doesn't help.

Did anyone experience a similar issue? Am I missing something? Is setting values not supported?

env "DEBUG=*" bosch-xmpp ivt put /dhwCircuits/dhw1/operationMode '{"value":"eco"}' --serial=xxxxxxxxx --access-key=xxxx-xxxx-xxxx-xxxx --password=xxxxxxxx             
  xmpp:client:session start socket connection +0ms
  xmpp:connection setup socket +0ms
  xmpp:connection use lazy socket +0ms
  xmpp:connection setup stream +0ms
  xmpp:connection send: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="wa2-mz36-qrmzh6.bosch.de"> +30ms
  xmpp:connection receive: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="wa2-mz36-qrmzh6.bosch.de" id="4xzxpn8f5" xml:lang="en" version="1.0"> +27ms
  xmpp:connection receive: <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms><ver xmlns="urn:xmpp:features:rosterver"/></stream:features> +24ms
  xmpp:connection send: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/> +0ms
  xmpp:connection receive: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/> +25ms
  xmpp:connection use standard socket +12ms
  xmpp:connection setup stream +0ms
  xmpp:connection send: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="wa2-mz36-qrmzh6.bosch.de"> +89ms
  xmpp:connection receive: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="wa2-mz36-qrmzh6.bosch.de" id="4xzxpn8f5" xml:lang="en" version="1.0"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms><ver xmlns="urn:xmpp:features:rosterver"/></stream:features> +33ms
  xmpp:connection send: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="SCRAM-SHA-1">biwsbj1jb250YWN0XzA0MDQyMTQwOCxyPTAwYTEyMWQwMzRmYWNiNWQ2YWVmOGJiMjAwNGNjYjYw</auth> +4ms
  xmpp:connection receive: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cj0wMGExMjFkMDM0ZmFjYjVkNmFlZjhiYjIwMDRjY2I2MDM5NmUzMjgwLWFhZDktNDI2YS05NTA0LWI0OTJjZWI2MjBhZSxzPTN3OGEzdStTZER1ZVlFeHgyd0pLQzJqZE8va1U4WkZXLGk9NDA5Ng==</challenge> +51ms
  xmpp:connection send: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Yz1iaXdzLHI9MDBhMTIxZDAzNGZhY2I1ZDZhZWY4YmIyMDA0Y2NiNjAzOTZlMzI4MC1hYWQ5LTQyNmEtOTUwNC1iNDkyY2ViNjIwYWUscD1wZEZJZEM2SGQxZE9NRGpENllaWnlsNGdubkE9</response> +95ms
  xmpp:connection receive: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dj1ETFBXdkJ0YlhSaHBKR0wxclAza3psWTBieVU9</success> +33ms
  xmpp:connection send: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="wa2-mz36-qrmzh6.bosch.de"> +0ms
  xmpp:connection receive: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="wa2-mz36-qrmzh6.bosch.de" id="4xzxpn8f5" xml:lang="en" version="1.0"><stream:features><ver xmlns="urn:xmpp:features:rosterver"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features> +26ms
  xmpp:connection send: <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/> +0ms
  xmpp:connection receive: <iq type="result" id="bind" to="wa2-mz36-qrmzh6.bosch.de/4xzxpn8f5"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>[email protected]/4xzxpn8f5</jid></bind></iq> +42ms
  xmpp:connection send: <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/> +1ms
  xmpp:connection receive: <iq type="result" id="sess" from="wa2-mz36-qrmzh6.bosch.de" to="[email protected]/4xzxpn8f5"/> +29ms
  bosch-easyremote online, jid = [email protected]/4xzxpn8f5 +0ms
  xmpp:connection send: <presence/> +1ms
  bosch-easyremote queuing request (retries = 0) +2ms
  bosch-easyremote sending message +0ms
  bosch-easyremote:raw <message to="[email protected]" type="chat"><body>PUT /dhwCircuits/dhw1/operationMode HTTP/1.1
  bosch-easyremote:raw User-Agent: TeleHeater
  bosch-easyremote:raw Content-Type: application/json
  bosch-easyremote:raw Content-Length: 24
  bosch-easyremote:raw Seq-No: 1
  bosch-easyremote:raw 
  bosch-easyremote:raw A6gSIAYm3pzuWF1XD7VB3g==</body></message> +0ms
  xmpp:connection send: <message to="[email protected]" type="chat"><body>PUT /dhwCircuits/dhw1/operationMode HTTP/1.1
  xmpp:connection User-Agent: TeleHeater
  xmpp:connection Content-Type: application/json
  xmpp:connection Content-Length: 24
  xmpp:connection Seq-No: 1
  xmpp:connection 
  xmpp:connection A6gSIAYm3pzuWF1XD7VB3g==</body></message> +2ms
  bosch-easyremote message timed out, retrying... +5s
  [some more retries]
  Error: INVALID_RESPONSE
    at /opt/homebrew/lib/node_modules/bosch-xmpp/lib/base-client.js:257:23
    at tryCatcher (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/opt/homebrew/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:466:21) {
  response: {
    protocolVersion: 'HTTP/1.0',
    statusCode: '404',
    statusMessage: 'Not Found',
    headers: {},
    body: ''
  }
}


@robertklep
Copy link
Owner

The 404 is returned by the device, so I have to assume that the operation isn't supported. Perhaps it's missing some additional parameters, but I'd have to dig deep into the official app to see how exactly it sets this value (I assume it works with that app).

@per-lind
Copy link

per-lind commented Aug 13, 2022

Seeing the same thing when trying to "put" to an bosch compress 7001i, works to adjust the temp from the easycontroll app but when using the CLI it returns 404.

Tried put on
/heatingCircuits/hc1/manualRoomSetpoint '{"value":20.0}'/heatingCircuits/hc1/temperatureRoomSetpoint '{"value":20.0}' /heatingCircuits/hc1/temperatureLevels/comfort2 '{"value":20.0}'

all gives
response: { protocolVersion: 'HTTP/1.0', statusCode: '404', statusMessage: 'Not Found', headers: {}, body: '' }

same endpoints work with get and showes up as writable. Any ideas?

@brunofranco
Copy link

brunofranco commented Sep 24, 2022

This is also the case for Bosch Compress 3000 EW + IP module. Works fine with both EasyRemote and HomeCom Easy apps.
Just to add some logs:

  xmpp:connection send: <message to="[email protected]" type="chat"><body>PUT /heatingCircuits/hc1/switchPrograms/A HTTP/1.1
  xmpp:connection User-Agent: TeleHeater
  xmpp:connection Content-Type: application/json
  xmpp:connection Content-Length: 1240
  xmpp:connection Seq-No: 1
  xmpp:connection 
  xmpp:connection Zirq...tTg==</body></message> +34ms
  xmpp:connection receive: <presence from="[email protected]/ael8fnyl2j" to="[email protected]/ael8fnyl2j"/> +151ms
  bosch-easyremote received stanza of type "presence" +152ms
  bosch-easyremote:raw <presence from="[email protected]/ael8fnyl2j" to="[email protected]/ael8fnyl2j" xmlns:stream="http://etherx.jabber.org/streams"/> +152ms
  bosch-easyremote message timed out, retrying... +5s
  bosch-easyremote queuing request (retries = 13) +0ms
  bosch-easyremote sending message +0ms
  bosch-easyremote:raw <message to="[email protected]" type="chat"><body>PUT /heatingCircuits/hc1/switchPrograms/A HTTP/1.1
  bosch-easyremote:raw User-Agent: TeleHeater
  bosch-easyremote:raw Content-Type: application/json
  bosch-easyremote:raw Content-Length: 1240
  bosch-easyremote:raw Seq-No: 1
  bosch-easyremote:raw 
  bosch-easyremote:raw Zirq...tTg==</body></message> +5s
  xmpp:connection send: <message to="[email protected]" type="chat"><body>PUT /heatingCircuits/hc1/switchPrograms/A HTTP/1.1
  xmpp:connection User-Agent: TeleHeater
  xmpp:connection Content-Type: application/json
  xmpp:connection Content-Length: 1240
  xmpp:connection Seq-No: 1
  xmpp:connection 
  xmpp:connection Zirq...tTg==</body></message> +5s
  xmpp:connection receive: <message from="[email protected]/iCom-RestApi" to="[email protected]/ael8fnyl2j">
  xmpp:connection <body>HTTP/1.0 404 Not Found
  xmpp:connection </body>
  xmpp:connection </message> +386ms
  bosch-easyremote received stanza of type "message" +387ms
  bosch-easyremote:raw <message from="[email protected]/iCom-RestApi" to="[email protected]/ael8fnyl2j" xmlns:stream="http://etherx.jabber.org/streams">
  bosch-easyremote:raw <body>HTTP/1.0 404 Not Found
  bosch-easyremote:raw </body>
  bosch-easyremote:raw </message> +388ms
Error: INVALID_RESPONSE
    at /usr/local/lib/node_modules/bosch-xmpp/lib/base-client.js:257:23
    at tryCatcher (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/bosch-xmpp/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:464:21) {
  response: {
    protocolVersion: 'HTTP/1.0',
    statusCode: '404',
    statusMessage: 'Not Found',
    headers: {},
    body: ''
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants