Closed thecem closed 4 years ago
Check, same here.
I don't have an obvious idea what the problem could be. It would be really helpful if I could get debug logs for when this happens.
Enable them with this in configuration.yaml
:
logger:
default: info
logs:
custom_components.gardena_smart_system: debug
custom_components.gardena_smart_system.mower : debug
custom_components.gardena_smart_system.sensor : debug
custom_components.gardena_smart_system.switch : debug
custom_components.gardena_smart_system.config_flow : debug
gardena: debug
gardena.smart_system: debug
You probably want to read through the logs and sensor/remove potential secrets before giving them to someone else or attaching it here. If you think it would be better to only give the logs to me, rather than posting them for public, send me an email (see my github profile).
Created a MR, mapping from activity to state (open closed) appears to be fixed. But there is stil an issue.
My logs for an received update:
https://gist.github.com/wijnandtop/d3c39b8e118ce6548f8f2ac5b49b0c5b
do you need more logs ? If yes pls let me know. I updated the files, but no change for the irrigation control.
My log:
activating Rasen wait (switch going off/ Valve stays open) activating Rasen wait (switch going off/ Valve stays open) activating Rasen switch immediate back to off (switch going off/ Valve closes)
I think I've found the issue and fixed it now.
In GardenaSmartIrrigationControl each instance gets a reference to the device and the specific valve that entity represents. The valve is stored as self._valve. That is just a regular dict.
In SmartIrrigationControl.update_device_specific_data() (in py-smart-gardena2) it actually replaces that dict with a new dict:
if device_map["type"] == "VALVE":
self.valves[device_map["id"]] = {
...
The GardenaSmartIrrigationControl entity now only stores the valve_id and looks up the valve information instead.
Since I don't own an irrigation control myself I need help with testing this.
Will give it a try later today :-) thanks!
Thanks a lot to @thecem for the logs and to @wijnandtop for logs and PR. I took @wijnandtop's fix for the activity strings from PR #7.
Too curious to wait... tested... and works perfectly. Changes in the gardena app are reflected in HASS immediately. Watering triggered from HASS results in watering en is also properly reflected in HASS.
d’accord! Works perfect, thanks @wijnandtop and @osks! Let me know if you need other support, log or something else, if I´m able to help I will do!
@wijnandtop if you switch a vlave on, is the switch after 3 sec in HA fliping off and then immediately on again? If you switch it to off, goes it to off and on again (this correct) regarding the valve pressure reduce time out of the gardena irrigation control waits 10 sec and then goes off? Do you have the same behaviour?
@thecem no "Flipping" behaviour here.
Switch on/off from HASS : no flipping switches in HASS. Switching on/off from android app: no flipping switches in HASS.
Changes are immediately visible in both the app and HASS, immediate response at the physical valve.
Ok, I tested this also with older integrations of Gardena, same behaviour. I have one of the first Irrigation controller and first gateway version. Changes are also immediately visible in HA and valve. Only the flickering thing with the switch, but no show stopper.
Thanks a lot!
Thanks for this Integration!
A valve of the irrigation control could be activated via switch. And the valve could be closed if you activate the switch an deactivate it within 3 sec. Afterwards the switch go to off and don't represent the status of the valve.
If you need logs, let me know.