Irrigation Hunter X-Core remote control using REM pin

Hi,
Thanks that’s helpful !
Do you use a wemos D1 mini ? I’ve got one but the wifi signal is just catastrophic… even if I soldered the zero resistor in order to use an external antenna… I don’t know what to do, I can’t event ping the board at 5 meters from the box

I use a Wemis D1 Mini Pro. The wifi signal on my board is fine even without soldering the zero resistor.
Maybe your board is faulty, do you have a second board to check this?

Good day, do you happen to have a connection diagram between the Wemos and Hunter? The one linked in the GitHub is leading to a 404 not found.

Looks like the links in the documentation aren’t correct, the image is still there.
hunter-wifi/docs/images/connection.png at master · anubisg1/hunter-wifi · GitHub

Thank you. I’ll have a look.

Hi,
I’m using the ecodina fw on a wemos d1 mini connected to a X-core 601, I’ve been able to use it with REST API, unluckily I’ve not been able to integrate with MQTT.
The strange thing is if i use pre build image found on github the wemos keeps rebooting.
Building from source and uploading the FW then the wemos doesn’t reboot, the API are available but not the MQTT, anyone has been able to do it?

Hi @dehaas

I installed prebuild firmware but do not know how to manage mqtt setup. When I connect to WateringSystemAP I can only setup wifi I want to connect to, not mqtt. Could you please help to solve this? Thank you.

Update:
I installed the old veraion of bin file. Now downloaded the latest one from link below and I am able to add mqtt address. Release New features: MQTT · ecodina/hunter-wifi · GitHub

Thanks @roobaru & @dehaas for posting your work, I’ve created my own version based on mushroom-ui, with custom card which toggles watering and includes countdown timer:

Since mine Hunter XCORE has only 4 zones total (and only 3 wired), I’ve removed extra inputs from the script and added automation to listen to Hunters MQTT topic for command results.

Whole setup is documented on this github repo, for anyone interested.

1 Like

Thanks @empi.sk
But both links in English do not work !
https://github.com/marek-polak/hunter-wifi/blob/e9154a2be7fb64a44dbd69116ab3ffb53e7874da/docs/pages/docs/scripts/irrigation-control.en.yaml
https://github.com/marek-polak/hunter-wifi/blob/e9154a2be7fb64a44dbd69116ab3ffb53e7874da/docs/pages/docs/scripts/custom-button-card-templates.en.yaml

Thank you once again to everyone!
Everything works perfectly but in the logs I have two error
1
Logger: homeassistant.components.automation.mqtt_hook_irrigation
Source: components/automation/init.py:680
Integration: Automation (documentation, issues)
First occurred: 4:54:55 PM (4 occurrences)
Last logged: 4:55:13 PM

Error while executing automation automation.mqtt_hook_irrigation: extra keys not allowed @ data[‘trigger.payload_json’]
2
Logger: homeassistant.components.automation.mqtt_hook_irrigation
Source: helpers/script.py:420
Integration: Automation (documentation, issues)
First occurred: 4:54:55 PM (4 occurrences)
Last logged: 4:55:13 PM

mqtt_hook_Irrigation: Error executing script. Invalid data for call_service at pos 2: extra keys not allowed @ data[‘trigger.payload_json’]

And 3 warnings
1
Logger: homeassistant.components.template.template_entity
Source: components/template/template_entity.py:412
Integration: Template (documentation, issues)
First occurred: 4:54:55 PM (7 occurrences)
Last logged: 4:55:12 PM

Template loop detected while processing event: <Event state_changed[L]: entity_id=switch.irrigate_lawn, old_state=<state switch.irrigate_lawn=off; assumed_state=True, icon=mdi:water-pump-off, friendly_name=Sprinkler On/Off @ 2023-10-04T16:50:32.953936+03:00>, new_state=<state switch.irrigate_lawn=on; assumed_state=True, icon=mdi:water-pump-off, friendly_name=Sprinkler On/Off @ 2023-10-04T16:54:55.315088+03:00>>, skipping template render for Template[{% if is_state(‘switch.irrigate_lawn’, ‘on’) %} mdi:water-pump {% else %} mdi:water-pump-off {% endif %}]
Template loop detected while processing event: <Event state_changed[L]: entity_id=switch.irrigate_lawn, old_state=<state switch.irrigate_lawn=on; assumed_state=True, icon=mdi:water-pump, friendly_name=Sprinkler On/Off @ 2023-10-04T16:54:55.315088+03:00>, new_state=<state switch.irrigate_lawn=off; assumed_state=True, icon=mdi:water-pump, friendly_name=Sprinkler On/Off @ 2023-10-04T16:54:59.291081+03:00>>, skipping template render for Template[{% if is_state(‘switch.irrigate_lawn’, ‘on’) %} mdi:water-pump {% else %} mdi:water-pump-off {% endif %}]
Template loop detected while processing event: <Event state_changed[L]: entity_id=switch.irrigate_lawn, old_state=<state switch.irrigate_lawn=off; assumed_state=True, icon=mdi:water-pump, friendly_name=Sprinkler On/Off @ 2023-10-04T16:54:59.291081+03:00>, new_state=<state switch.irrigate_lawn=on; assumed_state=True, icon=mdi:water-pump, friendly_name=Sprinkler On/Off @ 2023-10-04T16:55:08.987897+03:00>>, skipping template render for Template[{% if is_state(‘switch.irrigate_lawn’, ‘on’) %} mdi:water-pump {% else %} mdi:water-pump-off {% endif %}]
Template loop detected while processing event: <Event state_changed[L]: entity_id=switch.irrigate_lawn, old_state=<state switch.irrigate_lawn=on; assumed_state=True, icon=mdi:water-pump, friendly_name=Sprinkler On/Off @ 2023-10-04T16:55:08.987897+03:00>, new_state=<state switch.irrigate_lawn=off; assumed_state=True, icon=mdi:water-pump, friendly_name=Sprinkler On/Off @ 2023-10-04T16:55:12.589525+03:00>>, skipping template render for Template[{% if is_state(‘switch.irrigate_lawn’, ‘on’) %} mdi:water-pump {% else %} mdi:water-pump-off {% endif %}]

2
Logger: homeassistant.helpers.script.sprinkler_on_off
Source: helpers/script.py:1509
First occurred: 4:54:59 PM (2 occurrences)
Last logged: 4:55:12 PM

Sprinkler On/Off: Already running

3
Logger: homeassistant.components.input_select
Source: components/input_select/init.py:95
Integration: Input select (documentation, issues)
First occurred: 4:50:31 PM (1 occurrences)
Last logged: 4:50:31 PM

Input select ‘Irrigate zone’ with options [‘zone1’, ‘zone2’, ‘zone2’, ‘zone3’, ‘zone4’, ‘zone5’, ‘zone6’, ‘zone7’, ‘zone8’] had duplicated options, the duplicates have been removed

Thank you

Thanks for info - I’ve fixed the links in repository, as well as errors/warnings in the scripts - all but Sprinkler On/Off: Already running, which I think has something to do with timer.irrigation_time_remaining running, but I could use some help.

Thanks empi.sk,
I saw in your version, at the wifi portal there are an extra line to fill that say something like MQTT protocol (0/1) … or something like this, i can connect to mi wifi network but there is no way to ESP connect to the MQTT broqquer running in home assitant, could be something related to that confinguration that i am leaving in gray as it come prefilled? Thanks in advance.

Hi @pjmasci, which version did you flash on the d1? As mentioned in repo, for the mqtt to work, you should use the v1.0.0.
Afterwards, when logged into WateringSystemAP, you should be able to save MQTT settings:

  1. select 1. option “Configure WiFi”

  2. Add ssid/password to your WiFi, and MQTT server connecttion settings

  • server is IP-address or local dns name of your MQTT server, for example raspi3b.local

I’ve tryied the 1.0.0 fw but if I set and enable mqtt my wemos goes in a boot loop. What flashing procedure do you follow?

I’ve used esphome.io website for flashing on 2 boards already - one which is connected to Hunter and actively used and 2nd which is my spare lying around.

Connect the board using usb cable to the PC, select serial device and upload the v1.0.0 binary to the board. If you won’t see a serial port in the list, make sure you connect through a proper data USB-cable.

Sorry I haven’t explained my use case. ATM I’m using a Wemos with the compiled code from git. I’m able to use the device with REST API and the embedded webserver.
If I load the 1.0.0 FW MQTT start working, but as soon as I load the littlefs content with

pio run --target=uploadfs

the wemos goes into a boot loop.

I’d like to have both REST and MQTT working, it seems that the json placed in the data directory (and uploaded to littlefs) break something with 1.0.0

For those interested I’ve found another way to integrate Hunter watering controller that have REM port to HA. There’s a port of opensprinkler for ESP8266 devices with integrated the Hunter REM port functionality.

I’m using this fork that has the same wiring of ecodina esp fw. I’ve tested and it works correctly with my Hunter controller.

The plus are: program running independent from HA, weather integration already embedded in opensprinker, multiple schedule, opensprinkler-HA integration via HACS module (it uses OS REST API so no MQTT is necessary).

This is the repo:

Hi, i tried building the project with platformio, but i encountered some errors, did you do something in specific with platformio?:

Hi, I just compiled with:

pio run -t upload

from a linux shell, I get some warning, but the building process complete and the Wemos get flashed.
I tryied also deleting the .pio folder and the libraries get downloaded and the compiling ends succcesfully.

Hi, yes i tried it on windows and i had to change some files as per this commit: Make firmware PlatformIO compilable by maxgerhardt · Pull Request #158 · OpenSprinkler/OpenSprinkler-Firmware (github.com)