tschamm / boschshcpy Goto Github PK
View Code? Open in Web Editor NEWBosch Smart Home Controller API Python Library
License: BSD 3-Clause "New" or "Revised" License
Bosch Smart Home Controller API Python Library
License: BSD 3-Clause "New" or "Revised" License
Hi,
as stated here, support for Bosch light / shutter control II has to be added in the boschshcpy library first.
The product is shown here:
light / shutter control II
This is the Postman JSON output for Bosch light / shutter control II:
0 | |
---|---|
@type | "device" |
rootDeviceId | "64-xx-xx-xx-xx-xx" |
id | "hdm:ZigBee:dc8exxxxxxxxxxxx" |
deviceServiceIds | |
0 | "ShutterControl" |
1 | "CommunicationQuality" |
2 | "PowerMeter" |
3 | "ChildProtection" |
4 | "SwitchConfiguration" |
manufacturer | "BOSCH" |
roomId | "hz_7" |
deviceModel | "MICROMODULE_SHUTTER" |
serial | "DC8EXXXXXXXXXXXX" |
profile | "GENERIC" |
name | "Rolllade (Gartenseite links)" |
status | "AVAILABLE" |
childDeviceIds | [] |
Is it possible to add support for Bosch light / shutter control II?
Thanks in advance and best regards,
David
While reloading my HomeAssistant instance I got an error:
ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform bosch_shc
Traceback (most recent call last):
[...]
File "/custom_components/bosch_shc/sensor.py", line 371, in native_value
return self._device.communicationquality.name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/boschshcpy/models_impl.py", line 172, in communicationquality
return self._communicationquality_service.value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/boschshcpy/services_impl.py", line 769, in value
return self.State(self.state["quality"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
raise ve_exc
ValueError: 'NORMAL' is not a valid CommunicationQualityService.State
I tried to check current state in Postman for the device "PLUG_COMPACT" with the error:
{
"@type": "DeviceServiceData",
"id": "CommunicationQuality",
"deviceId": "hdm:ZigBee:[...]",
"state": {
"@type": "communicationQualityState",
"quality": "NORMAL"
},
"path": "/devices/hdm:ZigBee:[...]/services/CommunicationQuality"
}
Is it possible to add the state NORMAL?
Hi,
I tried to execute
'for device in session.devices:
device.summary() `
and get the following:
Device Service: SmokeDetectorCheck
State: {'@type': 'smokeDetectorCheckState', 'value': 'SMOKE_TEST_FAILED'}
Path: /devices/hdm:ZigBee:xyz2452935235235235/services/SmokeDetectorCheck
Traceback (most recent call last):
File "/home/user/bsh/shc_test.py", line 21, in
device.summary()
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/models_impl.py", line 531, in summary
super().summary()
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/device.py", line 142, in summary
device_service.summary()
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/services_impl.py", line 282, in summary
print(f" smokeDetectorCheckState : {self.value}")
File "/home/user/.local/lib/python3.9/site-packages/boschshcpy/services_impl.py", line 278, in value
return self.State(self.state["value"])
File "/usr/lib/python3.9/enum.py", line 384, in call
return cls.new(cls, value)
File "/usr/lib/python3.9/enum.py", line 702, in new
raise ve_exc
ValueError: 'SMOKE_TEST_FAILED' is not a valid SmokeDetectorCheckService.State
Moreover is it possible to use a encrpyted private key when opening the SHCSession? How can the password be provided?
Hallo,
sorry das ich in deutsch schreibe. Aber mein Englisch ist nicht so gut.
Erst mal vielen Dank für die super Arbeit.
Ich hätte eine Frage, ist es möglich die Batterie Lichtschalter wie z.B. den Bosch Smart Home Universalschalter flex WRC2 und den normalen Bosch Smart Home Universalschalter mit zu integrieren?
Aktuell zeigt der Schalter bei Entitäten leider nur die Batterie an.
Schön wäre es, wenn als Entität auch die Schaltfunktion mit angezeigt werden würde.
Gruß
Matthias
Hello,
I am really at a loss. I connected to my SHCII a few months ago on a test computer and read out via rawscan here. In parallel, the instance boschshc-hass continues to run flawlessly via Home Assistant.
I have tried on two completely separate computers (raspberry OS and Ubuntu Mate on VM) and after installation (pip install boschshcpy) to connect to the SHCII fails. Of course, I press the button on the SHCII very briefly beforehand. (Very short keystroke)
root@ubuntu-maze:~# boschshc_registerclient -ip 192.168.1.209 -pw ############
DEBUG:boschshcpy:Registering new client with id boschshcpy_client and name oss_BOSCHSHCPY_Client_Binding.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 192.168.1.209:8443
SHC Error (message: SHC probably not in pairing mode! Please press the Bosch Smart Home Controller button until LED starts flashing.
(SSL Error: HTTPSConnectionPool(host='192.168.1.209', port=8443): Max retries exceeded with url: /smarthome/clients (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.1.209'. (_ssl.c:997)")))).)
No valid token received. Did you press client registration button on smart home controller?
Test-wise, I've even been able to reconnect an iPhone with the Bosch Smart Phone application using the same procedure with no problems. IP address and password are correctly specified. I can also ping this.
In the application, I deleted the previously connected connection under "Mobile devices".
What else could I try to change?
I am happy to provide all the possibilities. Unfortunately, I can not completely reset my SHC2.
And here Setup:
maze@ubuntu-maze:~$ python3 -V
Python 3.10.7
Installing collected packages: boschshcpy
Successfully installed boschshcpy-0.2.57
I am currently running Home Assistant Core 2023.4.2 in python 3.11.3 virtual environment.
When I tried to add Integration Boschshc, I received this error, cannot find the certificate bundle, invalid path: /srv/homeassistant/lib/python3.11/site-packages/boschshcpy/tls_ca_chain.pem.
I did some investigation, also have seen the posts here, but so far I still cannot solve it, please kindly help. Below are what I have tried:
I used "pip freeze" to check the package version, I got that the boschshcpy on my pi is version 0.2.43. However if check the package version in the virtual environment which installs the Home Assistant. I got version 0.2.35. Both are lower that required. And I checked in the folder /srv/homeassistant/lib/python3.11/site-packages/boschshcpy/, there is no file "tls_ca_chain.pem", also no file "rawscan.py".
I tried to install the lastest boschshcpy package 0.2.56 with pip in virtual environment. After that it works, I can see the new files in the folder. And I did successfully add the Integration. I got the entities in work.
But after a restart of home assistant, the version of boschshcpy was back to 0.2.35 again, the certificate was gone. The Integration showed an error, didn't work again. I tried several times, a restart of home assistant always rolled back the version to 0.2.35.
One more hint, after several tries I gave up, because the Integration only provided some sensors which is not what I need. But even though after I removed the Integration Boschshc from home assistant, I currently still receive the error message every several minutes.
As I understand the customer components Boschshcpy-hass also works based on the package. So if I cannot solve this issue, I also cannot use the customer component, right? Can anyone help me? Thanks in advance!
Hallo Thomas,
ich bin begeistert von deiner Integration des Bosch SHC in Home Assistant.
Allerdings musste ich die tls_ca_chain.pem manuell ins passende Verzeichniss meiner virtuellen Python-Umgebung kopieren, um sie starten zu können. Da es sich nicht um geschützte Informationen handelt und jeder diese öffentlichen Schlüssel auch bei Bosch bekommen kann, spricht meiner Ansicht nichts dagegen, sie in die Installation aufzunehmen.
Viele Grüße aus Bielefeld
Nixe
Hello everybody,
I hope you are doing fine and have a nice weeked.
I am working on my Home Assistant Project today and unfortunately I have no climate control sensors - so I decided to use the "boschshcpy" component, to rescan my environment.
Unfortunately there are some errors while installing the component (also with the operator --use-pep517).
Maybe someone has an idea what to do (I have to use a ocr scanner because I am using the onboard shell client from home assistant, i hope there are no scanning mistakes):
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error' error: subprocess-exited-with-error
x Running setup.py install for cffi did not run successfully. exit code: 1 —> (49 lines of output]
1
No working compiler found, or bogus compiler options passed to the compiler from Python's standard "distutils" module. See the error messages above. Likely, the problem is not related to CFFI but generic to the setup.py of any Python package that tries to compile C code. (Hints: on OS/X 10.8, for errors about -mno-fused-madd see http://stackoverflaw.corn/questions/22313407/ Otherwise, see https://wiki.python.org/moin/CompLangPython or the IRC channel gpython on irc.libera.chat.)
Trying to continue anyway. If you are trying to install CFFI from a build done in a different context, you can ignore this warning.
/usr/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead. warnings.warn(msg, warning_class) running install /usr/lib/python3.10/site-packages/setuptools/ccomand/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn( running build running build_py creating build creating build/lib.linux-aarch64-cpython-310
creating build/lib.linux-aarch64-cpython-310/cffi copying cffi/vengine_cpy.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/recompiler.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/verifier.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/api.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/cffi_opcode.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/cparser.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/error.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/commontypes.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/__init__.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/vengine_gen.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/setuptools_ext.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/pkgconfig.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/lock.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/model.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/ffiplatform.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/backend_ctypes.py
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/_cffi_include.h
-> build/lib.linux-aarch64-cpython-310/cffi copying cffi/parse_c_type. h
-> build/lib.linux-aarch64-cpython-310/cffi copying cffii_embedding.h
-> build/lib.linux-aarch64-cpython-310/cffi copying cffii_cffi_errors.h
-> build/lib.linux-aarch64-cpython-310/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-aarch64-cpython-310 creating build/temp.linux-aarch64-cpython-310/c gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -03 -Wall -Os -g -02 -Os -g -02 -Os -g -02 -DTHREAD_STACK_SIZE=Ox100000 -fPIC -DFFI_BUILDING=1 -I/usr/include/python3.10 -c c/_cffi_backend.c -o build/temp.linux-aarch64-cpython-310/c/_cffi_backend.o error: command 'gcc' failed: No such file or directory (end of output]
After the Bosch API version was updated to 3.2 recently, the corresponding "api-version" header should also be updated.
The intrusion detection control must probably be changed to the new API beforehand.
Hello
im out of ideas. Im Trying to connect to my controller with a python script. My Script looks the following:`
#!/usr/bin/env python3
"""
This script is used to set the temperature of the room to 18 degrees.
To run this script you first have to import the library boscshcpy with the command: pip3 install boschshcpy.
Other Prerequisites:
- The client certificate and key must be in the same directory as this script.
- The client certificate and key must be named "client-cert.pem" and "client-key.pem".
- The client certificate and key must be in PEM format.
- Depending on the room you want to change the temperature you need to change session.device('roomClimateControl_hz_1') to the responding room.
"""
import boschshcpy
import sys
import os
NewTempTemp = 22
def CreateSessionAndSendNewTemp(NewTemp):
#Create session and send new Temp for the room
session = boschshcpy.SHCSession(controller_ip="172.16.16.20", certificate='/home/pi/BoschKalender/Raumbuchung/client-cert.pem', key='/home/pi/BoschKalender/Raumbuchung/client-k> device = session.device('roomClimateControl_hz_3')
service = device.device_service('RoomClimateControl')
service.setpoint_temperature = NewTemp
def CreateSessionAndCompareTemp():
#Create session and send new Temp for the room
session = boschshcpy.SHCSession(controller_ip="172.16.16.20", certificate='/home/pi/BoschKalender/Raumbuchung/client-cert.pem', key='/home/pi/BoschKalender/Raumbuchung/client-k> device = session.device('roomClimateControl_hz_3')
service = device.device_service('RoomClimateControl')
OldTemp = service.setpoint_temperature
print(OldTemp)
if OldTemp < NewTempTemp:
CreateSessionAndSendNewTemp(NewTempTemp)
try:
CreateSessionAndCompareTemp()
except:
sys.exit(1)
If i run the script i get the following output:
ERROR:root:Body: None ERROR:root:Headers: {'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'api-version': '2.1', 'Content-Type': 'application/json'} ERROR:root:URL: https://172.16.16.20:8444/smarthome/information ERROR:root:Failed to get information from SHC controller: SHC Error (message: API call returned non-OK result (code 400)!: b'')
This script was working for almost two years now. After the heating break in summer i reactivated the script and now it dosn´t work anymore.
So far i have tried:
Does anyone face the same issue ore has an idea what my problem might be?
Thanks in advance
Theo
Reported bug in home-assistant/core#76150.
boschshcpy/boschshcpy/information.py
Line 32 in fe3c795
The ServiceBrowser
is never canceled
Since a while my instance yields the following error on startup:
2022-04-03 13:23:38 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up bosch_shc platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 801, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 553, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 593, in _async_write_ha_state
extra_state_attributes = self.extra_state_attributes
File "/config/custom_components/bosch_shc/sensor.py", line 364, in extra_state_attributes
"valve_tappet_state": self._device.valvestate.name,
File "/usr/local/lib/python3.9/site-packages/boschshcpy/models_impl.py", line 384, in valvestate
return self._valvetappet_service.value
File "/usr/local/lib/python3.9/site-packages/boschshcpy/services_impl.py", line 205, in value
return self.State(self.state["value"])
File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
return cls.__new__(cls, value)
File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
raise ve_exc
ValueError: 'NOT_AVAILABLE' is not a valid ValveTappetService.State
Is there any more information a can/shall provide that would be useful?
Cheers, lcnittl!
Could you please tag the source? This allows distributions to get the complete source from GitHub if they want.
This was done till 0.2.23 but not for 0.2.24
Thanks
Support for API 1.0 is dropped, see BoschSmartHome/bosch-shc-api-docs#46
Migration to 2.1 is required.
The boschshcpy is missing the device "deviceModel": "MICROMODULE_RELAY". Arew there plans to extend the lib? Can I contribute and how?
Thanks for the latest merge with the support for the new Bosch Micromodules for Light and Shutter.
I'm on Bosch SHC version 0.4.38
A quick test here, and the new micromodules show up correctly and display the correct data (power/energy, current state).
There is an issue when trying to control the micromodule. HA throws this error:
Failed to call service switch/turn_on. SHC Error (message: API call returned non-OK result (code 400)!: b'{"@type":"JsonRestExceptionResponseEntity","errorCode":"INVALID_REQUEST_OBJECT","statusCode":400}')
Log file:
boschshcpy.exceptions.SHCSessionError: SHC Error (message: API call returned non-OK result (code 400)!: b'{"@type":"JsonRestExceptionResponseEntity","errorCode":"INVALID_REQUEST_OBJECT","statusCode":400}')
2023-01-22 01:06:10.785 ERROR (SyncWorker_3) [root] Body: {"@type": "powerSwitchState", "switchState": "OFF"}
2023-01-22 01:06:10.790 ERROR (SyncWorker_3) [root] Headers: {'User-Agent': 'python-requests/2.28.1', 'Accept-Encoding': 'gzip, deflate, br', 'Accept': '/', 'Connection': 'keep-alive', 'api-version': '2.1', 'Content-Type': 'application/json', 'Content-Length': '51'}
2023-01-22 01:06:10.795 ERROR (SyncWorker_3) [root] URL: https://192.168.1.55:8444/smarthome/devices/hdm:ZigBee:dc8e95fffef9577f#2/services/PowerSwitch/state
2023-01-22 01:06:10.801 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [548208497312] SHC Error (message: API call returned non-OK result (code 400)!: b'{"@type":"JsonRestExceptionResponseEntity","errorCode":"INVALID_REQUEST_OBJECT","statusCode":400}')
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1020, in async_turn_off
await self.hass.async_add_executor_job(ft.partial(self.turn_off, **kwargs))
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/bosch_shc/switch.py", line 286, in turn_off
setattr(self._device, self.entity_description.on_key, False)
File "/usr/local/lib/python3.10/site-packages/boschshcpy/models_impl.py", line 201, in state
self._powerswitch_service.put_state_element(
File "/usr/local/lib/python3.10/site-packages/boschshcpy/device_service.py", line 49, in put_state_element
self.put_state({key: value})
File "/usr/local/lib/python3.10/site-packages/boschshcpy/device_service.py", line 44, in put_state
self._api.put_device_service_state(
File "/usr/local/lib/python3.10/site-packages/boschshcpy/api.py", line 170, in put_device_service_state
self._put_api_or_fail(api_url, state_update)
File "/usr/local/lib/python3.10/site-packages/boschshcpy/api.py", line 102, in _put_api_or_fail
self._process_nok_result(result)
File "/usr/local/lib/python3.10/site-packages/boschshcpy/api.py", line 123, in _process_nok_result
raise SHCSessionError(
boschshcpy.exceptions.SHCSessionError: SHC Error (message: API call returned non-OK result (code 400)!: b'{"@type":"JsonRestExceptionResponseEntity","errorCode":"INVALID_REQUEST_OBJECT","statusCode":400}')
Hello,
I'm running the API inside a thread of a flask app on a raspberry pi4 with bookworm/python 3.11. The thread calls every 10s a function which establishes a new session and reads out my sensors. This goes well for around two days, after that i get errors like these and my whole flask app fails:
ERROR:root:Failed to get public information from SHC controller: HTTPSConnectionPool(host='smarthome-ip', port=smarthome-port): Max retries exceeded with url: /smarthome/public/information (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1c31eb10>: Failed to establish a new connection: [Errno 113] No route to host'))
ERROR:root:Body: None
ERROR:root:Headers: {'User-Agent': 'python-requests/2.28.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Connection': > 'keep-alive', 'api-version': '3.2', 'Content-Type': 'application/json'}
ERROR:root:URL: https://smarthome-ip:smarthome-port/smarthome/information
ERROR:root:Failed to get information from SHC controller: SHC Error (message: API call returned non-OK result (code 400)!: > b'<TITLE>400</TITLE><"BODY"><"H1">400 Unsupported HTTP Protocol Version: GETHTTP/1.1')
I tried to wrap i inside a try-except statement, so the thread would just try to reconnect endlessly and my flask app would still work, but these errors seem to be not handled in the except-clause.
I also tried to make one session at the start of my flask app and ether just start and stop polling in the function or just start polling and never stop, but the results are the same.
Would you now what i do wrong? Why does it work for two days and then just crashes?
Best Regards
I'm currently trying to add support for tilting blinds in boschshcpy. However, I'm facing the problem that whenever I try to create a session I get a SSLError.
This is the code I'm using to create a session:
session = boschshcpy.SHCSession(controller_ip="192.168.178.15", certificate='examples/keystore/dev-cert.pem', key='examples/keystore/dev-key.pem')
Executing it leads to the following error:
ERROR:root:Failed to get public information from SHC controller: API call returned SSLError: HTTPSConnectionPool(host='192.168.178.15', port=8446): Max retries exceeded with url: /smarthome/public/information (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.178.15'. (_ssl.c:1002)"))).
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/christian/Documents/development/boschshcpy/boschshcpy/session.py", line 44, in __init__
self._enumerate_all()
File "/Users/christian/Documents/development/boschshcpy/boschshcpy/session.py", line 55, in _enumerate_all
self.authenticate()
File "/Users/christian/Documents/development/boschshcpy/boschshcpy/session.py", line 276, in authenticate
self._shc_information = SHCInformation(api=self._api, zeroconf=self._zeroconf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/christian/Documents/development/boschshcpy/boschshcpy/information.py", line 77, in __init__
raise SHCConnectionError
boschshcpy.exceptions.SHCConnectionError
Using the same certificate I can connect using Postman to the controller without problems.
Also, I already tried to set the ssl.VerifyMode
to CERT_NONE
.
Any ideas how to solve this?
Christian
If i am using the example from the front page i get the following error.
Error in polling thread: Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.9/dist-packages/boschshcpy/tls_ca_chain.pem. Waiting 15 seconds.
The short poll is working without error message.
All other used library call are working for me. Only long polling isn't working.
What i want to achieve is, i want to get a message if my Shutter change its state.
Today I thought first I have a genious idea to see all messages from the controller (usually only visible in the app) by implementing the /messages API endpoint documented in the official API docs.
After a while I detected, that it might have been pretty useless, since not all needed and relevant information is contained in the Messages object. Esp. there is no obvious relation to a device...
here my forked branch including messages implementation
So if I'm wrong and my implementation is helpful, I'll create a pull request after a bit more testing.
Open topics:
Just close it, if it is not worth of further following up.
After a software update of my Bosch Smart Home Controller (Version 1), i get the following error message Error in polling thread: 'PRESS_LONG_RELEASED' is not a valid KeypadService.KeyEvent. Waiting 15 seconds.
in my application, when i press one of my universal switches (version 1).
I use the lastest version (0.2.57) of boschshcpy in my application
Here a short extract of my log-file
Logger: boschshcpy
Source: /var/lib/shc/.venv/3.11/lib/python3.11/site-packages/boschshcpy/session.py:213
First occurred: 12:05:38 (3 occurrences)
Last logged: 12:07:27
Error in polling thread: 'PRESS_LONG_RELEASED' is not a valid KeypadService.KeyEvent. Waiting 15 seconds.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.