Pocster Posted Thursday at 15:04 Posted Thursday at 15:04 (edited) Humans ! I’ve got a dry contact float switch . Works as it should . Stuck my meter on it for continuity test - all good . In Home assistant though ( via a Shelly uni ) it ‘latches ‘ I.e stays ‘on’ even when float physically reset . Chat ( my new best mate ) warbles on about a pull up resistor . This correct ? . If correct how do I know what value to use ? cheers peeps Edited Thursday at 15:05 by Pocster
SteamyTea Posted Thursday at 15:38 Posted Thursday at 15:38 32 minutes ago, Pocster said: how do I know what value to use ? Ohm's Laws.
Pocster Posted Thursday at 15:41 Author Posted Thursday at 15:41 2 minutes ago, SteamyTea said: Ohm's Laws. Yeah and ? . It’s a dry contact;
SteamyTea Posted Thursday at 16:02 Posted Thursday at 16:02 20 minutes ago, Pocster said: Yeah and ? . It’s a dry contact; Show us the circuit. Or try a 1 mega ohm.
-rick- Posted Thursday at 16:09 Posted Thursday at 16:09 If it's an active-high circuit. ie, when voltage is present home assistant reads 'on' then wouldn't a pull-down resistor be needed? ie, there is some stray signal pulling the signal up which you want to override. Would have thought a 10k resistor would be a better starting point than 1M 1
Pocster Posted Thursday at 16:15 Author Posted Thursday at 16:15 4 minutes ago, -rick- said: If it's an active-high circuit. ie, when voltage is present home assistant reads 'on' then wouldn't a pull-down resistor be needed? ie, there is some stray signal pulling the signal up which you want to override. Would have thought a 10k resistor would be a better starting point than 1M But why is it needed ? When the float is off - it’s fine . Activate float , Shelly uni shows ‘closed’ on dry contact . Which is correct . Why doesn’t resetting the float ( open circuit again ) not cause Shelly uni to see that ? as it’s a dry contact .
SteamyTea Posted Thursday at 16:19 Posted Thursday at 16:19 8 minutes ago, -rick- said: pull-down I thought that, then thought of @Pocster's trousers. It is probably ab ESP32 type board, so this may help. https://www.reddit.com/r/esp32/comments/1birg1q/design_question_internal_pullup_resistor_or/
ProDave Posted Thursday at 16:25 Posted Thursday at 16:25 Show us the circuit. Or just experiment. Start with 100K, measure the voltage it pulls up to when open. If that is nowhere near what it is trying to pull up to, try a bit lower. 1
-rick- Posted Thursday at 16:28 Posted Thursday at 16:28 9 minutes ago, Pocster said: But why is it needed ? When the float is off - it’s fine . Activate float , Shelly uni shows ‘closed’ on dry contact . Which is correct . Why doesn’t resetting the float ( open circuit again ) not cause Shelly uni to see that ? as it’s a dry contact . Have you got this switch connected via a relatively long wire? (Significantly more than the shelly was designed for - which I think is very short wires) Wire is probably picking up small current from somewhere thats not enough to change the shellys state but enough to hold the switch high once triggered (at least for a time - if you wait long enough it might reset). If a resistor works then you can play with the wiring and see if you can fix it. 1
Pocster Posted Thursday at 16:43 Author Posted Thursday at 16:43 (edited) 15 minutes ago, -rick- said: Have you got this switch connected via a relatively long wire? (Significantly more than the shelly was designed for - which I think is very short wires) Wire is probably picking up small current from somewhere thats not enough to change the shellys state but enough to hold the switch high once triggered (at least for a time - if you wait long enough it might reset). If a resistor works then you can play with the wiring and see if you can fix it. Nah . Wire on float is 20cm - but will need to be much longer in real use e.g 3meters . Guess I need to wire it with ‘real world’ wire lengths aswell to test . I could get around this with software I.e switch triggers , alarm goes off , then resets after a minute ; switch as latched on won’t trigger it again . So a manual reset required - probably a good idea after a critical flood event has occurred . Edited Thursday at 16:43 by Pocster
-rick- Posted Thursday at 17:06 Posted Thursday at 17:06 Alternatively the switch might just leak a bit of current even though its off. Measure the resistance of the switch in both on and off states with nothing else connected. 1
Alan Ambrose Posted Thursday at 17:20 Posted Thursday at 17:20 If it latches on, then maybe a pull-down resistor. 2.2K ohms is standard for a few interfaces. Not critical - at 3.3V that's 1.1 mA. 1
SteamyTea Posted Thursday at 17:26 Posted Thursday at 17:26 Is the Shelley used with a mechanical switch? Think you said something about an overflow. If so, could it be switch bounce causing a problem?
Temp Posted Friday at 14:51 Posted Friday at 14:51 (edited) 23 hours ago, Pocster said: In Home assistant though ( via a Shelly uni ) If the float switch is essentially just an un powered switch with two wires I believe it should be connected to pin 7 (or 8 ) and VCC (pin 1)... Edited Friday at 14:53 by Temp 1
Pocster Posted Friday at 15:08 Author Posted Friday at 15:08 16 minutes ago, Temp said: If the float switch is essentially just an un powered switch with two wires I believe it should be connected to pin 7 (or 8 ) and VCC (pin 1)... Hmmmmm Not pin 7/8 and gnd ?
Temp Posted Friday at 15:42 Posted Friday at 15:42 (edited) 37 minutes ago, Pocster said: Hmmmmm Not pin 7/8 and gnd ? Not if you follow that diagram. One side of the switch is shown connected to pin 1 L. (Sorry I called it VCC earlier.) However that assumes the float switch is literally just that, a switch. It may not work if the float switch is a powered device. Sorry for editing this post a lot. I'm waiting for a train and hate typing on my phone. Edited Friday at 15:46 by Temp
Pocster Posted Friday at 15:50 Author Posted Friday at 15:50 (edited) 15 minutes ago, Temp said: Not if you follow that diagram. One side of the switch is shown connected to pin 1 L. (Sorry I called it VCC earlier.) However that assumes the float switch is literally just that, a switch. It may not work if the float switch is a powered. Yeah it is just an open or closed circuit ( the switch ) . Been fiddling and am indeed using pin 9 and pin 7 gnd and I think it works . Just noticed your diagram is different . Also just noticed I have the Shelly uni plus - so that could be the confusion Edited Friday at 15:58 by Pocster
MikeSharp01 Posted Friday at 16:38 Posted Friday at 16:38 23 hours ago, Alan Ambrose said: maybe a pull-down resistor. 2.2K ohms is standard for a few interfaces. Not critical - at 3.3V that's 1.1 mA. Pull up / pull down will depend on the internals of the shelly. I haven't looked but I would expect some sort of opto isolation on the input for safety so could be leaky either way a dry contact will be active in someway or other on the inside! 1
Temp Posted 5 hours ago Posted 5 hours ago On 15/08/2025 at 16:50, Pocster said: Yeah it is just an open or closed circuit ( the switch ) . Been fiddling and am indeed using pin 9 and pin 7 gnd and I think it works . Just noticed your diagram is different . Also just noticed I have the Shelly uni plus - so that could be the confusion Yes the "plus" is different. I found this circuit for the plus which shows switch between 9 or 10 and GND pin 7. No pull up resistor shown.
Temp Posted 5 hours ago Posted 5 hours ago Google AI said.. Quote The Shelly Uni Plus does not require an external pull-up resistor for its digital inputs as it has a built-in pull-up resistor, according to the Shelly community. The digital inputs are "active low", meaning they are pulled high by the internal resistor and pulled low when activated by a small current (typically 36μA) flowing from the input pin to ground, according to the Shelly forum. Explanation: Built-in Pull-up: . The Shelly Uni Plus has an internal pull-up resistor on its digital input pins. This means that when no external signal is connected, the input pin is automatically pulled high (to a voltage level that indicates a logical "1"). Active Low: . The digital inputs are designed to be "active low," meaning a signal is considered active (or triggered) when it is pulled low (to ground). No External Resistor Needed: . Because of the built-in pull-up, you don't need to add an external resistor to pull the input high. You can directly connect your sensor or switch between the input pin and ground.
Temp Posted 5 hours ago Posted 5 hours ago (edited) When you say the float is "ON"... Is its internal switch closed (conducting) or open circuit? If ON corresponds to open circuit then there is another possibility... Switch and relay contacts can have a MINIMUM switching current for reliable operation. Switches designed for mains voltage or currents in Amps don't always switch currents of uA reliably. It's to do with the materials the contacts are made of and any plating like gold or silver. This could only be the cause if ON corresponds to open circuit. Edited 5 hours ago by Temp
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now