allenporter/pyrainbird

CurrentIrrigationState always returns on

michapr opened this issue · 7 comments

Hi,
I have seen that CurrentIrrigationState is always true (1) - whether or not irrigation is active in a zone.
Any idea?

DEBUG:pyrainbird:Request to line: 3F00
DEBUG:pyrainbird:Sending {"id":1586977103,"jsonrpc":"2.0","method":"tunnelSip","params":{"data":"3F00","length":2}} to 192.168.xxx.yyy, 1. try.
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.xxx.yyy:80
DEBUG:urllib3.connectionpool:http://192.168.xxx.yyy:80 "POST /stick HTTP/1.1" 200 128
DEBUG:pyrainbird:Response: {"jsonrpc": "2.0", "result":{"length":6, "data":"BF0000000000"}, "id": 22863}
DEBUG:pyrainbird:Response from line: BF0000000000
DEBUG:pyrainbird:Response: {'pageNumber': 0, 'activeStations': 0, 'type': 'CurrentStationsActiveResponse'}
DEBUG:pyrainbird:Request to line: 48
DEBUG:pyrainbird:Sending {"id":1586977104,"jsonrpc":"2.0","method":"tunnelSip","params":{"data":"48","length":1}} to 192.168.xxx.yyy, 1. try.
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.xxx.yyy:80
DEBUG:urllib3.connectionpool:http://192.168.xxx.yyy:80 "POST /stick HTTP/1.1" 200 128
DEBUG:pyrainbird:Response: {"jsonrpc": "2.0", "result":{"length":2, "data":"C801"}, "id": 22864}
DEBUG:pyrainbird:Response from line: C801
DEBUG:pyrainbird:Response: {'type': 'CurrentIrrigationStateResponse', 'irrigationState': 1}

I thought it would be false (0) if no irrigation is running?

Thanks!
Michael

I'm also seeing similar behavior....

DEBUG:pyrainbird:Request to line: 48
DEBUG:pyrainbird:Sending {"id":1587352787,"jsonrpc":"2.0","method":"tunnelSip","params":{"data":"48","length":1}} to 192.168.86.249, 1. try.
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.86.249:80
DEBUG:urllib3.connectionpool:http://192.168.86.249:80 "POST /stick HTTP/1.1" 200 128
DEBUG:pyrainbird:Response: {"jsonrpc": "2.0", "result":{"length":2, "data":"C801"}, "id": 5331}
DEBUG:pyrainbird:Response from line: C801
DEBUG:pyrainbird:Response: {'type': 'CurrentIrrigationStateResponse', 'irrigationState': 1}

The result is parsed as is from the controller stick as far a I can recall. I don't have the rainbird installation anymore, so I cannot verify if the behavior changed.

Hi,
the state "rainbird.0.device.irrigation.active" seems to be always true. Even if the switch on the device is set to "Stop".
Is that a failure of my implementation of the adapter or one of the adeapter?
Thanks, Eckart

Hi @jbarrancos ,
Have you created some docs with the API and the response codes?
It would be helpful for us and may help continuing the support for the library
Thanks

API of Rainbird is partly commented in the code. At the moment of development there was no public info about the API. So you’ll have to fiddle arround and see what happens :/

OK got it, thanks @jbarrancos

I am not currently seeing this from my device, so not able to reproduce this. Perhaps this is a bug that has been fixed in firmware updates since 2020?

As for further debugging: I added an example in https://github.com/allenporter/pyrainbird/blob/main/examples/mitm_rainbird.py for how to decode the API responses using mitmproxy.

I am going to close this issue since the original report was a few years ago, but let's reopen in a new issue if you are still seeing this.