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

Stop command not working on Pro-C #8

Open
loopy321 opened this issue Sep 24, 2021 · 9 comments
Open

Stop command not working on Pro-C #8

loopy321 opened this issue Sep 24, 2021 · 9 comments

Comments

@loopy321
Copy link

Can anyone confirm whether the STOP command is working? I am able to start zones, but when I try to stop the water keeps flowing and the status returned seems ok. This is a Hunter Pro-C.

i.e.:

curl http://192.168.2.184/api/start/zone/2?time=2 (starts the zone as expected)

curl http://192.168.2.184/api/stop/zone/2

{"status": "Request received and processed correctly." ... }

@anubisg1
Copy link
Contributor

I use an hunter x-core and stop works just fine for me

https://www.hunterindustries.com/en-metric/irrigation-product/controllers/x-coretm

Also remember that the hunter protocol is a one way communication protocol. Meaning that the message you receive is your esp saying that it received your command and that it sent it out of its pin, but it cannot tell you if the sprinkler got it, nor what the real status is

@loopy321
Copy link
Author

loopy321 commented Sep 25, 2021

Thanks for confirming it works for you. With more troubleshooting, I have found that I can start and stop zone 1 as expected, but with any other zones although I can successfully start them (i.e. 2, 3, 4, ... 14), when I try to stop them the controller screen shows "E:RR" . Maybe there is a slight difference in the byte sequence among controllers?

Looking at the HunterRoam.cpp it looks like the stop command does a "startZone" with time=0, so that might narrow the problem to lines 177-182 which use time.

@ecodina
Copy link
Owner

ecodina commented Sep 25, 2021

I also have a Hunter Pro-C and the last time I tested it I could successfully stop all zones.

Maybe you could check https://github.com/seb821/OpenSprinkler-Firmware-Hunter to see if they also have this issue.

@loopy321
Copy link
Author

Thanks for the response. I looked at the seb821 code and found the following comment stating:
"Hunter protocol doesn't work on bytes, but on combination of 4, 9 and 12 (not used here) bit numbers."

I am no expert in the protocol ... or any of this :), but looks like there might be a problem with the HunterRoam::startZone constuction... Maybe something can be derived from this approach https://github.com/gashtaan/hunter-xcore-firmware @gashtaan

@gashtaan
Copy link

@bobhavlin the approach you mentioned is my project of alternative firmware for X-Core units, it's completely different than original one.

Though, I have partially reverse engineered original firmware so I have an idea how it works. I commented seb821's code, but seems he didn't notice it.

@loopy321
Copy link
Author

@gashtaan Thanks for the comment and reverse engineering! I was hoping to use your insight in to the protocol for a fix - Any idea why the stop command here might not work in my case?

@gashtaan
Copy link

gashtaan commented Sep 26, 2021

@bobhavlin sorry, I have no idea. I don't have any experience with Pro-C units.

X-Core seems to be dumber, it receives the packet from seb821's code OK, but ignores most of it. To start zone on X-Core unit should be enough to send:
11111111/0 10000000/0 ---- 0-------/0 TLTL 1-------/0 THTH 00000000/1 ZZZZ 01111111/

TLTL - time lower nibble
THTH - time upper nibble
ZZZZ - zone number
bits marked '-' are ignored

Note, that this is just a theory... I looked at the code, but never used it or tested it.

@ecodina
Copy link
Owner

ecodina commented Sep 26, 2021

@gashtaan Thank you for your input. Although I am an engineer, I do not have an extensive background in electronics.

According to seb821's code, he supports up to 48 stations. However, from your packet I can see than only 16 are supported. I guess this is a difference between X-Core and Pro-C.

@gashtaan
Copy link

@ecodina yes, I am aware of this difference, X-Core supports only up to 8 stations at hardware level, so 4 bits in the packet are enough.

Just wanted to point out that X-Core actually parse different part of the packet, so I can't help with Pro-C devices. Maybe there is some compatibility between them and Pro-C understands the simpler packet for stations 1-16, but I'm afraid command number (00000000/1) in the packet does matter and I don't know it.

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

No branches or pull requests

4 participants