make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.29k stars 505 forks source link

Remora Inverter Swimming Pool Heat Pump sort of working. #15

Closed paulmfclark closed 3 years ago

paulmfclark commented 3 years ago

Hi,

Great work on this integration. I have a Remora Inverter Swimming Pool Heat Pump that uses the Tuya smart life app and it is mostly working using the standard heater type.

This is a link to the heatpump https://www.automatedenvironmentalsystems.co.uk/product/remora-inverter-swimming-pool-heat-pump/

Had to add it to configuration.yaml to get it to show up but then Integration is able to power on and off and read current temp. Not able to set target temp or change heating modes.

I have pulled the DPS IDs with tuya-cli and worked out all of the values which are as follows

dps":{"1":true,"2":30,"3":30,"4":"heat","9":0}

1 - On Off - r/w true = On, false = Off 2 - Desired Temp - r/w in C 3 - Current Temp - r/o 4 - Heating mode - r/w - heat = Smart Heating Mode, h_powerful = Powerful Heating Mode, h_silent = Silent Heating Mode , cool = Smart Cooling Mode, c_powerful = Powerful Cooling Mode 9 - Error codes - 0 = OK, 1 = Water Flow protection

Would it be possible to add this type of heater to the library. If you can what other info would be required?

make-all commented 3 years ago

I think the only other info required is the range for the desired temperature.

I would expect the desired temperature to work within the range of overlap between the Goldair GPPH's 5-35 and whatever the range is for your heater. Probably it gets an error if you try to go too low though.

I am currently refactoring to use generic classes instead of one for every new device that is supported. What I will do is add a configuration file for this device, and when the generic climate class is ready, it will be supported.

paulmfclark commented 3 years ago

The desired temp range is 5 to 40.

The Control when added to the dashboard does not give an option to set the desired temp. If a preset is selected then the temp selector shows up but then the following error occurs and it switches back to heat mode.

2021-05-23 12:21:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140408743755680] None Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 167, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 548, in async_service_temperature_set await entity.async_set_temperature(**kwargs) File "/config/custom_components/tuya_local/heater/climate.py", line 136, in async_set_temperature await self.async_set_target_temperature(kwargs.get(ATTR_TEMPERATURE)) File "/config/custom_components/tuya_local/heater/climate.py", line 145, in async_set_target_temperature limits = self._TEMPERATURE_LIMITS[preset_mode] KeyError: None

Screenshot 2021-05-23 at 12 21 44

Screenshot 2021-05-23 at 12 20 07

make-all commented 3 years ago

The Goldair "heater" type has a dependence on the preset for the allowed temperature range. Simpler options that might work better are "gsh_heater" and "purline_m100_heater", which also match the first three dps ids, but do not have any complexity in their temperature setting. gsh_heater is probably the best match, as its range is 5-35. purline is 15-35 so will have a reduced range.

paulmfclark commented 3 years ago

The gsh_heater type allows changing the desired temp. I didn't spot the similarity of this device for the first three dps ids. Thanks for the pointer.