For help, advice and discussion about stuff not related to aviation. Play nice: no religion, no politics and no axe grinding please.
  • 1
  • 7
  • 8
  • 9
  • 10
  • 11
  • 13
User avatar
By stevelup
#1765995
Obviously it's bad practice which is why it has thrown its toys out of the pram!

Personally, I'd put another UniFi in the barn and turn off the WiFi on the TPLink.

If you insist on doing what you're doing, you can mark device as known in the GUI and you'll stop getting alarms.

I don't like it though really. You've gone to all this trouble to set up a proper solution, now you're chucking a bodge into the mix!
User avatar
By stevelup
#1766007
I can't quite visualise the situation, but it does seem that the barn is in wireless range of at least one of your existing UniFi devices. That therefore means the reciprocal is true. You might end up with devices connecting to the TPLink when you don't want them to and vice-versa.

You might also find that if you visit the barn, then walk back to another part of the property, your phone etc., will cling to the WiFi from the barn.

Plus, the UniFi stuff manages channel allocations by itself and might end up making compromised decisions because of the interloper over which it has no control.

I don't think it's worth the risk for 70 quid.

I could have completely misunderstood the scenario of course!
By Colonel Panic
#1766037
The barn in question (striped roof) is ~25m from my office (converted barn), but the latter has metal grilles on the door and windows, so is an excellent Faraday cage and zero wifi gets out of (or in to) it.

I have a LocoM2 from my Office to the gate, and the TP-Link from my Office to the Barn. I have Cat5e from the House to both the Garage and my Office.

I had wondered if I rotated the LocoM2 base slightly clockwise and then put a second receiver on the barn, then that would get rid of the TP-Link.

Image
Flyin'Dutch' liked this
User avatar
By Flyin'Dutch'
#1766078
Looking at the Ethernet cable run, did you dig that by hand or was a trench digger thing used? One of those soil chainsaw like machines?
User avatar
By stevelup
#1766089
Colonel Panic wrote:I had wondered if I rotated the LocoM2 base slightly clockwise and then put a second receiver on the barn, then that would get rid of the TP-Link.


Yes, that would almost certainly work. Those things aren't really that directional.

But I thought you needed WiFi in the barn? So you'll still need another UniFi anyway.

There's nothing wrong with using the powerline adapters if they're working. The issue is having their WiFi enabled.
By Colonel Panic
#1766093
Thanks. I think what I will do is keep the TP-Link wifi active (on a separate SSID), and just have a dedicated set of smart plug(s) that will stay within the barn. That will prove to be the cheapest route ( think, and once set up easy to manage.

Flyin'Dutch' wrote:Looking at the Ethernet cable run, did you dig that by hand or was a trench digger thing used? One of those soil chainsaw like machines?


The run between the house & the office would have been done in ~1992 with a mini digger when I converted the old milking machine room ( :D ) in to an office; in the same conduit is Cat5e & a telephone wire.

The run out to the garage (thick power & ethernet), and on to the PV panels (& then later up to the drive gate) - power only - was done by one of those chainsaw style trenchers ~5 years ago. A much less disrupting method.
Flyin'Dutch' liked this
By Colonel Panic
#1767231
The drive gate is automated by a CAME controller; when a 24v signal is sent through a N.O. contact, the gate opens; duration is

* 20 secs if a button is pressed (then automatically closes), or
* however long is programmed in to a 7 day timer (then automatically closes), or
* until next toggle instruction via a Shelly1 smart relay.

What "sensor" / widget would be the best way to transmit an MQTT (or similar) signal alerting me to when the gate is opened (however it was opened)? Not quite sure what to google for. Something that would detect the initial pulse and generate a message?

I have power and internet - just need a method of grabbing the data. Would prefer to tap in to the NO circuit rather than use a magic eye or reed switch type of thing as the gate flaps about a bit in the wind ...

TIA
By Colonel Panic
#1767275
I had not realised that one could use them as a sensor, so thank you.

I have wired up a second Shelly1 (called "sensor") next to the first one which can control the gate (called "control"). I have turned on MQTT on the sensor, and will NOT use it as an input device. Messages are being sent according to my MQTT broker according to MQTT Explorer; every time I activate the control the message count goes up by 2 - one in each of relay and input.

But they are not arriving in Node-RED. So either I have wired it up wrong (both Shellys are wired in parallel on all four connectors (L & N to 24vDC, 0 & 1 to the NO contacts)), or I have got something wrong in Node-RED.

Whether I set the Topic to shellies, shellies/gate, shellies/gate/relay or shellies/gate/input within Node-RED makes no difference.

Image

Image
User avatar
By stevelup
#1767286
I'm assuming Shelly 1 as that would be logical.

You don't need two of them, you only need one. But you need to switch the negative feed to the gate controller not the positive (because of the way the switch input works on the Shelly)

In a nutshell, you're taking the +24V feed directly to the Shelly and the gate controller.

The ground connection goes to the Shelly, to the Shelly 'I' pin

Then you connect the Shelly 'O' pin to the 'SW' pin and the gate GND.

Your two 'switches' (the button and the timer) then connect directly across the O and I pins on the Shelly.

You need to configure the Shelly not to respond to the button input otherwise it will just latch up.

So, now what happens is that whenever you press the button, or whenever the timer is active, the SW pin is brought low and the Shelly will send the message. Obviously if the Shelly activates itself, this will also bring the pin low, but that shouldn't matter as it's still an 'activation'

Schematic below. If this doesn't work, you're going to need a relay. But we can cross that bridge when we come to it.

Image
By Colonel Panic
#1767430
Woo Hoo! It works :D :D :D

Thank you so much. Bridging 0 & SW, and tweaking the Node-RED MQTT path to include some more "steps" (ie /shellies/gate/relay/0 instead of just /shellies or /shellies/gate) worked a treat. It also means that I can remove the 2nd Shelly1.

The one minor downside is that turning on MQTT within the Shelly1 prevents it talking to Shelly Cloud, but I can still open the gate through Homekit / HomeBridge via 3G so no great hardship.

:thumleft:

Image
Flyin'Dutch' liked this
  • 1
  • 7
  • 8
  • 9
  • 10
  • 11
  • 13