Closed pszafer closed 4 years ago
Hello,
As I said, I'm beginner in Python and in HA code. Code is technically working as I'm able to communicate with the gateway, but it is very difficult for me to understand how to integrate gracefully within HA. Any help is welcome, Feel free to extend and improve this code.
Hello, Any progress in this integration. I'm a owner of a Nefit (Bosch) enviline heatpump with Ethernet connection and will intergrate it into Home assistant when it works. I do not have Python experience otherwise I had help you.
Regards,
Raimond
@moustic999 I will try to help. I'll make PR tomorrow or next week with some cleanup of code.
@Railittle I think it would be great if you can test code (there are some bugs so wait for my PR). If it would work with Netif maybe we can change name of this lib from Buderus to Bosch...
The code looks quite nice. It shouldn't be that difficult to make a Home Assistant climate device from it. The naming problem seems to be much more difficult 😄 Bosch is the manufacturer of a lot of thermostats. And these devices are sold under even more manufacturer names. As I just learned, some of them have a local HTTP API and some can be controlled only via XMPP over Bosch servers. Unfortunately I have the device that only speaks XMPP (Junkers CT 100 aka Buderus Logamatic TC100 aka Nefit Easy) so I cannot help you directly...
I'd change name of repo to e.g: bosch-thermostat-http-client-python
@moustic99 and marconfus,
I appreciate your efforts. And evethough I have no experience with Python I will help testing if necessary. I have a Nefit (is Dutch company but is actually Bosch) heat pump with IP card/connection. I now use the nefit procontrol (ios) app to connect to the heat pump. This app connects to the iCom_Low_NSC_v1 gateway with firmware version 04.04.05. I know that it is similar like this (old) app (https://itunes.apple.com/lu/app/buderus-mydevice/id456242441?mt=8). I Also know that Stefan Laheij also has made a Home Assistant component for communicating with Buderus KM200/KM50 and Nefit IP modules used in Enviline heat pumps. (https://github.com/stefanlaheij/ha-buderus). Maybe this is useful for you.
Regards,
Raimond
@Pszafer,
See above for extra info about my system. When you need additional info let me know please.
Regards,
Raimond
@pszafer Agree with the change of naming. I would go with : bosch-heater-http-client-python if you agree I will change the name.
I will also change it in the netdisco plugin I made to reflect it. it allows to detect the iCom_Low_NSC_v1 gateway via mDNS discovery. My goal : if mDNS succeed finding http api, use http api via this module. Otherwise let user configure communication via XMPP and via Bosch servers .
What do you think about ?
I don't know if bosch devices are only for heating or for cooling too.
I'd go with bosch-thermostat-http-client-python
because even if it is impossible right now, maybe in the future you'd add only some features to support cooling as well and you woudln't have to change your lib name.
Netdisco sounds cool for me. I will make PR to your repo later today (I found one bug which stops code from working) and then I'll try to make HA component.
ok, I renamed the module. For Netdisco, I made a PR to master repo, but it is pending due to "buderus" name. I think we should rename it, probably bosch-thermostat-http ? or something with "iCom' in it .
What I would like to have is the autodiscovery working in ha, via the configure device page. So no need of adding in configuration.yaml.
@moustic999 made PR to your repo. I guess it will be pretty easy to merge as I changed lib (dir) name so no conflicts at all I thinks :wink:
@Railittle can you run test.py and check if you retrieve some data from your thermostat?
@pszafer I want to hep you with testing these test.py, but I'm (as earlyer told) a total noob at Python etc. I use HA (hass.io 086.3) now for a few months and learn every day, but what you write is new for me. Is it possible for you to tell me some more please. I need a few hints to get it clear. Then i'm able to test the componement en tell you the results. One note. You are talking about communication with the Bosch thermostat. In my case we will talk with an IP module. These module has an connection directly to my heat pump. Not with the thermostat. I appreciate your help.
@Railittle what operating system do you use?
About Bosch thermostat/IP module. I'm referring to iCom_Low_NSC_v1
as thermostat. Don't know what would be proper naming of it, but I think it is kind of thermostat, just as IP module.
In my opinion it is working like that
@pszafer My situation is similair, but I have a seperate thermostat. I control and read the controlunit HMC300 in de binnenunit. (see below). I use windows10 on my laptop
@Railittle you have pretty similar scheme to scheme I'm working on. Already have basics of climate from IP module
Now trying to extract what is important to climate/heatpump/sensor for us, but there are a lot of links of things to check.
{
'id': '/heatingCircuits',
'type': 'refEnum',
'references': [{
'id': '/heatingCircuits/hc1',
'uri': 'http://{IP}/heatingCircuits/hc1'
}, {
'id': '/heatingCircuits/hc2',
'uri': 'http://{IP}/heatingCircuits/hc2'
}]
} {
'id': '/gateway',
'type': 'refEnum',
'references': [{
'id': '/gateway/uuid',
'uri': 'http://{IP}/gateway/uuid'
}, {
'id': '/gateway/firmware',
'uri': 'http://{IP}/gateway/firmware'
}, {
'id': '/gateway/userpassword',
'uri': 'http://{IP}/gateway/userpassword'
}, {
'id': '/gateway/versionFirmware',
'uri': 'http://{IP}/gateway/versionFirmware'
}, {
'id': '/gateway/versionHardware',
'uri': 'http://{IP}/gateway/versionHardware'
}, {
'id': '/gateway/boschSHPassword',
'uri': 'http://{IP}/gateway/boschSHPassword'
}, {
'id': '/gateway/portalPassword',
'uri': 'http://{IP}/gateway/portalPassword'
}, {
'id': '/gateway/knxPassword',
'uri': 'http://{IP}/gateway/knxPassword'
}, {
'id': '/gateway/haiPassword',
'uri': 'http://{IP}/gateway/haiPassword'
}, {
'id': '/gateway/openIPPassword',
'uri': 'http://{IP}/gateway/openIPPassword'
}, {
'id': '/gateway/openIPAccess',
'uri': 'http://{IP}/gateway/openIPAccess'
}, {
'id': '/gateway/DateTime',
'uri': 'http://{IP}/gateway/DateTime'
}, {
'id': '/gateway/instPassword',
'uri': 'http://{IP}/gateway/instPassword'
}, {
'id': '/gateway/instAccess',
'uri': 'http://{IP}/gateway/instAccess'
}, {
'id': '/gateway/instWriteAccess',
'uri': 'http://{IP}/gateway/instWriteAccess'
}, {
'id': '/gateway/version',
'uri': 'http://{IP}/gateway/version'
}, {
'id': '/gateway/update',
'uri': 'http://{IP}/gateway/update'
}, {
'id': '/gateway/logging',
'uri': 'http://{IP}/gateway/logging'
}]
} {
'id': '/system',
'type': 'refEnum',
'references': [{
'id': '/system/brand',
'uri': 'http://{IP}/system/brand'
}, {
'id': '/system/systemType',
'uri': 'http://{IP}/system/systemType'
}, {
'id': '/system/bus',
'uri': 'http://{IP}/system/bus'
}, {
'id': '/system/info',
'uri': 'http://{IP}/system/info'
}, {
'id': '/system/minOutdoorTemp',
'uri': 'http://{IP}/system/minOutdoorTemp'
}, {
'id': '/system/healthStatus',
'uri': 'http://{IP}/system/healthStatus'
}, {
'id': '/system/sensors',
'uri': 'http://{IP}/system/sensors'
}, {
'id': '/system/appliance',
'uri': 'http://{IP}/system/appliance'
}, {
'id': '/system/heatSources',
'uri': 'http://{IP}/system/heatSources'
}, {
'id': '/system/holidayModes',
'uri': 'http://{IP}/system/holidayModes'
}]
} {
'id': '/system/sensors',
'type': 'refEnum',
'references': [{
'id': '/system/sensors/temperatures',
'uri': 'http://{IP}/system/sensors/temperatures'
}]
} {
'id': '/heatSources',
'type': 'refEnum',
'references': [{
'id': '/heatSources/info',
'uri': 'http://{IP}/heatSources/info'
}, {
'id': '/heatSources/actualPower',
'uri': 'http://{IP}/heatSources/actualPower'
}, {
'id': '/heatSources/actualCHPower',
'uri': 'http://{IP}/heatSources/actualCHPower'
}, {
'id': '/heatSources/actualDHWPower',
'uri': 'http://{IP}/heatSources/actualDHWPower'
}, {
'id': '/heatSources/actualModulation',
'uri': 'http://{IP}/heatSources/actualModulation'
}, {
'id': '/heatSources/burnerModulationSetpoint',
'uri': 'http://{IP}/heatSources/burnerModulationSetpoint'
}, {
'id': '/heatSources/burnerPowerSetpoint',
'uri': 'http://{IP}/heatSources/burnerPowerSetpoint'
}, {
'id': '/heatSources/flameStatus',
'uri': 'http://{IP}/heatSources/flameStatus'
}, {
'id': '/heatSources/CHpumpModulation',
'uri': 'http://{IP}/heatSources/CHpumpModulation'
}, {
'id': '/heatSources/actualSupplyTemperature',
'uri': 'http://{IP}/heatSources/actualSupplyTemperature'
}, {
'id': '/heatSources/powerSetpoint',
'uri': 'http://{IP}/heatSources/powerSetpoint'
}, {
'id': '/heatSources/gasAirPressure',
'uri': 'http://{IP}/heatSources/gasAirPressure'
}, {
'id': '/heatSources/systemPressure',
'uri': 'http://{IP}/heatSources/systemPressure'
}, {
'id': '/heatSources/flameCurrent',
'uri': 'http://{IP}/heatSources/flameCurrent'
}, {
'id': '/heatSources/ChimneySweeper',
'uri': 'http://{IP}/heatSources/ChimneySweeper'
}, {
'id': '/heatSources/returnTemperature',
'uri': 'http://{IP}/heatSources/returnTemperature'
}, {
'id': '/heatSources/numberOfStarts',
'uri': 'http://{IP}/heatSources/numberOfStarts'
}, {
'id': '/heatSources/supplyTemperatureSetpoint',
'uri': 'http://{IP}/heatSources/supplyTemperatureSetpoint'
}, {
'id': '/heatSources/applianceSupplyTemperature',
'uri': 'http://{IP}/heatSources/applianceSupplyTemperature'
}, {
'id': '/heatSources/accumulatedEMonitoring',
'uri': 'http://{IP}/heatSources/accumulatedEMonitoring'
}, {
'id': '/heatSources/nominalCHPower',
'uri': 'http://{IP}/heatSources/nominalCHPower'
}, {
'id': '/heatSources/nominalDHWPower',
'uri': 'http://{IP}/heatSources/nominalDHWPower'
}, {
'id': '/heatSources/chimneyTemperature',
'uri': 'http://{IP}/heatSources/chimneyTemperature'
}, {
'id': '/heatSources/heating',
'uri': 'http://{IP}/heatSources/heating'
}, {
'id': '/heatSources/Source',
'uri': 'http://{IP}/heatSources/Source'
}, {
'id': '/heatSources/sensors',
'uri': 'http://{IP}/heatSources/sensors'
}, {
'id': '/heatSources/workingTime',
'uri': 'http://{IP}/heatSources/workingTime'
}, {
'id': '/heatSources/fuelCell',
'uri': 'http://{IP}/heatSources/fuelCell'
}, {
'id': '/heatSources/energyMonitoring',
'uri': 'http://{IP}/heatSources/energyMonitoring'
}, {
'id': '/heatSources/hs1',
'uri': 'http://{IP}/heatSources/hs1'
}, {
'id': '/heatSources/ch',
'uri': 'http://{IP}/heatSources/ch'
}, {
'id': '/heatSources/dhw',
'uri': 'http://{IP}/heatSources/dhw'
}, {
'id': '/heatSources/pool',
'uri': 'http://{IP}/heatSources/pool'
}, {
'id': '/heatSources/cooling',
'uri': 'http://{IP}/heatSources/cooling'
}, {
'id': '/heatSources/total',
'uri': 'http://{IP}/heatSources/total'
}, {
'id': '/heatSources/electricGrid',
'uri': 'http://{IP}/heatSources/electricGrid'
}]
} {
'id': '/heatingCircuits',
'type': 'refEnum',
'references': [{
'id': '/heatingCircuits/hc1',
'uri': 'http://{IP}/heatingCircuits/hc1'
}, {
'id': '/heatingCircuits/hc2',
'uri': 'http://{IP}/heatingCircuits/hc2'
}]
} {
'id': '/dhwCircuits',
'type': 'refEnum',
'references': [{
'id': '/dhwCircuits/dhw1',
'uri': 'http://{IP}/dhwCircuits/dhw1'
}]
}
{
'id': '/heatingCircuits/hc1',
'type': 'refEnum',
'references': [{
'id': '/heatingCircuits/hc1/currentRoomSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/currentRoomSetpoint'
}, {
'id': '/heatingCircuits/hc1/actualSupplyTemperature',
'uri': 'http://{IP}/heatingCircuits/hc1/actualSupplyTemperature'
}, {
'id': '/heatingCircuits/hc1/actualSupplyTempSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/actualSupplyTempSetpoint'
}, {
'id': '/heatingCircuits/hc1/operationMode',
'uri': 'http://{IP}/heatingCircuits/hc1/operationMode'
}, {
'id': '/heatingCircuits/hc1/temperatureRoomSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/temperatureRoomSetpoint'
}, {
'id': '/heatingCircuits/hc1/supplyTemperatureSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/supplyTemperatureSetpoint'
}, {
'id': '/heatingCircuits/hc1/manualRoomSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/manualRoomSetpoint'
}, {
'id': '/heatingCircuits/hc1/temporaryRoomSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/temporaryRoomSetpoint'
}, {
'id': '/heatingCircuits/hc1/roomtemperature',
'uri': 'http://{IP}/heatingCircuits/hc1/roomtemperature'
}, {
'id': '/heatingCircuits/hc1/activeSwitchProgram',
'uri': 'http://{IP}/heatingCircuits/hc1/activeSwitchProgram'
}, {
'id': '/heatingCircuits/hc1/timeToNextSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/timeToNextSetpoint'
}, {
'id': '/heatingCircuits/hc1/nextSetpoint',
'uri': 'http://{IP}/heatingCircuits/hc1/nextSetpoint'
}, {
'id': '/heatingCircuits/hc1/switchProgramMode',
'uri': 'http://{IP}/heatingCircuits/hc1/switchProgramMode'
}, {
'id': '/heatingCircuits/hc1/switchPrograms',
'uri': 'http://{IP}/heatingCircuits/hc1/switchPrograms'
}, {
'id': '/heatingCircuits/hc1/temperatureLevels',
'uri': 'http://{IP}/heatingCircuits/hc1/temperatureLevels'
}, {
'id': '/heatingCircuits/hc1/pumpModulation',
'uri': 'http://{IP}/heatingCircuits/hc1/pumpModulation'
}, {
'id': '/heatingCircuits/hc1/suWiThreshold',
'uri': 'http://{IP}/heatingCircuits/hc1/suWiThreshold'
}, {
'id': '/heatingCircuits/hc1/designTemp',
'uri': 'http://{IP}/heatingCircuits/hc1/designTemp'
}, {
'id': '/heatingCircuits/hc1/roomTempOffset',
'uri': 'http://{IP}/heatingCircuits/hc1/roomTempOffset'
}, {
'id': '/heatingCircuits/hc1/heatCurveMax',
'uri': 'http://{IP}/heatingCircuits/hc1/heatCurveMax'
}, {
'id': '/heatingCircuits/hc1/controlType',
'uri': 'http://{IP}/heatingCircuits/hc1/controlType'
}, {
'id': '/heatingCircuits/hc1/roomInfluence',
'uri': 'http://{IP}/heatingCircuits/hc1/roomInfluence'
}, {
'id': '/heatingCircuits/hc1/fastHeatupFactor',
'uri': 'http://{IP}/heatingCircuits/hc1/fastHeatupFactor'
}, {
'id': '/heatingCircuits/hc1/setpointOptimization',
'uri': 'http://{IP}/heatingCircuits/hc1/setpointOptimization'
}, {
'id': '/heatingCircuits/hc1/suWiSwitchMode',
'uri': 'http://{IP}/heatingCircuits/hc1/suWiSwitchMode'
}, {
'id': '/heatingCircuits/hc1/currentOpModeInfo',
'uri': 'http://{IP}/heatingCircuits/hc1/currentOpModeInfo'
}, {
'id': '/heatingCircuits/hc1/cooling',
'uri': 'http://{IP}/heatingCircuits/hc1/cooling'
}, {
'id': '/heatingCircuits/hc1/currentSuWiMode',
'uri': 'http://{IP}/heatingCircuits/hc1/currentSuWiMode'
}, {
'id': '/heatingCircuits/hc1/holidayMode',
'uri': 'http://{IP}/heatingCircuits/hc1/holidayMode'
}, {
'id': '/heatingCircuits/hc1/status',
'uri': 'http://{IP}/heatingCircuits/hc1/status'
}]
}
Hi pszafer,
Looks good. Can you give me a hint how to integrate it in Hassio.
Regards,
R.
Just wait please. We are working on integration with HA. Minimum a month before release if there will be somebody free to review it within next few weeks.
That would be awesome. Thx :)
@Railittle - you can test it here - https://github.com/pszafer/home-assistant-bosch-custom-component
Thx Pszafer. I had a short test, but my credentials are not good. I am not sure wich password and acces key I need. On my IP card (inside the heatpump) is a sticker with a login name and a password. These credentials i have used for the app on my Iphone. When I use these I get the message (Invalid config for [bosch]: [access_key] is an invalid option for [bosch]. Check: bosch->bosch->access_key. (See /config/configuration.yaml, line 651). Please check the docs at https://home-assistant.io/components/bosch/). When I chack my config i get the same message. What do i wrong?
Below the custom_components dir. in my config. I think this is not the problem.
![Uploading image.png…]()
Sorry, typo in readme. Change access_key to access_token. access_token is this thing on sticker and password is password you set.
I've changed it, and config file is ok now, but I still get no connection. in log "Unknown error connecting with Bosch thermostat at 192.168.178.31" I have reset the IP gateway for test also, but it doesn't work yet.
bosch:
address: 192.168.178.31
access_token: 75935xxxx
password: acXX-6KXq-RqXz-5i3x
What could be wrong?
check it like this:
bosch:
address: 192.168.178.31
password: 75935xxxx
access_token: acXX6KXqRqXz5i3x
Sorry doesnt work either. I also try to switch password and token. You're sure it will work in my case?
I will fix errors to be more meaningful hopefully, but for now I don't know why it is not working for you. Are you sure you giving proper IP address?
Can you give an output of
curl -i http://192.168.178.31/test
It works. Takes a wile, but the solution was:
I first reset IP gateway in heatpump. then I connect with Procontroll app on my Iphone. (set new password!)
then I fill in details below in my config:
bosch: address: 192.168.178.31 access_token: acXR6XEqRqXz6i4x (is password on the sticker of my IP gateway without - (minus)) password: xxxxxx (is password I had to set when connecting first time on Procontroll app (iphone)
After restart Hassio it works finally :)
Thx for your support pszafer
Hello Railittle where did you placed all the files ? and what are you set in the configuration.yaml because I got the error : Component not found: bosch. Please can you help.
Thnx so far
@Wako-x did you install HA component?
https://github.com/pszafer/home-assistant-bosch-custom-component
Hi Wako-x,
Pszafer has point you to the componement. Place that Bosch componement by custom_componements. Then restart your Pi (in my case).
PS. As I read this will not work anymore in 0.96. see: https://github.com/pszafer/home-assistant-bosch-custom-component/issues/4
Goog luck.
Hi Railittle it works :) only the hotwater temp stays invalid but all the other things working. Do you have the same problem ? Thanks for the advice. Gr Wako-x
hotwater_temp is not used in most case. I never seen a setup returning a value for this. I will check to remove this confusing value from the retrieved values. Except if someone can explain what is it's use ( I suspect for instant hot water, but I don't now anyone having this )
@moustic999 one setup which returns such value :)
Hi,
I have 2 tanks. 400L for room heating, 300L for Hot water for bathing...
Regards, Istvan
Ludovic Laurent notifications@github.com (idÅ‘pont: 2019. júl. 9., K, 9:12) ezt Ãrta:
hotwater_temp is not used in most case. I never seen a setup returning a value for this. I will check to remove this confusing value from the retrieved values. Except if someone can explain what is it's use ( I suspect for instant hot water, but I don't now anyone having this )
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/moustic999/bosch-thermostat-http-client-python/issues/6?email_source=notifications&email_token=AGAHCDSF4LGLC3WEJW4F6FTP6Q24FA5CNFSM4GSDABN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZPKOYA#issuecomment-509519712, or mute the thread https://github.com/notifications/unsubscribe-auth/AGAHCDU6LN6TXLSPE5TOEHDP6Q24FANCNFSM4GSDABNQ .
I've used part of the code from here to access data from my IVT heatpump - i want it in HA, but want the data to go via my mqtt broker.
Have you seen actual_power return data before? And do you also get 403 on any energymonitoring endpoints?
@gareth-ellis I have both return proper status.
{'id': '/heatSources/hs1/actualPower', 'type': 'floatValue', 'writeable': 0, 'recordable': 1, 'value': 0.0, 'unitOfMeasure': 'kW'}
{'id': '/heatSources/energyMonitoring/consumption', 'type': 'floatValue', 'writeable': 1, 'recordable': 0, 'value': 6200.2, 'unitOfMeasure': 'kWh', 'minValue': 0.0, 'maxValue': 135780000.0}
Interesting, i actually get something back from /heatSources/energyMonitoring/consumption - but it is empty. I might set up monitoring for that endpoint and validate it never goes from empty. {'id': '/heatSources/energyMonitoring/consumption', 'type': 'floatValue', 'writeable': 1, 'recordable': 0, 'value': 0.0, 'unitOfMeasure': 'kWh', 'minValue': 0.0, 'maxValue': 135780000.0}
If i try endpoints like: /heatSources/ch/energyMonitoring/numberOfStarts or /heatSources/ch/energyMonitoring/compressor (the same for dhw instead of ch) i get a 403 forbidden.
I don't have such refs at all.
"references": [{
"id": "/heatSources/energyMonitoring/consumption",
"uri": "http://{IP}/heatSources/energyMonitoring/consumption"
}, {
"id": "/heatSources/energyMonitoring/correctionFactor",
"uri": "http://{IP}/heatSources/energyMonitoring/correctionFactor"
}, {
"id": "/heatSources/energyMonitoring/maxTankLevel",
"uri": "http://{IP}/heatSources/energyMonitoring/maxTankLevel"
}, {
"id": "/heatSources/energyMonitoring/minTankLevel",
"uri": "http://{IP}/heatSources/energyMonitoring/minTankLevel"
}, {
"id": "/heatSources/energyMonitoring/tankLevel",
"uri": "http://{IP}/heatSources/energyMonitoring/tankLevel"
}, {
"id": "/heatSources/energyMonitoring/startDateTime",
"uri": "http://{IP}/heatSources/energyMonitoring/startDateTime"
}]
Hello,
First, thanks that you are trying to deal with all of it. What's the progress of library and progress of integration it with HA? Do you need some help finishing it?