water valve... which one?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: water valve... which one?

#11 Post by manjh » 28 Jul 2018, 15:59

Shardan wrote: 24 Jul 2018, 15:06 Have fun :)
Looking forward to see the result.
OK, got the Xiaomi sensor and hooked it up to my Android phone, works good.
Next step was to install the plugin into Domoticz. During the pre-req phase I needed to install Bluez-5.44, everything seemed to run OK, but the commands to check connection fail with an error code 0x11. No further explanaition... so I am stuck, waiting for some kind soul to give me the solution.
I'm not even sure if this problem is Bluez related.....
R-Pi is great, but sometimes it gives me headaches.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: water valve... which one?

#12 Post by Shardan » 28 Jul 2018, 16:20

Maybe this might help:

http://www.btnode.ethz.ch/static_docs/d ... Codes.html

Due to that list: 0x11 = Unsupported Feature or Parameter Value

I don't use the RasPi nowadays so i can't say much.
Regards
Shardan

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: water valve... which one?

#13 Post by manjh » 30 Jul 2018, 14:51

I think the problem is getting the basic BlueTooth controller to work. When I use btmgmt and try a scan, it complains that there is no default controller available. Does this mean hardware?

werner_g
Normal user
Posts: 31
Joined: 11 Jun 2017, 14:19

Re: water valve... which one?

#14 Post by werner_g » 31 Jul 2018, 10:16

I have a solution running since weeks and it works fine for me. I used this:
https://www.pearl.de/a-NX7367-3506.shtml
Since this are solenoid valves they need +power to open and -power to close, you need a H-brigde to drive the valve. Sounds difficult, but when using i.e. a TB6612NL motor driver you can use modules from WEMOS, Adafruit or Sparkfun and you are ready. Just pulsing two GPIO's for 50msec:

Code: Select all

on System#Boot do
   GPIO,12,2	// at first set both to input 
   GPIO,13,2	// to stay save - later it is an output
   GPIO,16,0	// STBY on, do nothing 
endon

on Bodenfeuchte#Pflanz1>575 do
if [Wasser#FreigabeHahn1]=1 and [Regensensor#Regen]=0
   Pulse,16,1,100
   Pulse,12,1,50
   Pulse,13,0,50    //start watering (open valve)
   Publish aussen/state/WM/Garten01/Wasser/Hahn1,1
   timerSet,1,300   //timer 1 set for 5 minutes

else
Pulse,16,1,100
   Pulse,12,0,50
   Pulse,13,1,50  //stop watering (close valve)
   Publish aussen/state/WM/Garten01/Wasser/Hahn1,0
endif
endon

on Rules#Timer=1 do
   Pulse,16,1,100
   Pulse,12,0,50
   Pulse,13,1,50  //stop watering (close valve)
   Publish aussen/state/WM/Garten01/Wasser/Hahn1,0
endon
Pflanz1 is a cheap Capacitive Soil Moisture sensor, FreigabeHahn1 is a MQTT-input and Regen is a simple water sensor. I also attached a simple water flowmeter YF-S201 to detect flow even when there should be no flow. Gives me the possibility to react when receiving an alert on my phone.

The solenoid valve is working with 3Volts. To achieve reliable results, you better use a 5V/3A Charger Power supply and have a additional 100µF Capacitor at the driver module.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: water valve... which one?

#15 Post by manjh » 16 Aug 2018, 18:44

I realize this is not really ESP related at all. But...

For information, just in case someone else runs into the same situation: my Raspberry had a config.txt file in the boot directory, with a line that specifically disables Bluetooth.... I don't remember how it got there, may have been a parameter that was set long ago during initial installation of the OS when I had no intention to use BT.
Anyway, commenting-out that line and rebooting the R-Pi brought me an operational Bluetooth..... :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 125 guests