bosch-thermostat / home-assistant-bosch-custom-component

HA custom component for Bosch thermostats
Apache License 2.0
238 stars 46 forks source link

Solar Circuit #16

Closed Trefex closed 4 years ago

Trefex commented 4 years ago

Hi,

My Buderus is connected to solar panels.

Is it possible to retrieve also the sensors for this and if so, how?

Thanks for your help,

pszafer commented 4 years ago

Provide rawscan and I can check what is possible to do with it

Trefex commented 4 years ago

Here it is,

I attach also a screenshot, so you can see additional info.

bosch_scan.zip

Trefex commented 4 years ago

BB03D508-0C40-4529-B9D6-D6CA41BCE8BE 544D2F5E-B9BE-4C28-B64D-113C88412037

pszafer commented 4 years ago

ok. rawscan is no ready to scan solar circuits. I have to update it for you, I'll try to find time tonight or tomorrow. Is there anything to control in solar circuits or these are just sensors?

Trefex commented 4 years ago

@pszafer from what i can tell there are only sensors, collector temp (which is the solar panels themselves) and tank temp which i guess is the temp of the transfer tank (i am new to solar, so no idea if i am correct).

You also have solar yield, which gives on the built-in module information on "total yield", then current week yield for every day, last week yield for every day.

If you want i can provide you more informations. Thanks a lot for checking @pszafer

Trefex commented 4 years ago

@pszafer I think it's module SM 200 / 100 that is added to the RC300/310

pszafer commented 4 years ago

are you familiar with python? it would be much easier to test if I could just push update to the lib and you'd test it directly.

Trefex commented 4 years ago

Yes if you give me just the basic instructions.

I do run the thing in docker if that matters.

pszafer commented 4 years ago

Clone dev tree from here: https://github.com/moustic999/bosch-thermostat-http-client-python/tree/dev

cd bosch-thermostat-http-client-python
python -m venv venv
source venv/bin/activate
pip install --editable .
bosch_scan --help

more info: https://github.com/moustic999/bosch-thermostat-http-client-python/tree/dev#helper

bosch_scan --ip IP --token TOKEN --password PASSWORD

and upload new scan here.

Trefex commented 4 years ago

@pszafer done.

Attached. Had to install Python3.7 but it turned out ok.

On Ubuntu

sudo apt install python3.7 python3.7-venv
python3.7 -m venv venv
source venv/bin/activate
pip3.7 install --editable .

rawscan_819410468.json.gz

pszafer commented 4 years ago

Ok. For testing use python3.8 as this is version required by HA and this is version I'm testing lib and component.

So I'll add solarCircuits as sensors, there is nothing interesting writable.

Trefex commented 4 years ago

@pszafer ok installed 3.8 as well. I guess the raw scan output is not different.

Please let me know if I can try a new version of the HA integration or whichever and thanks a lot for your efforts.

pszafer commented 4 years ago

Tomorrow I will try to add. I still trying to add CAN bus support for other user and then I'll be back with solarCircuits.

pszafer commented 4 years ago

Can you check if solar circuits are working for you with new version? Let me know if there are any bugs. I can't test it. All I have is json file...

Trefex commented 4 years ago

@pszafer

2020-01-03 21:05:12 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry RC300/RC310/Nefit Moduline 3000 for bosch                                                                      
Traceback (most recent call last):                                                                                                                                                                          
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 192, in async_setup                                                                                                                   
    hass, self                                                                                                                                                                                              
  File "/config/custom_components/bosch/__init__.py", line 121, in async_setup_entry                                                                                                                        
    return await gateway_entry.async_init()                                                                                                                                                                 
  File "/config/custom_components/bosch/__init__.py", line 161, in async_init                                                                                                                               
    if await self.async_init_bosch():                                                                                                                                                                       
  File "/config/custom_components/bosch/__init__.py", line 219, in async_init_bosch                                                                                                                         
    supported_bosch = await self.gateway.get_capabilities()                                                                                                                                                 
  File "/usr/local/lib/python3.7/site-packages/bosch_thermostat_http/gateway.py", line 201, in get_capabilities                                                                                             
    circuit_object = await self.initialize_circuits(circuit)                                                                                                                                                
  File "/usr/local/lib/python3.7/site-packages/bosch_thermostat_http/gateway.py", line 212, in initialize_circuits                                                                                          
    await self._data[circ_type].initialize(self._db, self._str, self.current_date)                                                                                                                          
  File "/usr/local/lib/python3.7/site-packages/bosch_thermostat_http/circuits.py", line 39, in initialize                                                                                                   
    circuit, database, str_obj, current_date                                                                                                                                                                
  File "/usr/local/lib/python3.7/site-packages/bosch_thermostat_http/circuits.py", line 55, in create_circuit                                                                                               
    self._bus_type, current_date)                                                                                                                                                                           
TypeError: __init__() takes 7 positional arguments but 8 were given 
pszafer commented 4 years ago

Should be fixed. Check with new version.

Trefex commented 4 years ago

@pszafer not sure what should happen.

It added now some more sensors to Bosch sensors and a completely new device called Circuit sensors, but I am not able to see anything related to SC or Solar or anything of the sort.

pszafer commented 4 years ago

Nothing if you click Show disabled entities?

Trefex commented 4 years ago

@pszafer yes some things like attached picture in Circuit device, but nothing relate to Solar from what I can tell?

E8D86D3A-4942-4BE3-B9B3-E6D819D0D8EA

Trefex commented 4 years ago

207211DB-4780-409E-8871-A57BA1C8B6C0

pszafer commented 4 years ago

Can you check it out now? https://github.com/pszafer/home-assistant-bosch-custom-component/releases/tag/v0.5.9a

In future. Will you be able to test based on master branch without me releasing new version of component and lib? If you need extra instructions how to do it join discord and we can talk there.

Trefex commented 4 years ago

@pszafer collectorTemperature works, but solarYield is "Unknown". I will check other fields when I am back.

pszafer commented 4 years ago

Paste debug log for solarYield.

pszafer commented 4 years ago

I'm closing this issue due to inactivity. Feel free to open new issue if there is still a problem.