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

Rainbird: Entity no longer being provided by the rainbird integration #101470

Closed
adorobis opened this issue Oct 5, 2023 · 47 comments · Fixed by #101512 or #101599
Closed

Rainbird: Entity no longer being provided by the rainbird integration #101470

adorobis opened this issue Oct 5, 2023 · 47 comments · Fixed by #101512 or #101599
Assignees

Comments

@adorobis
Copy link

adorobis commented Oct 5, 2023

The problem

After upgrade to 2023.10.0 rainbird entities are no longer available and all of the entities are in "no longer being provided by the rainbird integration" state. No errors in the log. Attached is the debug log.

What version of Home Assistant Core has the issue?

core-2023.10.0

What was the last working version of Home Assistant Core?

core-2023.9.3

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Rainbird

Link to integration documentation on our website

https://www.home-assistant.io/integrations/rainbird/

Diagnostics information

There is no option to download diagnostic data for rainbird integration.

Example YAML snippet

N/A

Anything in the logs that might be useful for us?

2023-10-05 14:24:29.978 DEBUG (MainThread) [pyrainbird.async_client] Request (ModelAndVersionRequest): 02
2023-10-05 14:24:29.978 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696508669.9787104, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "02", "length": 1}}
2023-10-05 14:24:31.153 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":5, "data":"8200060100"}, "id": 0}
2023-10-05 14:24:31.153 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8200060100
2023-10-05 14:24:31.153 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'ModelAndVersionResponse', 'modelID': 6, 'protocolRevisionMajor': 1, 'protocolRevisionMinor': 0}
2023-10-05 14:24:31.153 DEBUG (MainThread) [pyrainbird.async_client] Request (AvailableStationsRequest): 0300
2023-10-05 14:24:31.153 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696508671.1536999, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "0300", "length": 2}}
2023-10-05 14:24:31.814 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"8300FF000000"}, "id": 0}
2023-10-05 14:24:31.814 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8300FF000000
2023-10-05 14:24:31.814 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'AvailableStationsResponse', 'pageNumber': 0, 'setStations': 4278190080}
2023-10-05 14:24:31.814 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentStationsActiveRequest): 3F00
2023-10-05 14:24:31.814 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696508671.8145082, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3F00", "length": 2}}
2023-10-05 14:24:32.204 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"BF0000000000"}, "id": 0}
2023-10-05 14:24:32.204 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BF0000000000
2023-10-05 14:24:32.204 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentStationsActiveResponse', 'pageNumber': 0, 'activeStations': 0}
2023-10-05 14:24:32.204 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentRainSensorStateRequest): 3E
2023-10-05 14:24:32.204 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696508672.204303, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3E", "length": 1}}
2023-10-05 14:24:32.599 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":2, "data":"BE00"}, "id": 0}
2023-10-05 14:24:32.599 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BE00
2023-10-05 14:24:32.599 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentRainSensorStateResponse', 'sensorState': 0}
2023-10-05 14:24:32.599 DEBUG (MainThread) [pyrainbird.async_client] Request (RainDelayGetRequest): 36
2023-10-05 14:24:32.599 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696508672.5997853, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "36", "length": 1}}
2023-10-05 14:24:33.049 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":3, "data":"B60000"}, "id": 0}
2023-10-05 14:24:33.049 DEBUG (MainThread) [pyrainbird.async_client] Response from line: B60000
2023-10-05 14:24:33.049 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'RainDelaySettingResponse', 'delaySetting': 0}

Additional information

Works ok again after downgrading HA to 2023.9.3

@home-assistant
Copy link

home-assistant bot commented Oct 5, 2023

Hey there @konikvranik, @allenporter, mind taking a look at this issue as it has been labeled with an integration (rainbird) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of rainbird can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign rainbird Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


rainbird documentation
rainbird source
(message by IssueLinks)

@allenporter
Copy link
Contributor

Hi @adorobis appreciate filing the separate broken out issue.

Can you help me by finding a little more detail in the logs from rainbird? This subset shows Rainbird requests to the device that appear to be working fine. Perhaps with debug mode on reloading the integration may give us a little more insight to what is happening at integration start that is not registering the entities.

@allenporter
Copy link
Contributor

The main change in this release is related to the devices with no serial number and assignment of unique ids.
#101168 though the intent is to preserve things for existing configurations.

@tieskuh
Copy link

tieskuh commented Oct 5, 2023

I have the same issue (also after upgrading to 2023.10.0 from 2023.9.3)
image

@adorobis
Copy link
Author

adorobis commented Oct 5, 2023

Hi @adorobis appreciate filing the separate broken out issue.

Can you help me by finding a little more detail in the logs from rainbird? This subset shows Rainbird requests to the device that appear to be working fine. Perhaps with debug mode on reloading the integration may give us a little more insight to what is happening at integration start that is not registering the entities.

Here it is with debug logging and reload of the integration. More or less the same as in the previous ones. Seems it is getting data correctly from rainbird controller but somewhere in HA it is lost. Btw, this is example from a different instance running 2023.10.0 where the rainbird integration was not existing before. Entities were not created at all.

2023-10-05 17:52:41.139 DEBUG (MainThread) [pyrainbird.async_client] Request (ModelAndVersionRequest): 02
2023-10-05 17:52:41.139 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521161.139403, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "02", "length": 1}}
2023-10-05 17:52:41.486 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":5, "data":"8200060100"}, "id": 0}
2023-10-05 17:52:41.486 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8200060100
2023-10-05 17:52:41.486 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'ModelAndVersionResponse', 'modelID': 6, 'protocolRevisionMajor': 1, 'protocolRevisionMinor': 0}
2023-10-05 17:52:41.486 DEBUG (MainThread) [pyrainbird.async_client] Request (AvailableStationsRequest): 0300
2023-10-05 17:52:41.486 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521161.486918, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "0300", "length": 2}}
2023-10-05 17:52:41.840 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"8300FF000000"}, "id": 0}
2023-10-05 17:52:41.840 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8300FF000000
2023-10-05 17:52:41.840 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'AvailableStationsResponse', 'pageNumber': 0, 'setStations': 4278190080}
2023-10-05 17:52:41.841 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentStationsActiveRequest): 3F00
2023-10-05 17:52:41.841 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521161.841271, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3F00", "length": 2}}
2023-10-05 17:52:42.194 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"BF0000000000"}, "id": 0}
2023-10-05 17:52:42.194 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BF0000000000
2023-10-05 17:52:42.194 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentStationsActiveResponse', 'pageNumber': 0, 'activeStations': 0}
2023-10-05 17:52:42.195 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentRainSensorStateRequest): 3E
2023-10-05 17:52:42.195 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521162.195211, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3E", "length": 1}}
2023-10-05 17:52:42.531 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":2, "data":"BE00"}, "id": 0}
2023-10-05 17:52:42.531 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BE00
2023-10-05 17:52:42.531 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentRainSensorStateResponse', 'sensorState': 0}
2023-10-05 17:52:42.532 DEBUG (MainThread) [pyrainbird.async_client] Request (RainDelayGetRequest): 36
2023-10-05 17:52:42.532 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521162.532154, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "36", "length": 1}}
2023-10-05 17:52:42.880 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":3, "data":"B60000"}, "id": 0}
2023-10-05 17:52:42.881 DEBUG (MainThread) [pyrainbird.async_client] Response from line: B60000
2023-10-05 17:52:42.881 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'RainDelaySettingResponse', 'delaySetting': 0}
2023-10-05 17:52:42.881 DEBUG (MainThread) [homeassistant.components.rainbird.coordinator] Finished fetching 10.144.1.121 data in 1.395 seconds (success: True)

@adorobis
Copy link
Author

adorobis commented Oct 5, 2023

And here on an instance where rainbird was there on 2023.9.3 and upgraded to 2023.10.0:

2023-10-05 18:03:07.747 DEBUG (MainThread) [pyrainbird.async_client] Request (ModelAndVersionRequest): 02
2023-10-05 18:03:07.747 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521787.7475102, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "02", "length": 1}}
2023-10-05 18:03:08.098 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":5, "data":"8200060100"}, "id": 0}
2023-10-05 18:03:08.098 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8200060100
2023-10-05 18:03:08.098 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'ModelAndVersionResponse', 'modelID': 6, 'protocolRevisionMajor': 1, 'protocolRevisionMinor': 0}
2023-10-05 18:03:08.099 DEBUG (MainThread) [pyrainbird.async_client] Request (AvailableStationsRequest): 0300
2023-10-05 18:03:08.099 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521788.0994291, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "0300", "length": 2}}
2023-10-05 18:03:08.499 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"8300FF000000"}, "id": 0}
2023-10-05 18:03:08.499 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8300FF000000
2023-10-05 18:03:08.499 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'AvailableStationsResponse', 'pageNumber': 0, 'setStations': 4278190080}
2023-10-05 18:03:08.499 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentStationsActiveRequest): 3F00
2023-10-05 18:03:08.499 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521788.4995015, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3F00", "length": 2}}
2023-10-05 18:03:08.843 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"BF0000000000"}, "id": 0}
2023-10-05 18:03:08.843 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BF0000000000
2023-10-05 18:03:08.843 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentStationsActiveResponse', 'pageNumber': 0, 'activeStations': 0}
2023-10-05 18:03:08.843 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentRainSensorStateRequest): 3E
2023-10-05 18:03:08.843 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521788.843746, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3E", "length": 1}}
2023-10-05 18:03:09.179 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":2, "data":"BE00"}, "id": 0}
2023-10-05 18:03:09.179 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BE00
2023-10-05 18:03:09.179 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentRainSensorStateResponse', 'sensorState': 0}
2023-10-05 18:03:09.179 DEBUG (MainThread) [pyrainbird.async_client] Request (RainDelayGetRequest): 36
2023-10-05 18:03:09.179 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696521789.1798565, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "36", "length": 1}}
2023-10-05 18:03:09.533 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":3, "data":"B60000"}, "id": 0}
2023-10-05 18:03:09.534 DEBUG (MainThread) [pyrainbird.async_client] Response from line: B60000
2023-10-05 18:03:09.534 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'RainDelaySettingResponse', 'delaySetting': 0}
2023-10-05 18:03:09.534 DEBUG (MainThread) [homeassistant.components.rainbird.coordinator] Finished fetching 10.144.1.121 data in 1.435 seconds (success: True)

@allenporter
Copy link
Contributor

Very odd.

In #101489 the user reports that the entities are disabled. Perhaps you can look for that? Do any of the entities appear in developer tools?

In my instance when running with logging turned up i see these:

2023-10-05 20:25:41.027 INFO (MainThread) [homeassistant.setup] Setting up rainbird
2023-10-05 20:25:41.027 INFO (MainThread) [homeassistant.setup] Setup of domain rainbird took 0.0 seconds
...
2023-10-05 20:25:48.594 INFO (MainThread) [homeassistant.components.switch] Setting up switch.rainbird
2023-10-05 20:25:48.615 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.rainbird
2023-10-05 20:25:48.618 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.rainbird
2023-10-05 20:25:48.619 INFO (MainThread) [homeassistant.components.number] Setting up number.rainbird
2023-10-05 20:25:48.620 INFO (MainThread) [homeassistant.components.calendar] Setting up calendar.rainbird

Do any of those show up earlier in the log? I suspect the calendar one will not because that device has no programs.

@konikvranik
Copy link
Contributor

For me, after upgrade and fixing the pydantic issue, rainbird didn't reconnect to existing entities. So I tried to remove the reinbird integration and setup it again, but now it doesn't detect any of sprinklers neither sensor and I guess neither controller. I thing it should be also separate entity under the integration:
image

@allenporter
Copy link
Contributor

@konikvranik Does it show up if you search for any of the entities from Devices & Services > Entities? I am wondering if there are entities but they are not linked into the integration or disabled.

@konikvranik
Copy link
Contributor

konikvranik commented Oct 6, 2023

@allenporter: You're right. There are new entities not connected to the integration and saying the it has not unique ID:
image

@allenporter
Copy link
Contributor

OK thank you -- This was not intentional and I have #101470 to fix. The problem is the devices have a "0" serial number which is not a valid unique id, but I'll send a fix to keep ti working for the existing entities for folks that already have it setup.

@adorobis
Copy link
Author

adorobis commented Oct 6, 2023

@allenporter Great, thanks! Let us know when we could test it, I have additional HA instances for testing purposes.

@gillesvs
Copy link

gillesvs commented Oct 6, 2023

OK thank you -- This was not intentional and I have #101470 to fix. The problem is the devices have a "0" serial number which is not a valid unique id, but I'll send a fix to keep ti working for the existing entities for folks that already have it setup.

Many thanks Allen,

In addition, for the time being, the new entities which are not linked to the integration are nevertheless working (eg: switch.rain_bird_sprinkler_1) but they have no unique Id, so I cannot manage them in the UI to match the old_name before updating so that my configuration still works)
Anyway I can make this work ?

Great integration otherwise, save my day ;-)

@adorobis
Copy link
Author

adorobis commented Oct 6, 2023

Anyway I can make this work ?

I have just reverted to 2023.9.3 while waiting for the fix to come :) Super easy if you are on a Docker installation.

@ThomasBergholdWieser
Copy link

Also super easy in regular HA, as the update that broke it creates a backup before, you can just revert to that, skip the impending update and wait for the fix. Thats what i am doing as well. Thanks for the fast response and fix. My issue is the exact same as @adorobis, not the cython/python issue that was mentioned.

@konikvranik
Copy link
Contributor

I wasn't capable of reverting to working HA, even by completely removing the venv and recreating a new one with 2023.9.3. Pydantic was failing there again regardless of whether it was 1.10.12 or 1.10.13 or 1.10.11. The only possible fix is to enforce pydantic 2.4.* which fixes the crucible integrations, but at least disables Google calls integration.

@ThomasBergholdWieser
Copy link

I wasn't capable of reverting to working HA, even by completely removing the venv and recreating a new one with 2023.9.3. Pydantic was failing there again regardless of whether it was 1.10.12 or 1.10.13 or 1.10.11. The only possible fix is to enforce pydantic 2.4.* which fixes the crucible integrations, but at least disables Google calls integration.

As far as i understand. these are different issues

@konikvranik
Copy link
Contributor

I was just replying to your comment regarding rollback.

@adorobis
Copy link
Author

adorobis commented Oct 6, 2023

@allenporter
I've just applied the changes from this PR to my test environment, it did not fix the existing integration. I've deleted it and added again and there are no entities linked to the integration:
image
But they are created and now working ok:
image
image
And here is the debug log:

2023-10-06 10:06:21.724 DEBUG (MainThread) [pyrainbird.async_client] Request (ModelAndVersionRequest): 02
2023-10-06 10:06:21.724 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696579581.7246547, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "02", "length": 1}}
2023-10-06 10:06:22.095 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":5, "data":"8200060100"}, "id": 0}
2023-10-06 10:06:22.095 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8200060100
2023-10-06 10:06:22.095 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'ModelAndVersionResponse', 'modelID': 6, 'protocolRevisionMajor': 1, 'protocolRevisionMinor': 0}
2023-10-06 10:06:22.096 DEBUG (MainThread) [pyrainbird.async_client] Request (AvailableStationsRequest): 0300
2023-10-06 10:06:22.096 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696579582.0961888, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "0300", "length": 2}}
2023-10-06 10:06:22.453 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"8300FF000000"}, "id": 0}
2023-10-06 10:06:22.453 DEBUG (MainThread) [pyrainbird.async_client] Response from line: 8300FF000000
2023-10-06 10:06:22.453 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'AvailableStationsResponse', 'pageNumber': 0, 'setStations': 4278190080}
2023-10-06 10:06:22.454 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentStationsActiveRequest): 3F00
2023-10-06 10:06:22.454 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696579582.4542468, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3F00", "length": 2}}
2023-10-06 10:06:22.848 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"BF0000000000"}, "id": 0}
2023-10-06 10:06:22.849 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BF0000000000
2023-10-06 10:06:22.849 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentStationsActiveResponse', 'pageNumber': 0, 'activeStations': 0}
2023-10-06 10:06:22.849 DEBUG (MainThread) [pyrainbird.async_client] Request (CurrentRainSensorStateRequest): 3E
2023-10-06 10:06:22.849 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696579582.8491552, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "3E", "length": 1}}
2023-10-06 10:06:23.186 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":2, "data":"BE00"}, "id": 0}
2023-10-06 10:06:23.186 DEBUG (MainThread) [pyrainbird.async_client] Response from line: BE00
2023-10-06 10:06:23.186 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'CurrentRainSensorStateResponse', 'sensorState': 0}
2023-10-06 10:06:23.186 DEBUG (MainThread) [pyrainbird.async_client] Request (RainDelayGetRequest): 36
2023-10-06 10:06:23.186 DEBUG (MainThread) [pyrainbird.async_client] Request: {"id": 1696579583.186419, "jsonrpc": "2.0", "method": "tunnelSip", "params": {"data": "36", "length": 1}}
2023-10-06 10:06:23.541 DEBUG (MainThread) [pyrainbird.async_client] Response: {"jsonrpc": "2.0", "result":{"length":3, "data":"B60001"}, "id": 0}
2023-10-06 10:06:23.542 DEBUG (MainThread) [pyrainbird.async_client] Response from line: B60001
2023-10-06 10:06:23.542 DEBUG (MainThread) [pyrainbird.async_client] Response: {'type': 'RainDelaySettingResponse', 'delaySetting': 1}
2023-10-06 10:06:23.542 DEBUG (MainThread) [homeassistant.components.rainbird.coordinator] Finished fetching 10.144.1.121 data in 1.446 seconds (success: True)
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None
2023-10-06 10:06:23.545 DEBUG (MainThread) [homeassistant.components.rainbird.switch] coordinator.unique_id=None

@adorobis
Copy link
Author

adorobis commented Oct 6, 2023

BTW, one additional observation. After applying the fix to the instance where Rainbird was already set up I could see now new entities created, working ok, but not linked to the integration. Here is how it looks like. Those in the red status are the ones linked to the integration but not working:
image

@luixal
Copy link

luixal commented Oct 6, 2023

Hi,

I hit the same issue. My previous devices and entites are still linked to the integration, but they are no longer provided so they don't work. I got new entities (but no devices) created by the integration that work just fine, but are not linked to the integration or any device:

image

Also, new entities do not have a unique ID, so they can't be configured from the UI (icon, name, etc.).

Will the fix take back old entities or will keep the new ones?

Thanks!

@ThomasBergholdWieser
Copy link

Yeah, unfortunatly this fix doesn't seem to adress all the issues. Should this bug then be reopened?

@allenporter
Copy link
Contributor

Rainbird devices with a zero serial number dont have a unique id so they will not be able to work from the UI going forward. The entities are all there but not UI editable. (Like it used to be). This needed to be fixed do that users could add multiple devices (another issue reported by users).

The fix I submitted will make it keep working if you did have it editable.

If you delete the integration and re add it then they won't be editable from the UI anymore and the fix won't apply anymore.

There may be other ways to give these devices a unique id be using another identifier likesc address but it may require cloud rpcs which are not used today.

I will look closer at the details you reported here.

@ThomasBergholdWieser
Copy link

@allenporter Do i understand that correct that right now, this leaves existing users with an inoperable setup or they need to stay on the previous HA version? As i understand it, there is no way to make it work like it used to, even with this patch, correct?

@adorobis
Copy link
Author

adorobis commented Oct 6, 2023

Oh, now I get it. Maybe as the easiest way we could simply take the IP address of the controller (or better MAC address if possible)? And anyway even if we can't have the unique IDs would be good to keep existing entity_ids for controllers that are already integrated with HA.

@luixal
Copy link

luixal commented Oct 6, 2023

Why don't generate the unique id for these devices? There would be several ways:

  • Random generation.
  • Using mac address of the controller as @adorobis said and adding a sequence number for zone matching.
  • Even a sequencial fixed value (in case you have many controllers) would work.

Cheers!

@allenporter allenporter reopened this Oct 6, 2023
@allenporter
Copy link
Contributor

allenporter commented Oct 6, 2023

@allenporter Do i understand that correct that right now, this leaves existing users with an inoperable setup or they need to stay on the previous HA version? As i understand it, there is no way to make it work like it used to, even with this patch, correct?

(1) Restoring old behavior for existing configurations
The intent is the patch makes it work like it used to where entities are created with the original but incorrect unique id using "0" as the unique id from the serial number. If you are saying it didn't restore original behavior, that isn't the intent, so I've re-opened the issue to look closer.

(2) New integration behavior
If you delete the integration and re-add it then the patch will not help you. New setup of the integration has a new behavior that can't allow edits from the UI because the old approach of determining the unique ID is not valid, determined while investigating #99240. (BTW, this is the old behavior of the integration before it was rewritten in the last year to support unique ids). I do not recommend deleting the integration if you want the old behavior in (1).

(3) Paths forward for unique id
As I said above "There may be other ways to give these devices a unique id be using another identifier likesc address but it may require cloud rpcs which are not used today." -- but "likesc" should have been "mac address" sorry bad autocomplete. There are specific rules for config entry unique ids and entities. Many of the ideas proposed would technically work are but not at all valid uses of unique ids -- like "0". Not sure I need help here unless you are already a developer familiar with the rules and the APIs provided by rainbird (which are few), but as I mentioned already have an idea there.

@allenporter
Copy link
Contributor

Regarding (3) above, if folks want to help me understand what's possible for your devices I've created an issue where we can discuss it further as we need to learn more about what is capable of your device:
allenporter/pyrainbird#270

(For example, it doesn't support serial numbers.. so what else doesn't it support?) Join me there and we can figure something out.

@adorobis
Copy link
Author

adorobis commented Oct 6, 2023

(1) Restoring old behavior for existing configurations

OK, clear now. Indeed I'd like to restore the old behaviour for my existing integration. At the moment the patch did not help.

@tieskuh
Copy link

tieskuh commented Oct 7, 2023

With version 2023.10.1 the sprinkelers are working again but the rainsensor is still unavailable.

image

@allenporter
Copy link
Contributor

@tieskuh if its showing on the device then I believe that means the unique id is back, and the entities are now associated properly. Perhaps you can file another issue report to track down why its unavailable? with fill issue template, error logs, etc.

@adorobis Now that you deleted the integration, it will have new behavior in 2023.10.1. You'll likely have to wait for another release to include unique ids that come from the new cloud API and wifi settings (I am not sure sure that will be ok to fit into a patch release). If you want old behavior you need to setup the integration in 2023.9.3 then upgrade to 2023.10.1 then we can look closer at why the new build did not work for you.

Others, curious if 2023.10.1 restores the old behavior (assuming you did not delete the integration!)

@tieskuh
Copy link

tieskuh commented Oct 7, 2023

@allenporter For the sprinkelers the old behaviour is back. I didn't delete the integration and waited for your update. After updating the sprinklers came back again.

For the rain sensor it seems the problem isn't fixed yet. There is a second sensor created that is not associated with the device
image

image

I can create a new issue for that, but it seems that it is related, right?

@allenporter
Copy link
Contributor

@tieskuh yes, looks related. I believe the confusion on my part is from sensor vs binary sensor. Will take a look.

@luixal
Copy link

luixal commented Oct 7, 2023

In my case (i got new entities without unique id that worked and didn't delete the old ones), old sprinklers are back too.

I think those devices have been re-created as they have no registry at all.

My rainsensor is disabled, but I don't have one connected 🤣

Thanks for solving it so fast!

@allenporter
Copy link
Contributor

OK thanks, i see the bug with the binary sensor rainsensor, it was omitted from my previous PR.

@allenporter
Copy link
Contributor

Also, i'm making progress on the mac address fix so we'll have a permanent solution.

@allenporter
Copy link
Contributor

Thanks folks for your patience on this.

The mac address fixes will likely land in a future release like 2023.11 given they are a bit larger.

@adorobis
Copy link
Author

adorobis commented Oct 7, 2023

Now that you deleted the integration, it will have new behavior in 2023.10.1

Hmm, I have not deleted the integration, I've just upgraded one of my instances from 2023.9.3 to 2023.10.1 and the entities linked to the rainbird integration are all unavailable and duplicate ones have been created:
image
So for me it still does not work as it should. I have my productive instance still on 2023.9.3 - not sure to upgrade until it does not work on a test instance.

I can easily replicate the behaviour: on 2023.9.3 I added the rainbird integration - all works as expected, entities are working and are linked to the integration and respective devices. Then I upgraded to 2023.10.1 and those old entities are all unavailable and duplicated ones, not linked to the integration are created (and working ok) - as per the image above. So not sure if the 2023.10.1 fixes anything (not from my perspective at least).
Or have I misunderstood something?

@ThomasBergholdWieser
Copy link

@allenporter So when i apply the coming patch, will my setup work without any additional changes needed? i have a very complex setup with custom schedules and automations aso, and id rather wait for 2023.11 to be honest, If applying this new patch (which i assume would be 2023.10.2, not 2023.10.1) means redoing my setup.

Anyway, thanks for all the fast fixes and keeping us up to date!

@allenporter
Copy link
Contributor

Correct, from #101470 (comment) I realized what was missing and this is fixed in #101599 scheduled for a follow up patch.

I've sent #101603 which will use a mac address for existing cases that had a "zero" serial, but i'm targeting 2023.11 for that.

@allenporter
Copy link
Contributor

@ThomasBergholdWieser my intent is that you should not need to change anything, and home assistant fixes will get you back into the state they were before. In general, we want users to get repaired with no action on their part.

If you didn't change anything, the .1 patch was not complete and I expect it to be fixed in .2.
If you did delete the integration and re-add then 2023.11 will get it working again as before.

@luixal
Copy link

luixal commented Oct 7, 2023

Now that you deleted the integration, it will have new behavior in 2023.10.1

Hmm, I have not deleted the integration, I've just upgraded one of my instances from 2023.9.3 to 2023.10.1 and the entities linked to the rainbird integration are all unavailable and duplicate ones have been created: image So for me it still does not work as it should. I have my productive instance still on 2023.9.3 - not sure to upgrade until it does not work on a test instance.

I can easily replicate the behaviour: on 2023.9.3 I added the rainbird integration - all works as expected, entities are working and are linked to the integration and respective devices. Then I upgraded to 2023.10.1 and those old entities are all unavailable and duplicated ones, not linked to the integration are created (and working ok) - as per the image above. So not sure if the 2023.10.1 fixes anything (not from my perspective at least). Or have I misunderstood something?

@adorobis this was exactly my case and everything is back once updated :)

@gillesvs
Copy link

gillesvs commented Oct 7, 2023

Same for me. The fix did not fix 😉

@allenporter
Copy link
Contributor

allenporter commented Oct 7, 2023

Correct, please see above. #101470 (comment)

@adorobis
Copy link
Author

Just installed the 2023.10.2 and I can confirm that it works as expected now. Many thanks!

@btaczala
Copy link

btaczala commented Oct 16, 2023

Same here, entities are properly populated, though Integration entries still reports "No devices or entities", but the entities are there. A minor inconvenience. Thanks a lot @allenporter

@allenporter
Copy link
Contributor

Thanks. We'll get it working connected through the UI to the integration entires in a follow up.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
8 participants