raomin / ESPAltherma

Monitor your Daikin Altherma / ROTEX heat pump with ESP32
MIT License
350 stars 118 forks source link

No entities in home assistant #49

Closed Jogiarea closed 3 years ago

Jogiarea commented 3 years ago

Hello everybody,

I joined the great project and got down to work to implement it. My setup:

I successfully flashed the esp32 and also have both sensors (1x switch / 1x sensor) in the home assistant

2

If I now search for the entities under developer, I get nothing displayed

1

But when I call up the MQTT Info under Devices in the ESPAltherma, I get all data displayed as received 3

I somehow get stuck here

I Also tried to insert some sensors manually, but without any succes 4 5

here are my settings of the firmware :

`; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags ; Library options: dependencies, extra library storages ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html

[platformio] default_envs = esp32

[env:esp32] platform = espressif32 board = esp32doit-devkit-v1 framework = arduino monitor_speed = 115200 upload_speed = 115200 ; upload_port = COM5 ; Uncomment this line to allow for remote upgrade. If name resolution does not work for you, replace with the IP of ESPAltherma ; upload_port = ESPAltherma.local

lib_deps = PubSubClient

[env:m5stickc] platform = espressif32 board = m5stick-c framework = arduino monitor_speed = 115200 upload_speed = 215200 ; Uncomment this line to allow for remote upgrade. If name resolution does not work for you, replace with the IP of ESPAltherma ; upload_port = ESPAltherma.local

lib_deps = M5StickC PubSubClient

[env:m5stickcplus] platform = espressif32 board = m5stick-c framework = arduino monitor_speed = 115200 upload_speed = 215200 ; Uncomment this line to allow for remote upgrade. If name resolution does not work for you, replace with the IP of ESPAltherma ; upload_port = ESPAltherma.local

lib_deps = M5StickCPlus PubSubClient

build_flags = "-D ARDUINO_M5Stick_C_Plus"`

` //Setup your credentials and mqtt info here: //only change the value between the " " leave the rest of the line untouched.

define WIFI_SSID "XXXXXXXXXX"//Your SSID here

define WIFI_PWD "XXXXXXXXX"//Your password here leave empty if open (bad!)

define MQTT_SERVER "192.168.X.XXX"//IP address here of your MQTT server

define MQTT_USERNAME "XXXXXXX"//leave empty if not set (bad!)

define MQTT_PASSWORD "XXXXXXXXX"//leave empty if not set (bad!)

define MQTT_PORT 1883

define FREQUENCY 30000 //query values every 30 sec

if defined(ARDUINO_M5Stick_C) || defined(ARDUINO_M5Stick_C_Plus)

//Values used when M5StickC or M5STickCPlus environment is selected:

define RX_PIN 36// Pin connected to the TX pin of X10A

define TX_PIN 26// Pin connected to the RX pin of X10A

else

//Default GPIO PINs for Serial2:

define RX_PIN 16// Pin connected to the TX pin of X10A

define TX_PIN 17// Pin connected to the RX pin of X10A

endif

define PIN_THERM 0// Pin connected to the thermostat relay (normally open)

//Smart grid control - Optional: //Uncomment and set to enable SG mqtt functions //#define PIN_SG1 32// Pin connected to dry contact SG 1 relay (normally open) //#define PIN_SG2 33// Pin connected to dry contact SG 2 relay (normally open)

define MAX_MSG_SIZE 4096//max size of the json message sent in mqtt

//Uncomment this line if the JSON message should be in a Json Table format []. Use only for IOBroker Vis. //; #define JSONTABLE

//Uncomment ONE of the following according to your installation. //Then, open and edit the selected file in the /include/def/ folder and uncomment each values you are interested in.

//To use a locale version eg German, change the path to the file to the localized version.

//Eg: //instead of: #include "def/ALTHERMA(HPSU6_ULTRA).h" //use: // #include "def/German/ALTHERMA(HPSU6_ULTRA).h" // //Suported locales: French, German, Spanish.

//#include "def/ALTHERMA(BIZONE_CB_04-08KW).h" //#include "def/ALTHERMA(BIZONE_CB_11-16KW).h" //#include "def/ALTHERMA(GSHP).h" //#include "def/ALTHERMA(GSHP2).h"

include "def/German/ALTHERMA(HPSU6_ULTRA).h"

//#include "def/ALTHERMA(HYBRID).h" //#include "def/ALTHERMA(LT-D7_E_BML).h" //#include "def/ALTHERMA(LT_11-16KW_HYDROSPLIT_HYDRO_UNIT).h" //#include "def/ALTHERMA(LT_CA_CB_04-08KW).h" //#include "def/ALTHERMA(LT_CA_CB_11-16KW).h" //#include "def/ALTHERMA(LT_DA_04-08KW).h" //#include "def/ALTHERMA(LT_DA_PAIR_BML).h" //#include "def/ALTHERMA(LT_GAS_INJ)20200702.h" //#include "def/ALTHERMA(LT_MULTI_DHWHP).h" //#include "def/ALTHERMA(LT_MULTI_HYBRID).h" //#include "def/ALTHERMA(MONOBLOC_CA_05-07KW).h" //#include "def/ALTHERMA(TOP-GRADE).h" //#include "def/DAIKIN_MINI_INVERTER_CHILLER04-08KW.h" //#include "def/DEFAULT.h"

ifndef LABELDEF

warning "NO DEFINITION SELECTED: Please select your heat pump definition in /src/setup.h -- Using default."

include "def/DEFAULT.h"

endif`

`#include "labeldef.h" // This file is a definition file for the ESPAtherma. // uncomment each value you want to query for your installation.

LabelDef PROGMEM labelDefs[] = { //{0x00,0,801,0,-1,"*Kältemittel Typ"}, //{0x00,0,152,1,-1,"Anzahl - Sensoren"}, //{0x00,1,152,1,-1,"Anzahl - Inverterverdichter"}, //{0x00,2,152,1,-1,"Anzahl – Standardverdichter"}, {0x00,3,152,1,-1,"Anzahl - Außengerätelüfter"}, //{0x00,4,152,1,-1,"Anzahl - Expansionsventile"}, //{0x00,5,152,1,-1,"Anzahl - 4 Wege Ventile"}, //{0x00,6,152,1,-1,"Anzahl - Ölsumpfheizungen"}, //{0x00,7,152,1,-1,"Anzahl – Magnetventile"}, //{0x00,8,152,1,-1,"Maximal anschließbare Innengerätezahl"}, //{0x00,9,152,1,-1,"Erkannte Innengerätezahl (max. 59 anzeigbar)"}, //{0x00,10,152,1,-1,"O/U MPU ID (xx)"}, //{0x00,11,152,1,-1,"O/U MPU ID (yy)"}, {0x00,12,105,1,-1,"Außengerät Leistung (kW)"}, {0x10,0,217,1,-1,"Aktuelle Betriebsart"}, {0x10,1,307,1,-1,"Thermostat EIN/AUS"}, {0x10,1,306,1,-1,"Wiederanlaufverzögerung"}, //{0x10,1,305,1,-1,"Anlaufregelung"}, {0x10,1,304,1,-1,"Abtauung"}, //{0x10,1,303,1,-1,"Ölrückführung"}, //{0x10,1,302,1,-1,"Druckausgleichvorgang"}, //{0x10,1,301,1,-1,"Lastabwurf"}, {0x10,1,300,1,-1,"Schallreduzierter Betrieb"}, {0x10,4,203,1,-1,"Betrieb / Störung"}, {0x10,5,204,1,-1,"Störcode"}, //{0x10,6,114,2,1,"Zielverdampfung in °C"}, //{0x10,8,114,2,1,"Zielverflüssigung in °C"}, //{0x10,10,307,1,-1,"Verdichtungsendtemp.Schutz aktiv"}, //{0x10,10,310,1,-1,"Verdichtungsendtemp.Schutz retry"}, //{0x10,10,303,1,-1,"Verdichterüberstromschutz aktiv"}, //{0x10,10,311,1,-1,"Verdichterüberstromschutz retry"}, //{0x10,11,307,1,-1,"Hochdruckschutz aktiv"}, //{0x10,11,310,1,-1,"Hochdruckschutz retry"}, //{0x10,11,303,1,-1,"Niederdruckschutz aktiv"}, //{0x10,11,311,1,-1,"Niederdruckschutz retry"}, //{0x10,12,307,1,-1,"Inverterplatinentemp.Schutz aktiv"}, //{0x10,12,310,1,-1,"Inverterplatinentemp.Schutz retry"}, //{0x10,12,303,1,-1,"Sonstiger Schutzmodus"}, //{0x10,12,311,1,-1,"Nicht im Einsatz"}, //{0x11,0,215,1,-1,"O/U EEPROM (1. Ziffer)"}, //{0x11,1,215,1,-1,"O/U EEPROM (3. 4. Ziffer)"}, //{0x11,2,215,1,-1,"O/U EEPROM (5. 6. Ziffer)"}, //{0x11,3,215,1,-1,"O/U EEPROM (7. 8. Ziffer)"}, //{0x11,4,215,1,-1,"O/U EEPROM (10. Ziffer)"}, //{0x11,5,214,1,-1,"O/U EEPROM (11. Ziffer)"}, //{0x00,0,995,1,-1,"NextDataGrid"}, {0x20,0,105,2,1,"Außenlufttemp."}, {0x20,2,105,2,1,"O/U Wärmetauscher Temp."}, {0x20,4,105,2,1,"Ablassleitungstemp."}, {0x20,6,105,2,1,"Ansaugleitungstemperatur"}, {0x20,8,105,2,1,"O/U Wärmetauscher Mitteltemp."}, //{0x20,10,105,2,1,"Flüssigkeitsleitungstemp."}, //{0x20,12,105,2,1,"Inverter Platinentemperatur"}, {0x20,14,105,2,2,"Druck"}, {0x20,14,405,2,1,"Druck(T)"}, //{0x20,16,105,2,-1,"Nicht im Einsatz"}, //{0x20,18,105,2,-1,"Nicht im Einsatz"}, //{0x21,0,105,2,-1,"INV Primärstrom (A)"}, {0x21,2,105,2,-1,"Stromaufnahme INV-Verdichter (A)"}, {0x21,4,101,2,-1,"Spannung (V)"}, //{0x21,6,307,1,-1,"Frostschutz Fluss Schalter"}, //{0x21,6,306,1,-1,"Nicht im Einsatz"}, //{0x21,6,305,1,-1,"Nicht im Einsatz"}, //{0x21,6,304,1,-1,"Nicht im Einsatz"}, //{0x21,6,303,1,-1,"Nicht im Einsatz"}, //{0x21,6,302,1,-1,"Nicht im Einsatz"}, //{0x21,6,301,1,-1,"Nicht im Einsatz"}, //{0x21,6,300,1,-1,"Nicht im Einsatz"}, //{0x21,7,105,2,1,"Frostschutz Einlasstemp."}, //{0x21,9,105,2,1,"Frostschutz Auslasstemp."}, //{0x21,11,105,2,1,"Kühltemp. Verdampfer Ein"}, //{0x21,13,105,2,1,"Kühltemp. Verdampfer Aus"}, //{0x21,15,105,1,-1,"Nicht im Einsatz"}, //{0x21,16,105,1,-1,"Nicht im Einsatz"}, //{0x21,17,105,1,-1,"Nicht im Einsatz"}, //{0x21,18,105,1,-1,"Nicht im Einsatz"}, //{0x00,0,995,1,-1,"NextDataGrid"}, {0x30,0,152,1,-1,"Drehzahl Verdichter (U/Sek)"}, {0x30,1,211,1,-1,"Ventilator 1 (10 rpm)"}, //{0x30,2,211,1,-1,"Nicht im Einsatz"}, //{0x30,3,151,2,-1,"Expansionsventils1 (pls)"}, //{0x30,5,151,2,-1,"Y1E-Expansionsventil Mitteldruck_Unterkühler"}, //{0x30,7,307,1,-1,"4-Wege-Ventil 1"}, //{0x30,7,306,1,-1,"4-Wege-Ventil 2"}, //{0x30,7,305,1,-1,"4-Wege-Ventil 3"}, //{0x30,7,304,1,-1,"4-Wege-Ventil 4"}, //{0x30,7,303,1,-1,"4-Wege-Ventil 5"}, //{0x30,8,307,1,-1,"Ölsumpfheizung 1"}, //{0x30,8,306,1,-1,"Ölsumpfheizung 2"}, //{0x30,8,305,1,-1,"Ölsumpfheizung 3"}, //{0x30,8,304,1,-1,"Ölsumpfheizung 4"}, //{0x30,8,303,1,-1,"Ölsumpfheizung 5"}, //{0x30,9,307,1,-1,"Magnetventil 1"}, //{0x30,9,306,1,-1,"Magnetventil 2"}, //{0x30,9,305,1,-1,"Magnetventil 3"}, //{0x30,9,304,1,-1,"Magnetventil 4"}, //{0x30,9,303,1,-1,"Magnetventil 5"}, //{0x00,0,998,1,-1,"In-Out separator"}, //{0x60,0,304,1,-1,"Daten Aktivieren/Deaktivieren"}, //{0x60,1,152,1,-1,"Adresse des Innengeräts"}, //{0x60,2,315,1,-1,"I/U betriebsart"}, {0x60,2,303,1,-1,"Thermostat EIN/AUS"}, //{0x60,2,302,1,-1,"Frostschutz"}, //{0x60,2,301,1,-1,"Leisemodus"}, //{0x60,2,300,1,-1,"Frostschutz für Wasserleitung"}, //{0x60,3,204,1,-1,"Störcode"}, //{0x60,4,152,1,-1,"Fehlerdetailcode"}, {0x60,5,203,1,-1,"Betrieb / Störung"}, //{0x60,6,219,1,-1,"I/U Kapazitätscode"}, {0x60,7,105,2,1,"Sollwert Brauchwasser"}, {0x60,9,105,2,1,"Sollwert Heizungsvorlauf"}, {0x60,11,307,1,-1,"Wasserflussschalter"}, {0x60,11,306,1,-1,"Wärmeschutz (Q1L) BUH"}, {0x60,11,305,1,-1,"Wärmeschutz BSH"}, {0x60,11,304,1,-1,"Vorteil kWh Raten Stromversorgung"}, //{0x60,11,303,1,-1,"Solareingang"}, //{0x60,11,302,1,-1,"Nicht im Einsatz"}, //{0x60,11,301,1,-1,"Nicht im Einsatz"}, {0x60,11,300,1,-1,"Bivalenter Betrieb"}, //{0x60,12,307,1,-1,"2-Wege-Ventil (Ein: Heizen_Aus: Kühlen)"}, //{0x60,12,306,1,-1,"3-Wege-Ventil (Ein: DHW_Aus: Raum)"}, {0x60,12,305,1,-1,"BSH"}, {0x60,12,304,1,-1,"Heizstab Stufe 1"}, {0x60,12,303,1,-1,"Heizstab Stufe 2"}, {0x60,12,302,1,-1,"BPH"}, {0x60,12,301,1,-1,"Wasserpumpenbetrieb"}, //{0x60,12,300,1,-1,"Solarpumpenbetrieb"}, //{0x60,13,152,1,-1,"Innenraum Optionscode"}, //{0x60,15,215,1,-1,"Software Hydrobox (xx)"}, //{0x60,14,215,1,-1,"Software Hydrobox (yy)"}, //{0x60,16,152,1,-1,"EEPROM Hydrobox Version"}, //{0x61,0,307,1,-1,"Daten Aktivieren/Deaktivieren"}, //{0x61,1,152,1,-1,"Adresse des Innengeräts"}, {0x61,2,105,2,1,"Auslass Wasser Wärmetauscher Temp. (R1T)"}, {0x61,4,105,2,1,"Auslass Wasser BUH Temp. (R2T)"}, {0x61,6,105,2,1,"R3T-Kältemittel Flüssigkeitstemperatur"}, {0x61,8,105,2,1,"R4T-Wasser Rücklauftemp. vor dem Plattenwärmetauscher"}, {0x61,10,105,2,1,"R5T-Brauchwassertemperatur im Speicher"}, {0x61,12,105,2,1,"RT Temp."}, {0x61,14,105,2,1,"Außen Umgebungs- oder Ext-Sensor"}, //{0x62,0,307,1,-1,"Daten Aktivieren/Deaktivieren"}, //{0x62,1,152,1,-1,"Adresse des Innengeräts"}, {0x62,2,307,1,-1,"Nachheizen ein/aus"}, {0x62,2,306,1,-1,"Speicher Eco ein/aus"}, //{0x62,2,305,1,-1,"Prerisc. serbatoio ON/OFF"}, {0x62,2,304,1,-1,"Hochleistungs-DHW-Betrieb. EIN/AUS"}, {0x62,2,303,1,-1,"Raumheizbetrieb EIN/AUS"}, //{0x62,2,302,1,-1,"System AUS"}, //{0x62,2,301,1,-1,"Nicht im Einsatz"}, //{0x62,2,300,1,-1,"Notbetrieb aktiviert/nicht aktiviert"}, {0x62,3,105,2,1,"LW Einstellpunkt (Zusatz)"}, {0x62,5,105,2,1,"RT Einstellpunkt"}, {0x62,7,307,1,-1,"Add. Ext. RT Eingang Kühlen"}, {0x62,7,306,1,-1,"Add. Ext. RT Eingang Heizen"}, {0x62,7,305,1,-1,"Haupt-RT-Kühlung"}, {0x62,7,304,1,-1,"Haupt-RT-Heizung"}, {0x62,7,303,1,-1,"Stromverbrauchsgrenze 4"}, {0x62,7,302,1,-1,"Stromverbrauchsgrenze 3"}, {0x62,7,301,1,-1,"Stromverbrauchsgrenze 2"}, {0x62,7,300,1,-1,"Stromverbrauchsgrenze 1"}, //{0x62,8,307,1,-1,"Keine"}, //{0x62,8,306,1,-1,"Nicht im Einsatz"}, //{0x62,8,305,1,-1,"Nicht im Einsatz"}, //{0x62,8,304,1,-1,"Nicht im Einsatz"}, //{0x62,8,303,1,-1,"Speicher vorheizen ein/aus"}, {0x62,8,302,1,-1,"Umwälzpumpenbetrieb"}, {0x62,8,301,1,-1,"Alarmausgabe"}, //{0x62,8,300,1,-1,"Raum C/H Op. oder BPH"}, {0x62,9,105,2,-1,"Durchflussmenge (l/min)"}, {0x62,11,105,1,2,"Wasserdruck"}, {0x62,12,152,1,-1,"Pumpengeschwindigkeit (0: max-100: Stopp)"}, //{0x62,13,152,1,-1,"[Zukunft] 3-Wege-Ventil Mischung 1"}, //{0x62,14,152,1,-1,"[Zukunft] 3-Wege-Ventil Mischung 2"}, //{0x62,15,105,2,2,"Druckausgleich"}, //{0x62,17,307,1,-1,"Nicht im Einsatz"}, //{0x62,17,306,1,-1,"Nicht im Einsatz"}, //{0x62,17,305,1,-1,"Nicht im Einsatz"}, //{0x62,17,304,1,-1,"Nicht im Einsatz"}, //{0x62,17,303,1,-1,"Nicht im Einsatz"}, //{0x62,17,302,1,-1,"Nicht im Einsatz"}, //{0x62,17,301,1,-1,"Nicht im Einsatz"}, //{0x62,17,300,1,-1,"Nicht im Einsatz"}, //{0x63,0,307,1,-1,"Daten Aktivieren/Deaktivieren"}, //{0x63,1,152,1,-1,"Adresse des Innengeräts"}, //{0x63,2,215,1,-1,"I/U EEPROM (3. Ziffer)"}, //{0x63,3,215,1,-1,"I/U EEPROM (4. 5. Ziffer)"}, //{0x63,4,215,1,-1,"I/U EEPROM (6. 7. Ziffer)"}, //{0x63,5,215,1,-1,"I/U EEPROM (8. 9. Ziffer)"}, //{0x63,6,215,1,-1,"I/U EEPROM (11. Ziffer)"}, //{0x63,7,214,1,-1,"I/U EEPROM (12. Ziffer)(rev.)"}, //{0x64,0,307,1,-1,"Daten Aktivieren/Deaktivieren"}, //{0x64,1,152,1,-1,"Adresse des Innengeräts"}, //{0x64,2,316,1,-1,"Hybridbetrieb Modus"}, //{0x64,2,303,1,-1,"Boiler Betrieb Anforderung"}, //{0x64,2,302,1,-1,"Boiler DHW Anforderung"}, //{0x64,2,301,1,-1,"Bypassventil Ausgang"}, //{0x64,2,300,1,-1,"Hybrid Trinkwassererwärmung"}, //{0x64,3,105,2,-1,"BE_COP"}, //{0x64,5,105,2,1,"Hybrid Heizung Solltemp."}, //{0x64,7,105,2,1,"Boiler Heizung Solltemp."}, //{0x64,9,302,1,-1,"Add pump"}, //{0x64,9,301,1,-1,"Main pump"}, {0x64,10,105,2,1,"Mischwassertemperatur"}, //{0x64,12,105,2,1,"2nd Domestic hot water temperature"}, //{0x64,14,152,1,1,"Target delta T heating"}, //{0x64,15,152,1,1,"Target delta T cooling"} };`

I probably just forgot a little thing, but I can't figure it out

Thank you in advance for your help

raomin commented 3 years ago

Hello @Jogiarea . I understand that the 2 entities were properly auto discovered by home assistant. As the mqtt message is properly coming to Home Assistant, you should be able to get the attributes of the AlthermaSensor in the developer tool>states. As it is not coming up there might be a pbm with the interpretation of the message, but I never heard of such issue. Definitely, you should have a look in the logs, there should be an information there, if needed, raise the log level of the mqtt module.

Jogiarea commented 3 years ago

Hi Roamin,

Thanks for the fast answer, ok iv´e looked at tho logs 1

Incorrect JSON: I think that what goes wrong when creating the JSON message but can't find anything pbm ?? I do not understand, sorry

it may be that the JSON cannot cope with ä ö ü, because I use the German setting

I have to admit that I'm not that deep into programming

raomin commented 3 years ago

hmm I would more go for an extra " or : Can you paste the json message here?

Jogiarea commented 3 years ago

how can I see this? is that possible in Homeassistant

raomin commented 3 years ago

Just copy paste here the message from the logs, where it says erroneous JSON. You can also then paste it in an online json validator eg: https://jsonlint.com/

Jogiarea commented 3 years ago

Here the Logs

Erroneous JSON: [{"Aktuelle Betriebsart":"Fan Only","Thermostat EIN/AUS":"OFF","Wiederanlaufverzögerung":"OFF","Abtauung":"OFF","Schallreduzierter Betrieb":"OFF","Betrieb / Störung":"Normal","Störcode":" 0","Außenlufttemp.":27,"O/U Wärmetauscher Temp.":0,"Ablassleitungstemp.":22.5,"Ansaugleitungstemperatur":0,"O/U Wärmetauscher Mitteltemp.":22,"Druck":14.5,"Druck(T)":"Conv 405 not avail.","Stromaufnahme INV-Verdichter (A)":0,"Spannung (V)":"-28160","Drehzahl Verdichter (U/Sek)":0,"Ventilator 1 (10 rpm)":0,"Thermostat EIN/AUS":"OFF","Betrieb / Störung":,"Sollwert Brauchwasser":36,"Sollwert Heizungsvorlauf":15,"Wasserflussschalter":"OFF","Wärmeschutz (Q1L) BUH":"OFF","Wärmeschutz BSH":"ON","Vorteil kWh Raten Stromversorgung":"OFF","Bivalenter Betrieb":"OFF","BSH":"OFF","Heizstab Stufe 1":"OFF","Heizstab Stufe 2":"OFF","BPH":"OFF","Wasserpumpenbetrieb":"OFF","Auslass Wasser Wärmetauscher Temp. (R1T)":31.6,"Auslass Wasser BUH Temp. (R2T)":30.4,"R3T-Kältemittel Flüssigkeitstemperatur":29.4,"R4T-Wasser Rücklauftemp. vor dem Plattenwärmetauscher":28.5,"R5T-Brauchwassertemperatur im Speicher":31.2,"RT Temp.":0,"Außen Umgebungs- oder Ext-Sensor":22.6}]
raomin commented 3 years ago

image

    "Betrieb / Störung": ,

There seems to be an issue with this one which returns nothing.... remove it from your ESPAltherma config file and you should be ok.

Jogiarea commented 3 years ago

ok many thanks

i just saw it too

I ll try it and give a feedpack

Jogiarea commented 3 years ago

many, many thanks, the beer will come it works fine

3

raomin commented 3 years ago

Happy dashboarding :) Thanks!