openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.6k forks source link

[groheondus] Add Grohe Blue #15778

Open sehroriginell opened 1 year ago

sehroriginell commented 1 year ago

I would like to recommend adding Grohe Blue to the binding. The device seems to have the same identifiers than the other ones already implemented in the binding. So you can find the appliance_id in the appliance request for the location and room it's listed in. This is the response given for the device in the appliance query:

{
    "locations": [
        {
            "id": 0000,
            "name": "Zuhause",
            "type": 1,
            "role": "owner",
            "timezone": "Europe/Berlin",
            "water_cost": -1,
            "energy_cost": -1,
            "heating_type": -1,
            "currency": "EUR",
            "default_water_cost": 0.004256,
            "default_energy_cost": 0.003977,
            "default_heating_type": 2,
            "emergency_shutdown_enable": true,
            "address": {
                "street": "",
                "city": "",
                "zipcode": "",
                "housenumber": "",
                "country": "Deutschland",
                "country_code": "DE",
                "additionalInfo": "",
                "state": ""
            },
            "rooms": [
                {
                    "id": 0000,
                    "name": "Küche",
                    "type": 1,
                    "room_type": 15,
                    "role": "owner",
                    "appliances": [
                        {
                            "appliance_id": "0000",
                            "installation_date": "2023-10-19T17:45:38.000+02:00",
                            "name": "My GROHE Blue Home",
                            "serial_number": "0000",
                            "type": 104,
                            "version": "01.04.Z10.0300.0104",
                            "tdt": "2023-10-19T19:47:02.000+02:00",
                            "timezone": 120,
                            "config": {
                                "co2_type": 1,
                                "hose_length": 90,
                                "co2_consumption_medium": 48,
                                "co2_consumption_carbonated": 65,
                                "guest_mode_active": false,
                                "auto_flush_active": false,
                                "flush_confirmed": false,
                                "f_parameter": 7,
                                "l_parameter": 0,
                                "flow_rate_still": 20,
                                "flow_rate_medium": 25,
                                "flow_rate_carbonated": 20
                            },
                            "role": "owner",
                            "registration_complete": true,
                            "presharedkey": "0000",
                            "params": {
                                "water_hardness": 0,
                                "carbon_hardness": 15,
                                "filter_type": 1,
                                "variant": 4,
                                "auto_flush_reminder_notif": true,
                                "consumables_low_notif": true,
                                "product_information_notif": true
                            },
                            "error": {
                                "errors_1": false,
                                "errors_2": false,
                                "errors_3": false,
                                "errors_4": false,
                                "errors_5": false,
                                "errors_6": false,
                                "errors_7": false,
                                "errors_8": false,
                                "errors_9": false,
                                "errors_10": false,
                                "errors_11": false,
                                "errors_12": true,
                                "errors_13": false,
                                "errors_14": false,
                                "errors_15": false,
                                "errors_16": false,
                                "error1_counter": 256,
                                "error2_counter": 256,
                                "error3_counter": 0,
                                "error4_counter": 0,
                                "error5_counter": 0,
                                "error6_counter": 0,
                                "error7_counter": 0,
                                "error8_counter": 0,
                                "error9_counter": 0,
                                "error10_counter": 0,
                                "error11_counter": 0,
                                "error12_counter": 4864,
                                "error13_counter": 0,
                                "error14_counter": 0,
                                "error15_counter": 0,
                                "error16_counter": 0
                            },
                            "state": {
                                "start_time": 1697741766,
                                "APPLIANCE_SUCCESSFUL_CONFIGURED": false,
                                "co2_empty": false,
                                "co2_20l_reached": false,
                                "filter_empty": false,
                                "filter_20l_reached": false,
                                "cleaning_mode_active": false,
                                "cleaning_needed": false,
                                "flush_confirmation_required": false,
                                "System_error_bitfield": 0
                            },
                            "status": [
                                {
                                    "type": "update_available",
                                    "value": 0
                                },
                                {
                                    "type": "connection",
                                    "value": 1
                                }
                            ],
                            "notifications": [],
                            "data_latest": {
                                "measurement": {
                                    "cleaning_count": 0,
                                    "date_of_cleaning": "2023-10-19T17:20:02.000+02:00",
                                    "date_of_co2_replacement": "2023-10-19T18:28:49.000+02:00",
                                    "date_of_filter_replacement": "2023-10-19T17:20:22.000+02:00",
                                    "filter_change_count": 0,
                                    "max_idle_time": 37,
                                    "open_close_cycles_carbonated": 34,
                                    "open_close_cycles_still": 48,
                                    "operating_time": 3,
                                    "power_cut_count": 21,
                                    "pump_count": 50,
                                    "pump_running_time": 22,
                                    "remaining_co2": 0,
                                    "remaining_filter": 99,
                                    "time_since_last_withdrawal": 37,
                                    "time_since_restart": 536887329,
                                    "timeoffset": 120,
                                    "timestamp": "2023-10-19T19:47:02.000+02:00",
                                    "water_running_time_carbonated": 15,
                                    "water_running_time_medium": 2,
                                    "water_running_time_still": 4,
                                    "remaining_filter_liters": 794,
                                    "remaining_co2_liters": 0
                                }
                            }
                        }
                    ]
                }
            ],
            "emergency_contacts": []
        }
    ]
}

These entries are relevant for reading purposes only for most users, therefore I'd suggest not making any POST requests here and just get the following data:

state:

data_latest -> measurement:

It get's interesting when you send POST commands to the following URL using the same credentials and Bearer token: https://idp2-apigw.cloud.grohe.com/v3/iot/locations/xxxx/rooms/xxxx/appliances/xxxx/command

{
    "command": {
        "tap_type": 1,
        "tap_amount": 10
    }
}

The command consists of two variables:

What happens when you send the request is that you get the chosen amount of water carbonated as stated.

I'd be happy to test with my Grohe device and answer any questions you should have.

mitch-geht-ab commented 9 months ago

it's also for me very interesting and would be awesome to tap water through openhab (alexa) for div. amounts (type of glas or carafe).

@FlorianSW @seime a friendly nudge as code contributors to that binding.

BR mitch

Oekel commented 5 months ago

it's also for me very interesting and would be awesome to tap water through openhab (alexa) for div. amounts (type of glas or carafe).

@FlorianSW @seime a friendly nudge as code contributors to that binding.

BR mitch

I also would .... But the experience with the Mobile-App (same API) is terrible. clicking on my Favourite "Glas" or "Carafe" takes at least 5Seconds until water is floating. So not usable at all (F** o Cloud)