Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Atlantic Optimocosy - Double Flow CMV (io:AtlanticHeatRecoveryVentilationIOComponent) #376

Closed
tillstaff opened this issue Feb 4, 2021 · 40 comments · Fixed by #379

Comments

@tillstaff
Copy link
Contributor

tillstaff commented Feb 4, 2021

Device information
Atlantic Optimocosy (Double flow CMV) not recognized as a Climate entity.
Would like to be able to set the operating mode (MANUAL, PROG, AUTO, BOOST, AWAY).
Temperature and CO2 sensors are discovered (but no entity created for CO2 sensor).

Device details
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Unsupported device detected (io:AtlanticHeatRecoveryVentilationIOComponent - VentilationSystem - AtlanticHeatRecoveryVentilation - io://xxxx-xxxx-xxxx/15021786#1)
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:CO2IOSystemDeviceSensor - AirSensor - CO2Sensor - io://xxxx-xxxx-xxxx/15021786#2)
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#3)
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#4)
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#5)
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#6)
2021-02-04 09:32:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#7)

      {
        "creationTime": 1482935460000,
        "lastUpdateTime": 1482935460000,
        "label": "ACHRV_Actuator",
        "deviceURL": "io://xxxx-xxxx-xxxx/15021786#1",
        "shortcut": false,
        "controllableName": "io:AtlanticHeatRecoveryVentilationIOComponent",
        "definition": {
          "commands": [
            {
              "commandName": "delayedStopIdentify",
              "nparams": 1
            },
            {
              "commandName": "getName",
              "nparams": 0
            },
            {
              "commandName": "identify",
              "nparams": 0
            },
            {
              "commandName": "refreshTimeProgram",
              "nparams": 0
            },
            {
              "commandName": "setName",
              "nparams": 1
            },
            {
              "commandName": "setTimeProgram",
              "nparams": 1
            },
            {
              "commandName": "startIdentify",
              "nparams": 0
            },
            {
              "commandName": "stopIdentify",
              "nparams": 0
            },
            {
              "commandName": "wink",
              "nparams": 1
            },
            {
              "commandName": "pairOneWayController",
              "nparams": 2
            },
            {
              "commandName": "refreshCO2History",
              "nparams": 0
            },
            {
              "commandName": "refreshEnergySaving",
              "nparams": 0
            },
            {
              "commandName": "refreshSensorsState",
              "nparams": 0
            },
            {
              "commandName": "refreshVentilationConfigurationMode",
              "nparams": 0
            },
            {
              "commandName": "refreshVentilationState",
              "nparams": 0
            },
            {
              "commandName": "setAirDemandMode",
              "nparams": 1
            },
            {
              "commandName": "setVentilationConfigurationMode",
              "nparams": 1
            },
            {
              "commandName": "unpairAllOneWayControllers",
              "nparams": 0
            },
            {
              "commandName": "unpairOneWayController",
              "nparams": 2
            },
            {
              "commandName": "resetVentilation",
              "nparams": 3
            },
            {
              "commandName": "setVentilationMode",
              "nparams": 1
            }
          ],
          "states": [
            {
              "type": "ContinuousState",
              "qualifiedName": "core:AirDemandState"
            },
            {
              "values": [
                "good",
                "low",
                "normal",
                "verylow"
              ],
              "type": "DiscreteState",
              "qualifiedName": "core:DiscreteRSSILevelState"
            },
            {
              "type": "DataState",
              "qualifiedName": "core:NameState"
            },
            {
              "type": "ContinuousState",
              "qualifiedName": "core:OperatingStateState"
            },
            {
              "type": "ContinuousState",
              "qualifiedName": "core:PriorityLockTimerState"
            },
            {
              "type": "ContinuousState",
              "qualifiedName": "core:RSSILevelState"
            },
            {
              "values": [
                "available",
                "unavailable"
              ],
              "type": "DiscreteState",
              "qualifiedName": "core:StatusState"
            },
            {
              "type": "DataState",
              "qualifiedName": "core:TimeProgramState"
            },
            {
              "type": "ContinuousState",
              "qualifiedName": "core:VersionState"
            },
            {
              "values": [
                "auto",
                "away",
                "boost",
                "high"
              ],
              "type": "DiscreteState",
              "qualifiedName": "io:AirDemandModeState"
            },
            {
              "type": "DataState",
              "qualifiedName": "io:CO2HistoryState"
            },
            {
              "type": "DataState",
              "qualifiedName": "io:EnergySavingState"
            },
            {
              "type": "ContinuousState",
              "qualifiedName": "io:InletEngineState"
            },
            {
              "type": "ContinuousState",
              "qualifiedName": "io:OutletEngineState"
            },
            {
              "values": [
                "comfortLevel1",
                "comfortLevel2",
                "comfortLevel3",
                "comfortLevel4",
                "environmentProtection",
                "humanProtection",
                "userLevel1",
                "userLevel2"
              ],
              "type": "DiscreteState",
              "qualifiedName": "io:PriorityLockLevelState"
            },
            {
              "values": [
                "LSC",
                "SAAC",
                "SFC",
                "UPS",
                "externalGateway",
                "localUser",
                "myself",
                "rain",
                "security",
                "temperature",
                "timer",
                "user",
                "wind"
              ],
              "type": "DiscreteState",
              "qualifiedName": "io:PriorityLockOriginatorState"
            },
            {
              "type": "DataState",
              "qualifiedName": "io:ProgCommandState"
            },
            {
              "type": "DataState",
              "qualifiedName": "io:RemainingTimeBeforeFilterChangeState"
            },
            {
              "type": "DataState",
              "qualifiedName": "io:SensorsErrorState"
            },
            {
              "values": [
                "comfort",
                "eco",
                "standard"
              ],
              "type": "DiscreteState",
              "qualifiedName": "io:VentilationConfigurationModeState"
            },
            {
              "type": "DataState",
              "qualifiedName": "io:VentilationModeState"
            }
          ],
          "dataProperties": [
            {
              "value": "500",
              "qualifiedName": "core:identifyInterval"
            }
          ],
          "widgetName": "AtlanticHeatRecoveryVentilation",
          "uiClass": "VentilationSystem",
          "qualifiedName": "io:AtlanticHeatRecoveryVentilationIOComponent",
          "type": "ACTUATOR"
        },
        "states": [
          {
            "name": "core:NameState",
            "type": 3,
            "value": "ACHRV_Actuator"
          },
          {
            "name": "core:VersionState",
            "type": 3,
            "value": "36383230303841202020"
          },
          {
            "name": "core:PriorityLockTimerState",
            "type": 1,
            "value": 0
          },
          {
            "name": "core:StatusState",
            "type": 3,
            "value": "available"
          },
          {
            "name": "core:DiscreteRSSILevelState",
            "type": 3,
            "value": "good"
          },
          {
            "name": "core:RSSILevelState",
            "type": 2,
            "value": 100
          },
          {
            "name": "core:AirDemandState",
            "type": 1,
            "value": 100
          },
          {
            "name": "io:VentilationConfigurationModeState",
            "type": 3,
            "value": "standard"
          },
          {
            "name": "io:AirDemandModeState",
            "type": 3,
            "value": "auto"
          },
          {
            "name": "io:VentilationModeState",
            "type": 11,
            "value": {
              "dayNight": "night",
              "month": 2,
              "test": "off",
              "endOfLineTest": "off",
              "cooling": "off",
              "leapYear": "off",
              "day": 2,
              "prog": "on"
            }
          },
          {
            "name": "io:OutletEngineState",
            "type": 1,
            "value": 150
          },
          {
            "name": "io:InletEngineState",
            "type": 1,
            "value": 156
          },
          {
            "name": "io:RemainingTimeBeforeFilterChangeState",
            "type": 1,
            "value": 426
          },
          {
            "name": "core:OperatingStateState",
            "type": 1,
            "value": 4
          },
          {
            "name": "io:ProgCommandState",
            "type": 1,
            "value": 0
          },
          {
            "name": "io:SensorsErrorState",
            "type": 11,
            "value": {
              "outside": false,
              "co2": false,
              "outlet": {
                "newAir": false,
                "exhaustAir": false
              },
              "inlet": {
                "newAir": false,
                "exhaustAir": false
              }
            }
          },
          {
            "name": "core:TimeProgramState",
            "type": 11,
            "value": {
              "lastRequest": "gui",
              "programs": [
                {
                  "slots": {
                    "count": 3,
                    "definitions": [
                      {
                        "mode": "presence-plus",
                        "start": "00:00"
                      },
                      {
                        "mode": "presence",
                        "start": "08:00"
                      },
                      {
                        "mode": "presence-plus",
                        "start": "19:00"
                      }
                    ]
                  }
                },
                {
                  "slots": {
                    "count": 3,
                    "definitions": [
                      {
                        "mode": "presence",
                        "start": "00:00"
                      },
                      {
                        "mode": "presence-plus",
                        "start": "07:30"
                      },
                      {
                        "mode": "presence",
                        "start": "20:30"
                      }
                    ]
                  }
                }
              ],
              "daymode": {
                "sunday": "prog2",
                "saturday": "prog2",
                "tuesday": "prog2",
                "wednesday": "prog2",
                "friday": "prog2",
                "thursday": "prog2",
                "monday": "prog2"
              }
            }
          },
          {
            "name": "io:CO2HistoryState",
            "type": 10,
            "value": [
              56,
              56,
              58,
              55,
              54,
              55,
              53,
              56,
              56,
              54,
              53,

              52,
              52,
              52,
              54,
              56,
              55,
              55,
              61,
              59,
              59,
              59,
              59,
              59,
              60,
              60,
              62,
              59,
              56,
              53,
              50,
              49,
              48,
              47,
              47,
              46,
              46,
              46,
              46,
              46,
              47,
              47,
              46,
              47,
              52,
              57,
              61,
              63,
              57,
              57,
              67,
              76,
              69,
              63,
              61,
              61,
              59,
              56,
              54,
              55,
              53,
              52,
              50,
              52,
              54,
              68,
              62,
              57,
              57,
              57,
              56,
              56,
              56,
              58,
              58,
              59,
              56,
              53,
              50,
              48,
              47,
              47,
              46,
              46,
              46,
              45,
              45,
              45,
              45,
              45,
              45,
              45,
              45,
              45,
              49,
              54,
              50,
              50,
              52,
              52,
              56,
              56,
              57,
              58,
              59,
              60,
              55,
              55,
              54,
              54,
              55,
              55,
              59,
              62,
              68,
              66,
              64,
              63,
              65,
              61,
              59,
              59,
              59,
              60,
              57,
              55,
              52,
              51,
              50,
              49,
              49,
              49,
              48,
              48,
              48,
              47,
              47,
              47,
              48,
              47,
              50,
              54,
              57,
              59,
              27
            ]
          },
          {
            "name": "io:EnergySavingState",
            "type": 1,
            "value": 393
          }
        ],
        "available": true,
        "enabled": true,
        "placeOID": "27c236f2-8df0-49d6-80e8-bcdcae9f9dd4",
        "widget": "AtlanticHeatRecoveryVentilation",
        "type": 1,
        "oid": "f5099083-ca40-4a6f-b186-e231c49e5005",
        "uiClass": "VentilationSystem"
      },

Hub:
Cozytouch

Device commands

Set Auto mode :

2021-02-04 10:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 15:06:10: setVentilationConfigurationMode executed via Android 2.4.8#220 Set device mode : AUTO on io://xxxx-xxxx-xxxx/15021786#1, with ['comfort'].
2021-02-04 10:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 15:06:10: setVentilationMode executed via Android 2.4.8#220 Set device mode : AUTO on io://xxxx-xxxx-xxxx/15021786#1, with [{'test': 'off', 'end_of_line_test': 'off', 'leap_year': 'on', 'prog': 'off', 'month': 4, 'day_night': 'night', 'cooling': 'off', 'day': 18}].

Set Prog mode :

2021-02-04 10:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 15:06:21: setVentilationConfigurationMode executed via Android 2.4.8#220 Set device mode : PROG on io://xxxx-xxxx-xxxx/15021786#1, with ['standard'].
2021-02-04 10:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 15:06:21: setVentilationMode executed via Android 2.4.8#220 Set device mode : PROG on io://xxxx-xxxx-xxxx/15021786#1, with [{'test': 'off', 'end_of_line_test': 'off', 'leap_year': 'off', 'prog': 'on', 'month': 2, 'day_night': 'night', 'cooling': 'off', 'day': 2}].

Set Manual mode :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 16:06:21: setVentilationConfigurationMode executed via Android 2.4.8#220 Set device mode : MANUAL on io://xxxx-xxxx-xxxx/15021786#1, with ['standard'].
2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 16:06:21: setVentilationMode executed via Android 2.4.8#220 Set device mode : MANUAL on io://xxxx-xxxx-xxxx/15021786#1, with [{'test': 'off', 'end_of_line_test': 'off', 'leap_year': 'on', 'prog': 'off', 'month': 4, 'day_night': 'night', 'cooling': 'off', 'day': 18}].

Set "Over-ventilation House" mode :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 17:06:21: setAirDemandMode via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with ['boost'].

Set "Over-ventilation kichen" mode :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 17:06:21: setAirDemandMode via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with ['high'].

Stop "Over-ventilation" modes :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 17:06:21: setAirDemandMode via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with ['auto'].

Set "Cooling" mode :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 16:06:21: setAirDemandMode via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with ['auto'].
2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 16:06:21: setVentilationMode executed via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with [{'test': 'off', 'end_of_line_test': 'off', 'leap_year': 'off', 'prog': 'off', 'month': 2, 'day_night': 'night', 'cooling': 'on', 'day': 4}].

Stop "Cooling" mode :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 16:06:21: setVentilationMode executed via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with [{'test': 'off', 'end_of_line_test': 'off', 'leap_year': 'off', 'prog': 'off', 'month': 2, 'day_night': 'night', 'cooling': 'off', 'day': 4}].

Set Away mode :

2021-02-04 13:45:34 INFO (MainThread) [custom_components.tahoma] 2021-02-02 17:06:21: setAirDemandMode via Android 2.4.8#220 null on io://xxxx-xxxx-xxxx/15021786#1, with ['away'].

Cozytouch Interface

I'm new with this integration and it's really a great job!
If needed, I can share some other details about my configuration or I can test some others commands.

@iMicknl
Copy link
Owner

iMicknl commented Feb 4, 2021

Thanks for your very very detailed report, @tillstaff. This makes implementing way easier. 🥳 I need to have a look if this should be mapped to the fan entity in Home Assistant, or to climate.

@tillstaff
Copy link
Contributor Author

Thanks to you for this integration!

Just to know, you could also have a sensor for the speed of each motors (inlet and outlet).

The values are here in m3/h (cubic meter per hour):

"states": [
          {
            "name": "io:OutletEngineState",
            "type": 1,
            "value": 150
          },
          {
            "name": "io:InletEngineState",
            "type": 1,
            "value": 156
          },

@iMicknl
Copy link
Owner

iMicknl commented Feb 5, 2021

Thanks. Currently that isn't possible, we depend on #223 for that to be technically possible. As a workaround, all device states and attributes are added to Home Assistant as attributes. See a cover as an example;
image

When this device is added, you can use those states via the attributes.

@tillstaff
Copy link
Contributor Author

Ok, that's not a problem for me.

In Home-Assistant, we can add new sensors from entities attributes with the template platform.
https://www.home-assistant.io/integrations/template/

@iMicknl
Copy link
Owner

iMicknl commented Feb 11, 2021

I am currently implementing this device, where I started with a fan entity. I was a bit confused by your screenshot, but eventually it looks like a fan heater should be mapped to a climate entity. Especially since a climate entity does include a fan option as well.

This device is pretty complex, but your post is helping a lot :). If the device is not cooling, is it heating? Should I add an option to cool (cooling = on) and an option to heat (cooling = off), or does it work differently?

@iMicknl
Copy link
Owner

iMicknl commented Feb 11, 2021

@tillstaff could you give https://github.com/iMicknl/ha-tahoma/archive/feature/AtlanticHeatRecoveryVentilation.zip a try? Extract this file and place custom_components/tahoma in your custom_components folder. Looking forward to your feedback.

@tillstaff
Copy link
Contributor Author

tillstaff commented Feb 13, 2021

Thanks for this test build @iMicknl

The discovery is now ok :

2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:AtlanticHeatRecoveryVentilationIOComponent - VentilationSystem - AtlanticHeatRecoveryVentilation - io://xxxx-xxxx-xxxx/15021786#1)
2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:CO2IOSystemDeviceSensor - AirSensor - CO2Sensor - io://xxxx-xxxx-xxxx/15021786#2)
2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#3)
2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#4)
2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#5)
2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#6)
2021-02-13 11:14:46 DEBUG (MainThread) [custom_components.tahoma] Added device (io:TemperatureInCelciusIOSystemDeviceSensor - TemperatureSensor - TemperatureSensor - io://xxxx-xxxx-xxxx/15021786#7)

But I didn't find any new climate entity, do you need some specific logs? (although, the CO2 sensor is missing too)

@iMicknl
Copy link
Owner

iMicknl commented Feb 13, 2021

@tillstaff that is weird. Is there no other error in the log? Could you share a screenshot of your integrations -> devices -> detail pages?

@tillstaff
Copy link
Contributor Author

@iMicknl, I have this error in the logs but I don't know if it's related to this issue :

Logger: custom_components.tahoma
Source: custom_components/tahoma/coordinator.py:150
Integration: Somfy TaHoma (documentation, issues)
First occurred: 11:36:45 (92 occurrences)
Last logged: 18:48:26

Unexpected error fetching events data: 'NoneType' object is not callable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 149, in async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/tahoma/coordinator.py", line 120, in _async_update_data
    device.states[state.name].value = self._get_state(state)
  File "/config/custom_components/tahoma/coordinator.py", line 150, in _get_state
    return caster(state.value)
TypeError: 'NoneType' object is not callable

And here is my device in hassio (only temperature sensors are available as entities) :
tahoma-vmc

@iMicknl
Copy link
Owner

iMicknl commented Feb 15, 2021

@tillstaff are you sure that the entity isn't added as well? (it could be that it is not correctly linked to a device).

Otherwise, would you be willing to work with me via Discord and to share your credentials temporarily? It would speed up the development a lot, since those climate devices are hard to understand and implement. With other users I have seen that this helps to create a basic version in less than an hour, instead of going back and forth. (Discord: https://discord.gg/ENPcXd9j, or iMick#1903)

@tillstaff
Copy link
Contributor Author

@iMicknl, yes I'm sure. When I search for "climate" entitites, I only find the two heaters with "Cozytouch Interface".
Capture d’écran_2021-02-16_11-06-58
It's the same with the CO2 entity missing.

I will try to join the Discord when I have time to make a live debug session.

@iMicknl
Copy link
Owner

iMicknl commented Mar 10, 2021

@tillstaff a new version has been published for you :). From here I believe you are able to do some debugging yourselves!

@github-actions
Copy link

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

@iMicknl
Copy link
Owner

iMicknl commented Apr 25, 2021

@segaura could you give https://github.com/iMicknl/ha-tahoma/archive/refs/heads/feature/AtlanticHeatRecoveryVentilation.zip a try? Extract this file and place custom_components/tahoma in your custom_components folder.

Even though the name is (here) still TaHoma, it will also work with Cozytouch ;-).

@segaura
Copy link

segaura commented Apr 25, 2021

Only now I understand how to use the zip, sorry.
Now I have done what you suggested.

I see the climate entity, wow!

In the "ventilation" section, the "Boost command" I needed works, thank you.
It is in the "ventilation" section.
In the same section:

  • "automatic" also works (useful to cancel a boost)
  • "high" also works and corresponds to "kitchen boost" (do not apply to my house setup but maybe someone else is interested in)
  • "away" does not work, it does not trigger the unit "absence" mode wich seems the obvious correspondence
  • the freecoling mode is not present (bypass of the heat exchanger that during the summer nights sends fresh air directly into the house)

All the presets fail:

  • manual
    ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Managed action group is invalid : Error invoking LUA function <runtime:1>({['prog'] = 'off'},{['groupDef'] = false, ['keepAliveTimeout'] = 3000, ['deviceAddress'] = '8596125'}) : common-atlantic-utils.module:247 bad argument: int expected, got nil

  • prog
    ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Managed action group is invalid : Error invoking LUA function <runtime:1>({['prog'] = 'on'},{['groupDef'] = false, ['keepAliveTimeout'] = 3000, ['deviceAddress'] = '8596125'}) : common-atlantic-utils.module:247 bad argument: int expected, got nil

  • freeze prevention
    ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Managed action group is invalid : Error invoking LUA function <runtime:1>({['prog'] = 'off'},{['groupDef'] = false, ['keepAliveTimeout'] = 3000, ['deviceAddress'] = '8596125'}) : common-atlantic-utils.module:247 bad argument: int expected, got nil

  • comfort
    ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Managed action group is invalid : Error invoking LUA function <runtime:1>({['prog'] = 'off'},{['groupDef'] = false, ['keepAliveTimeout'] = 3000, ['deviceAddress'] = '8596125'}) : common-atlantic-utils.module:247 bad argument: int expected, got nil

The actual presets on the unit remote and Cozytouch app are "manual", "prog" and "auto" and in manual mode you set a target air intake into the house, not a temperature.

Other control/commands do not make sense for this unit, like the temperature setpoint and the heating/cooling selector, let me know if I am wrong or if you want to customize the entity to better fit the real object.

By now I have not set the log to debug, and I see failing the "cooling" commands (cooling <- off)

ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Managed action group is invalid : Error invoking LUA function <runtime:1>({['cooling'] = 'on'},{['groupDef'] = false, ['keepAliveTimeout'] = 3000, ['deviceAddress'] = '8596125'}) : common-atlantic-utils.module:247 bad argument: int expected, got nil

and also the heating command (cooling <- off).
Finally I see nothing in the log, when I change the temperature setpoint.

I have some debug log I can upload but I'm not sure if they contain personal data, e.g. some uuid or other coordinates specific of my unit/bridge/account/...

@iMicknl
Copy link
Owner

iMicknl commented Apr 25, 2021

@segaura no worries! Great to hear that it did work. Indeed, this is just a test version and quite some things need to be fixed, thus your feedback is more than welcome.

@tillstaff did you already make changes to this device? Or didn't you own this device, I don't recall :-).

@tillstaff
Copy link
Contributor Author

@iMicknl I did'nt make any changes on this device and I own the first version of the Optimocosy.

For my side:

  • AUTO and MANUAL presets are working but I have a problem with the state because the update of this state is sometimes wrong ('io:VentilationConfigurationModeState': unknown), maybe a refresh command could help
  • fan control are working
  • cooling mode doesn't work

@segaura the -40°C sensor is for the optional "Canadian well" I think and the cooling mode is for the "freecooling" mode of the Optimocosy.

It could be more understandable if the freecooling mode is declared as a FAN mode instead of HVAC mode, but can we have a climate entity without HVAC MODE? Or maybe just use this HVAC MODE : HVAC_MODE_FAN_ONLY?

If it's possible, we could use this device as follows :

  • PRESETS
    • AUTO
    • PROG
    • MANUAL
  • FAN MODE
    • HIGH - for boost mode
    • MEDIUM - for kitchen mode
    • LOW - for away mode
    • BYPASS - for freecooling mode (boost mode with bypass engaged)
    • AUTO - for normal mode

@iMicknl
Copy link
Owner

iMicknl commented Apr 28, 2021

hvac_mode is required, but indeed we could use HVAC_MODE_FAN_ONLY. I am not familiar enough with your device to make those choices, but I trust the two of you. 😉

Possible fan states:
https://github.com/home-assistant/core/blob/14af6d3884b5d4e319463c59a2633af57f5d6acc/homeassistant/components/climate/const.py#L60-L68

I am not sure if we can add other fan modes.

  • AUTO and MANUAL presets are working but I have a problem with the state because the update of this state is sometimes wrong ('io:VentilationConfigurationModeState': unknown), maybe a refresh command could help

Do you know how this works via the official app? Are they calling the refresh commands?

  • cooling mode doesn't work

How would that look like and which commands need to be executed? And if you need cooling, why not map this to a hvac_mode? So supporting HVAC_MODE_FAN_ONLY and HVAC_MODE_COOL.

@segaura the -40°C sensor is for the optional "Canadian well" I think and the cooling mode is for the "freecooling" mode of the Optimocosy.

Does it make sense to link a temperature sensor? In your screenshots they show two temperature values. I am not sure if we linked the correct sensor to the climate entity currently.

@tillstaff
Copy link
Contributor Author

I made some debugs and tried to correct each commands.

@segaura Could you test this build?
https://github.com/tillstaff/ha-tahoma/archive/refs/heads/feature/AtlanticHeatRecoveryVentilation.zip
If it's easier for you, only this file has been modified : https://github.com/tillstaff/ha-tahoma/blob/feature/AtlanticHeatRecoveryVentilation/custom_components/tahoma/climate_devices/atlantic_heat_recovery_ventilation.py
I will make the PR if it's ok.

@iMicknl

  • AUTO and MANUAL presets are working but I have a problem with the state because the update of this state is sometimes wrong ('io:VentilationConfigurationModeState': unknown), maybe a refresh command could help

Do you know how this works via the official app? Are they calling the refresh commands?

I confirm that the official app is doing refresh commands and it needs to be delayed a little after set commands. (0.5s sleep was needed in the code)

How would that look like and which commands need to be executed? And if you need cooling, why not map this to a hvac_mode? So supporting HVAC_MODE_FAN_ONLY and HVAC_MODE_COOL.

I'm staying with your initial construction, it's working fine. Maybe we could replace HVAC_HEAT by HVAC_MODE_FAN_ONLY, it would be more understandable.

Does it make sense to link a temperature sensor? In your screenshots they show two temperature values. I am not sure if we linked the correct sensor to the climate entity currently.

Yes, it does and you choose the best value to display!

@segaura
Copy link

segaura commented May 1, 2021

I am testing the new file you provided (extracting it from the zip, the direct link does not work for me).
I'm going to do a side-by-side comparison with the unit's remote to verify the working commands, I'll be back within today.

Regarding the "fan only mode" maybe I need to better understand two things:

  • how ha models an hvac system ...and I try to sort out this on my own looking at the documentation
  • if the target here is to make this Atlantic units working or if we want to improve ha modeling for a generic CMV system (other brands have system with inline heater, cooler, dehumidifier, both with compressor and fancoil, etc.)

Regarding the command/sensor/functionalities to map on the custom component, my unit have two set of them:

  1. a small one available through the Cozytouch app
  2. the complete package available through the unit's remote (a led display equipped, also io-homecontrol enabled, battery powered unit)

my question is: are we trying/able to reverse engineer and manage, set (1) or (2) ?
For instance, while the Cozytouch app only allow to switch between programmed and manual mode, the unit's remote allows for a lower level setup where you choose how many cubic meters of air is moved in each mode.
For my use case, managing set (1) is an already great result, but I am willing to help if someone else is going for the big target.

@segaura
Copy link

segaura commented May 1, 2021

Back from the first tests.

  1. all the commands in Preset dropdown (auto, prog, manual) fully work in both directions, e.g. set from ha and aknowledged the change from elsewhere, changed from elsewhere and verified the new state from ha
  2. all the commands in Ventilation dropdown (auto, prog, manual) fully work in both directions;

notes are:

  • Ventilation - high corresponds to Atlantic's "kitchen boost mode"
  • Ventilation - away correctly activates "absence mode" with the only (obvious) difference from the app that the app enforce ufront a start and a finish instant for the mode and ha does not
  • Ventilation - boost works fine and the only difference from the app is that the app shows a countdown of the boost duration, in my case a 30' countdown and ha does not
  1. if I start the "cooling" mode (aka "free-cooling" aka bypass-mode, which is not an active cooling since no compressor is involved) from the app, ha shows I entered a "cooling" mode, but that does not apply the other way around, e.g. if I try to set cooling mode from the ha HVAC widget, it does not trigger free-cooling

@tillstaff
Copy link
Contributor Author

Regarding the "fan only mode" maybe I need to better understand two things:

  • how ha models an hvac system ...and I try to sort out this on my own looking at the documentation
  • if the target here is to make this Atlantic units working or if we want to improve ha modeling for a generic CMV system (other brands have system with inline heater, cooler, dehumidifier, both with compressor and fancoil, etc.)

We choose to use the "Climate" entity to define this device and we have to map the functionality of the device according to HA mechanism. You can find some guidelines here : https://developers.home-assistant.io/docs/core/entity/climate

Regarding the command/sensor/functionalities to map on the custom component, my unit have two set of them:

  1. a small one available through the Cozytouch app
  2. the complete package available through the unit's remote (a led display equipped, also io-homecontrol enabled, battery powered unit)

my question is: are we trying/able to reverse engineer and manage, set (1) or (2) ?
For instance, while the Cozytouch app only allow to switch between programmed and manual mode, the unit's remote allows for a lower level setup where you choose how many cubic meters of air is moved in each mode.
For my use case, managing set (1) is an already great result, but I am willing to help if someone else is going for the big target.

We can only manage (1), because only the API deployed for the Cozytouch app is available. We don't have local access to the Cozytouch bridge.
So the goal of this plugin is to send the same commands as the Cozytouch app.
All the commands and states available for this device are in the first post : https://github.com/iMicknl/ha-tahoma/issues/376#issue-801449031, and it's quite limited compare to what's available in the complete package (2).

@tillstaff
Copy link
Contributor Author

Back from the first tests.

  1. all the commands in Preset dropdown (auto, prog, manual) fully work in both directions, e.g. set from ha and aknowledged the change from elsewhere, changed from elsewhere and verified the new state from ha
  2. all the commands in Ventilation dropdown (auto, prog, manual) fully work in both directions;

Thanks @segaura for your tests!

notes are:

  • Ventilation - high corresponds to Atlantic's "kitchen boost mode"

"Kitchen boost" is not well named, it's just a boost with a lower speed (240m3/h instead of 264m3/h in my case)
Maybe we could remap the FAN MODE like this :

  • HIGH - for boost mode
  • MEDIUM - for kitchen mode
  • AWAY - for away mode
  • BYPASS - for freecooling mode (boost mode with bypass engaged)
  • AUTO - for normal mode
  • Ventilation - away correctly activates "absence mode" with the only (obvious) difference from the app that the app enforce ufront a start and a finish instant for the mode and ha does not

I suppose that there is a planning handled by Cozytouch, so the Overkiz server can send commands to start and stop the away mode at planned hours.
With HA, you can do the same with "Automation".

  • Ventilation - boost works fine and the only difference from the app is that the app shows a countdown of the boost duration, in my case a 30' countdown and ha does not

I don't have this countdown with boost command in the app, but there is a countdown of 60 minutes in the app with the kitchen boost (this countdown doesn't appear on the remote control, so the countdown is handled by Overkiz server). When you launch kitchen boost from the remote control, I have a 30 minutes countdown directly handled by the remote control (can work without cozytouch) but the app did'nt show any timer. It's a little messy!

  1. if I start the "cooling" mode (aka "free-cooling" aka bypass-mode, which is not an active cooling since no compressor is involved) from the app, ha shows I entered a "cooling" mode, but that does not apply the other way around, e.g. if I try to set cooling mode from the ha HVAC widget, it does not trigger free-cooling

It was working for me on some conditions when the temperature from the house is above 22°C (temperature set on my side for the bypass) and when it works there is a countdown of 10 hours visible on the remote control but it stops immediatly if the temperature goes to 22°C. If it stops because of temperature, the API is not updated and the cooling state stay at "on".
I have the same behavior with the app, it's only working with the same conditions. But there is no problem with the remote control, it's working in any case. Maybe there is a problem with the cozytouch API.
Just to know, with the HA plugin, the Cooling mode can be activated only when FAN MODE is on "AUTO".

@iMicknl
Copy link
Owner

iMicknl commented May 3, 2021

Great work, @tillstaff and @segaura. Happy to see such contributions :-).

Just to know, with the HA plugin, the Cooling mode can be activated only when FAN MODE is on "AUTO".

Perhaps we should set fan mode to auto, when you activate cooling mode?

@segaura
Copy link

segaura commented May 3, 2021

  • Ventilation - high corresponds to Atlantic's "kitchen boost mode"

"Kitchen boost" is not well named, it's just a boost with a lower speed (240m3/h instead of 264m3/h in my case)
Maybe we could remap the FAN MODE like this :

  • HIGH - for boost mode
  • MEDIUM - for kitchen mode
  • AWAY - for away mode
  • BYPASS - for freecooling mode (boost mode with bypass engaged)
  • AUTO - for normal mode

For consistency with the app I see no problems if it will be decided to call it kitchen boost.

  • Ventilation - away correctly activates "absence mode" with the only (obvious) difference from the app that the app enforce ufront a start and a finish instant for the mode and ha does not

I suppose that there is a planning handled by Cozytouch, so the Overkiz server can send commands to start and stop the away mode at planned hours.
With HA, you can do the same with "Automation".

  • Ventilation - boost works fine and the only difference from the app is that the app shows a countdown of the boost duration, in my case a 30' countdown and ha does not

I don't have this countdown with boost command in the app, but there is a countdown of 60 minutes in the app with the kitchen boost (this countdown doesn't appear on the remote control, so the countdown is handled by Overkiz server). When you launch kitchen boost from the remote control, I have a 30 minutes countdown directly handled by the remote control (can work without cozytouch) but the app did'nt show any timer. It's a little messy!

I also have not seen it for years because it appears only if you trigger boost and kitchen boost more than a single time.
IMG_20210503_195704.jpg
Just activate kitchen boost and boost immediately after. And it is 60 in my case, also, I wrongly remembered the 30 of the remote unit, as you wrote.

@tillstaff
Copy link
Contributor Author

@iMicknl

Perhaps we should set fan mode to auto, when you activate cooling mode?

You're right, I have set it with the new "Bypass Boost" fan_mode.

@tillstaff
Copy link
Contributor Author

For consistency with the app I see no problems if it will be decided to call it kitchen boost.

I made a new commit with the following remap :
Auto - for normal mode
Home Boost - for boost mode
Kitchen Boost - for kitchen mode
Away - for away mode
Bypass Boost - for freecooling mode (boost mode with bypass engaged)

I also have not seen it for years because it appears only if you trigger boost and kitchen boost more than a single time.
Just activate kitchen boost and boost immediately after. And it is 60 in my case, also, I wrongly remembered the 30 of the remote unit, as you wrote.

With the same trick, I have a 30 minutes countdown with boost. Maybe there is some differences between our units. I have the first generation of the "optimocosy" before it was labeled "optimocosy HR plus".

@segaura : could you retest the last build? https://github.com/tillstaff/ha-tahoma/blob/feature/AtlanticHeatRecoveryVentilation/custom_components/tahoma/climate_devices/atlantic_heat_recovery_ventilation.py
Everything seems to work on my side

@iMicknl : I made a PR for the fixes #438

@segaura
Copy link

segaura commented May 7, 2021

I tested each command in both directions, action in ha and aknowledge in cozytouch app and viceversa.
It works (Thank you).
Today I also noticed a gratly improved responsiveness, app updates to new states after modification in ha very quickly ...dunno if something in the integration is changed regarding this or if something else in my setup is working better today.

Mine is a quite recent model, labeled Optimocosy HR Plus, with cozytouch bridge included in the CMV package and bought in december 2019.

@tillstaff
Copy link
Contributor Author

@segaura Thanks for your feedback!
It's a good news, that the integration is working well with both versions of the Optimocosy.

For the app update, the integration send a refresh command after each set command to force the update of the cozytouch API.

@iMicknl : do you need some changes in the code?

@iMicknl
Copy link
Owner

iMicknl commented May 28, 2021

@tillstaff @segaura I cleaned up some of the code! Let's see if we can add this device to our upcoming release.

Could you give https://github.com/iMicknl/ha-tahoma/archive/refs/heads/feature/AtlanticHeatRecoveryVentilation.zip a try? Extract this file and place custom_components/tahoma in your custom_components folder.

@github-actions
Copy link

github-actions bot commented Jul 2, 2021

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

@segaura
Copy link

segaura commented Jul 2, 2021

I'll be back at home tomorrow and I'll hope I manage to try it and let you know.
With the previous version I noticed some inconsistencies in the last months, like HA reporting always the same state while it was changing by cosytouch app.

@github-actions
Copy link

github-actions bot commented Aug 2, 2021

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

@segaura
Copy link

segaura commented Aug 2, 2021

I had some issue this month with HA upgrades.
Now HA is finally fine but I am still experimenting issues with the custom component, I am on really fresh HA core-2021.9.0.dev20210802 on docker container and component does not start maybe due to this

2021-08-02 08:48:12 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform tahoma.sensor: Platform not found (cannot import name 'ELECTRICAL_CURRENT_AMPERE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).
2021-08-02 08:48:19 ERROR (MainThread) [custom_components.tahoma.climate_devices.atlantic_heat_recovery_ventilation] Unable to update from sensor: could not convert string to float: 'unavailable'
2021-08-02 08:48:19 ERROR (MainThread) [custom_components.tahoma.climate_devices.atlantic_heat_recovery_ventilation] Unable to update from sensor: could not convert string to float: 'unavailable'

do you want me to tweak something or, maybe, try the stable HA version?

@iMicknl
Copy link
Owner

iMicknl commented Aug 2, 2021

@segaura you would need to download the latest version of this branch. Give https://github.com/iMicknl/ha-tahoma/archive/refs/heads/feature/AtlanticHeatRecoveryVentilation.zip a try. Extract this file and place custom_components/tahoma in your custom_components folder.

This should accommodate for the beta fix.

@github-actions
Copy link

github-actions bot commented Sep 3, 2021

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants