hxmelab / node-red-contrib-bosch-shc

Bosch Smart Home Controller (SHC) nodes for Node-Red
https://flows.nodered.org/node/node-red-contrib-bosch-shc
MIT License
20 stars 6 forks source link

Connection Error #81

Open MephistoJB opened 4 months ago

MephistoJB commented 4 months ago

Hi, i receive an error when trying to connect to my BSC. I already tried to reset the Password and NodeRed. No Success. I also tried with different previous versions without success.

This is the log output

BshbError: [ERROR] call to BSHC failed with HTTP status=401 at PairingClient.handleError (/opt/node_modules/bosch-smart-home-bridge/dist/api/abstract-bshc-client.js:186:32) at IncomingMessage. (/opt/node_modules/bosch-smart-home-bridge/dist/api/abstract-bshc-client.js:149:34) at IncomingMessage.emit (node:events:529:35) at endReadableNT (node:internal/streams/readable:1400:12) at processTicksAndRejections (node:internal/process/task_queues:82:21) { cause: undefined, errorType: 0 }

Can you help

hxmelab commented 4 months ago

Hi MephistoJB,

Thanks for reaching out about the "BshbError: HTTP status=401" you're encountering. Did you already read the following:

https://github.com/hxmelab/node-red-contrib-bosch-shc/issues/42 https://github.com/hxmelab/node-red-contrib-bosch-shc/issues/37

If the suggestions in those threads don't help, providing the following information will help us diagnose the problem further:

Node-RED Version: The version of Node-RED you're running. Node Version: The version of Node.js you're running. Operating System: The operating system where Node-RED is installed. Error Details: Any additional error messages you see in your Node-RED logs.

dizi87 commented 4 months ago

hi, i have the same issue.

ERROR - Please check logs

The log output is:

BshbError: [ERROR] call to BSHC failed with HTTP status=400
    at PairingClient.handleError (/config/node_modules/bosch-smart-home-bridge/dist/api/abstract-bshc-client.js:192:32)
    at IncomingMessage.<anonymous> (/config/node_modules/bosch-smart-home-bridge/dist/api/abstract-bshc-client.js:144:34)
    at IncomingMessage.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1400:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  cause: undefined,
  errorType: 0
}

already sometimes it is exactly the same log with 1 difference, with "HTTP status=401"

I am running Node-RED in version 18.0.1 as an Home Assistant OS Add-On. HA OS Version: Core 2024.6.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240610.1

I already changed the Password of BSH Controller 2 to an alphanummeric password without special characters. Does not work. I have a 20digit password, so I tried changing it to "12345678" but that also did not work pairing

What I can say. If i try to pair without pressing the pair button first I get the Error:

SHC detected, but it’s not ready to connect. Please enable pairing mode on your SHC and try again.

For this Error there is nothing in the Node-RED Log.

hxmelab commented 4 months ago

Hi dizi87, thanks for reporting this issue and providing the additional details.

You mentioned that you are running Node-RED version 18.0.1. However, the current version of Node-RED is 4.0.2. Could you please double-check the Node-RED version you are actually running?

You can verify the version within Node-RED by going to the "Help" menu and selecting "About Node-RED."

dizi87 commented 4 months ago

Hi, as an HA OS Add-On it is in Version 18.0.2 (since today). But I saw in the logs when updating, that Node-RED itself is v4.0.2 also when I start Node-RED.

2 Jul 12:16:35 - [info] Node-RED version: v4.0.2
2 Jul 12:16:35 - [info] Node.js  version: v18.20.3
2 Jul 12:16:35 - [info] Linux 6.6.31-haos-raspi arm64 LE
2 Jul 12:16:35 - [info] Loading palette nodes
2 Jul 12:16:36 - [info] Node-RED Contrib Theme Collection version: v4.0.1
2 Jul 12:16:37 - [info] Dashboard version 3.6.5 started at /endpoint/ui
2 Jul 12:16:38 - [info] Settings file  : /etc/node-red/config.js
2 Jul 12:16:38 - [info] Context store  : 'default' [module=memory]
2 Jul 12:16:38 - [info] User directory : /config/
2 Jul 12:16:38 - [warn] Projects disabled : editorTheme.projects.enabled=false
2 Jul 12:16:38 - [info] Flows file     : /config/flows.json

image

hxmelab commented 4 months ago

Could you please also check the version of the node-red-contrib-bosch-shc node in Node-RED -> Palette.

dizi87 commented 4 months ago

0.5.34 image

hxmelab commented 4 months ago

Hi dizi87, thanks for the update. I just tested the nodes with the current Node-RED version (4.0.2) and didn't encounter connection problems.

Maybe the issue you're facing might be specific to running Node-RED within Home Assistant. Can you please tell me if you're running Home Assistant in a Docker container?

dizi87 commented 4 months ago

Hey hxmelab, no I running HA OS directly on a RasPi5. And Node-RED as an add-on

hxmelab commented 4 months ago

Hey dizi87,

since you're running Home Assistant directly on a Raspberry and not using Docker, the issue might indeed stem from the Node-RED Add-On integration with Home Assistant.

To help us isolate the problem, I recommend trying the following:

Install Standalone Node-RED: Install Node-RED directly on your Raspberry, separate from the Home Assistant Add-On. You can find instructions on how to do this in the official Node-RED documentation: https://nodered.org/docs/getting-started/raspberrypi.

Test the Node: Once you have standalone Node-RED running, set up the node-red-contrib-bosch-shc nodes and try connecting to your SHC again.

If the connection works without issues in the standalone Node-RED environment, this would confirm that the problem is likely related to the Add-On integration rather than the nodes themselves. If you still encounter problems, please share the error messages you see in the standalone Node-RED logs.

Let me know how it goes!

dizi87 commented 4 months ago

I have another Pi here, so I will test it today or tomorrow. But then I have the problem to not get all the entities I have in Home Assistant. Since I use the RasperryMatic Addon for my hmIP devices and so on. Since I want to make an automation which get information from my hmIP sensors and some other entities to start then s.th. on the bosch devices. I think this would be best on HA OS... but then I have hope I find another solution