Holman WiFi Tap timers intergration?

{ dps:
   { '101': 0,    // air temperature
     '102': 0,    // soil moisture
     '103': 4,    // amount of water used last time
     '105': '2',
     '106': '1',   // 1 when runs water, 0 when stopped, 3 when stoped and time/rain delay active
     '107': 4,     // minutes set for manual run, up to 60 (starts with 108)
     '108': false, // starts manual countdown when false
     '113': '48',  // delay to skip
     '114': '24',  // don't know
     '115': false, // presence of soil sensor
     '116': false, // presence of rain sensor? (guess)
     '117': true,  // presence of TAP? (guess)
     '119': '1',   // 1 = litres/C 2 = Gal/F
     '120': 0,     // amount of rain? (guess)
     '125': false, // pause due to high soil moisture
     '127': 'HOL9-018-023-000-000' },
  cid: '131' }

2 Likes

I think I figured it out

3 Likes

I have a bluetooth Holman tap timer. I donā€™t remember the model number as Iā€™ve had it for a few years now. I got it integrated with the SIP irrigation software, which I ran on a Raspberry Pi Zero W which I located inside the house not far from the tap.

The code could probably be adapted to work with MQTT and hence HA pretty easily. I can provide GitHub links if anyone wants to do this. Iā€™m probably not going to get to it myself too soon.

There is Arlec BLE gateway which can be flashed with Tasmota.

Nice @darecki, did you end up using the REST sensor? Would you mind pointing us in the right direction to set something similar up?

I used localtuya. For that it had to be able to address device behind gateway and provide number platform. There is a branch with gateway support, it is incomplete. Iā€™ve added pretty much the same idea for ā€œsetā€ command and that was the only change I wrote myself. On top of that I copied another PR there which provides number and select. Once upon a time I wrote 6 speed fan for localtuya just to be told someone made the same and it was in PR already. Now I check first :stuck_out_tongue:
Then I made yaml config but it works with flow too.

I must say the way they proposed cid handling is big shortcut. I spent a while making room for better handling but as it works, I left it for now.
What I donā€™t know is what if:

  • I add more than one device behind gateway. As it will incorporate an IP multiple times it may not work with rest of that code
  • They mentioned it was tested and cid encapsulated in every status fetch is ignored on devices without it. Well, I didnā€™t test myself and certainly no-one tested set having cid encapsulated for normal device. This could be breaking change.

I believe I need to find some Tuya and try, sadly I recently flashed nearly everything with tasmota.
Thinking how to make it combined on github. I have fork with my fan but now need to add code from branch and a PR. A bit twisted for my git skills if I want to make it nice. .

Tested it. Added Holman socket as second device in gateway and that works. Found fan which I didnā€™t flash and that also worked so maybe cid is commonly ignored.

1 Like

Give it a test: GitHub - darek-margas/localtuya: local handling for Tuya devices

2 Likes

Would you mind sharing your (trimmed) configuration yaml for the entity?

Config is in the github.

So localtuya can see the device and presents it in the config flow, however it generates an error (possibly because I am using the incorrect key for device ID) or potentially because I still have the device connecting to the tuya cloudā€¦ any hints or tips?

Have you seen my config? I bet you used all these long ones instead of CID. Query API, look at gateway tree and use CID of child as device_id. It did work via flow for me too, I just donā€™t like clicking so finally made it yaml and left it in github:https://raw.githubusercontent.com/darek-margas/localtuya/87041d7c00a9558e82912e853bae0cf37c30a222/Holman%20WX1%20WiFi%20Irrigation%20Tap.md
Also make sure you donā€™t have Tuya ap running.

Thanks darecki,

So my CIDs are different to yours (061 for Tap and 06B for Socket) (just looking at the question in the link).

In config flow replacing the device_id with CID and using the hub key returns a ā€˜failed to authenticate with deviceā€™ error like above.

I just checked, I donā€™t have the app open, but I do have the Tuya IoT Platform website open.

[edit]
I did successfully connect to another device using localtuya. I also tried a yaml config based off yours, it generates the entity but reports them as unavailable.

Are you sure you have localtuya from my github installed?

Thanks @darecki your version of tuyalocal worked for me and my BlitzWolf-BW-WTR01:

I couldnā€™t get it working via config flow:
With the full device ID a got this issue: ā€œFailed to authenticate with device. Verify that device id and local key are correct.ā€
With CID instead of Device ID i got ā€œConnection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.ā€

But it worked fine by using your yaml - apart from IP / Local key, my CIDā€™s where also different (also used tuya-cli to find these)

Thanks for feedback. As I copied changes to github manually, Iā€™ll run diff on weekend to check if there is anything lost causing issues with flow. I remember I added it once during tests.

BTW - nice dashboard, I need to invent something for myself. Do you know what is actual moisture range in soil to keep? Iā€™ve asked turf people but no-one knew. Now I have nice toy but have no clue what limits to set :stuck_out_tongue:

:+1: :+1:

No clue either :grimacing:!, I will do some googling to find a reasonable range to set graphs (and automations). If my garden become a desert or a swamp I know I have got it wrong :sweat_smile:

1 Like

I believe so. I went back and just manually uploaded it to the custom_components folder but I had the same issue. Obviously its something that Iā€™m doing or that is odd with my setup as Michael has been successful.

Iā€™ve read a range of recommendations on moisture levels, it seems to be quite dependent on your soil and crop. 60% and above has been my rule of thumb.

1 Like

I ran diff today and except a few commented lines it is the same. I fixed hacs stuff today so maybe just uninstall via hacs, remove url, add this url and re-install via hacs?
Maybe there is something left and inconsistent in HA config after previous install.

1 Like

possiblyā€¦ Iā€™m not sure what just happened, but it successfully just setup using config flow

Thanks for putting it together @darecki.

1 Like