I’m just this guy, you know?

  • 2 Posts
  • 51 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle
  • I’ve been happy with the GE Enbrighten series, though they do require a neutral wire. I use the Z-Wave models, but I can’t imagine the ZigBee models would work any differently.

    Neat feature of the Enbrighten line is they recognize several gestures including short tap, long press, double tap, and I think even triple tap. I configured mine so that short taps on/off toggle the lights between off and 100% on, long press on/off brightens/dims, and double tap on activates the preferred evening lighting scene.

    I think Minoston are also a GE product line? Again, Z-Wave, but rated for higher wattage in my case. They also require a neutral wire.

    I had a pair of no-neutral ZigBee switches sold as ‘Martin Jerry’ brand, but they were super dodgy. Terrible feel to them, and they made a sort of electrical whine when the fixture was on. I pulled them right out and sent them back.



  • You could source a pair of gigabit media converters and a length of fiber on Amazon for about $100. Just use the media converters to extend the Ethernet port from where the Internet hands off in your house over to your office. You can affix the fiber along baseboards and up over door frames with adhesive cleats and zip ties, or those nylon staples on a nail they use to tack down coax cable.

    If you’re willing to spend a little more on the fiber for a custom color, you can probably even order the fiber in a more neutral color than SMF yellow to blend into the trim better.





  • SolidGrue@lemmy.worldtoSelfhosted@lemmy.worldVLAN question
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 month ago

    If you just want each physical interface on your server to participate in a single VLAN, set the corresponding switch port as an access port in the desired VLAN, and then configure each server interface as a normal untagged interface.

    You would only do tagged frames (802.1q trunking) if you wanted to support several VLANs on the switch port.



  • It’s mainly about managing risk, but also not all ISPs allow residential accounts to host services on their IP addresses.

    Opening a port to the internet exposes the service to the whole internet, which means you need to secure the service with strong credentials, set up SSL, manage the certificate, and keep software up to date. You incur a lot of extra work, and also extra risk not only to your self-hosted service, but to any other services you host that “trust” your service.

    All that work requires extra knowledge and experience to get right which, let’s just be honest here: we’ve all probably followed that one How-To blog post, and maybe not understood every step along the way to get past that one pesky error.

    Running a secure VPN overlay like Tailscale has much less overhead. You generate some keys, and configure your lighthouse server so the enrolled devices can find each other. It effectively extends your LAN environment to trusted hosts wherever they might be without exposing any of the services to the Internet.

    Overall, Tailscale is simpler and much less work for individuals to set up and maintain than to secure multiple services against casual or targeted intrusion.

    Tailscale also has the benefit of being a “client” in the view of the ISP, who see your IP address reach out to your VPS to initiate the tunnel, and not the other way around. If there’s any CGNAT going on, Tailscale would tunnel through it.



  • My sump pit is pretty shallow, and is dry about half of the time. My challenge is that the sump is on a float switch which doesn’t activate until the water level is just about an inch (15mm) below the bottom of my slab. It doesn’t take much of a delay for it to overflow.

    There are three sensor types I’m aware of: a resistive “dipstick,” ultrasonic distance gauge, and a bathymetric depth gauge.

    The resistive dipsticks are only about 6in (15cm) in length, and would be good to determine if the water is within that distance of a target water line. I would position it on the side of the pit with the effective upper end set some buffer below the top surface of the slab floor, and possible gram the logic to alert when the water lever rises above the bottom of the slab. I would otherwise be blind to the water level if it is below Tue bottom of to sensor.

    The ultrasonic sensor looked interesting, but I have pets and I try to avoid ultrasonics in the environment when I can. It also strikes me as perhaps the least reliable (or most crosstalk-prone) of the sensors because it has a larger field of view, and might be fooled by the equipment in the pit.

    That leaves the bathy sensor. Its basically a diaphragm and a pressure sensor you screw to a waterproof housing, and submerge. Placed near the bottom of the pit, it would read the depth of the water by the pressure of the column above it. Most accurate, but also the most expensive. Last I checked, the sensor itself was US$60 on the usual online markets.

    Ultimately I’ll probably do a length of copper pipe with a 90 elbow and a cap. I’ll drill and tap a port through the cap and thread and seal the bathy sensor into it, and feed the wire back up the pipe to the controller. I’m not sure if there a driver for it in ESPHome, but if nothing else I expect I can probably just read the analog voltage and alert on a set point.

    I haven’t really fleshed it out as a design yet, but that’s what I’m most likely to do.



  • Definitely check in with the utility before mucking with the meter. You can find your way into a lot of trouble tampering with active meters. Chances are there’s new meter tech out your utility would install, and of which you could take advantage.

    Check this thread. https://community.home-assistant.io/t/smart-water-meter/451935 . You’d install it down flow of your utility meter, and would need ESP32 to read the meter. It’s a bit of work, but if you’re already running ESPHome, it looks pretty straightforward.

    On a long shot, you might consider looking into an inexpensively RTL-SDR software radio dongle, and use rtl_433 to scan a few common frequencies the utilities use to scan their meters from the street. I happened to find my neighbor’s electrical meter on a common wireless weather station frequency, and if In were so inclined, could publish it to MQTT for HA to pick up.

    Just a couple of ideas. Good luck!


  • Sure. Think of it like Lego bricks or one of those 1000-in-1 electronics kits. These kits don’t do anything specific, they’re building blocks you use to address a need you have in your home automation vision.

    The ESP32 kits are just an ESP32 development board (mine are WROOM boards from Freenove) which has the microprocessor, headers breaking out the IO pins, and a “loader” module that facilities uploading code and is used to power the device with a USB cable. The boards also have onboard WiFi and Bluetooth radios. The -CAM variety has a low profile header to seat a small camera module (included). Look for “Freenove ESP32 WROOM” on your preferred online marketplace.

    There are several ways to interact with (program) your ESP32 boards. The easiest and most straightforward is to use the ESPHome add-on in HA from the HACS store, along with the companion integration. The ESPHome add-on provides a software ecosystem of drivers and functions for a laundry list of hardware devices you can use in your project-- sensors, switches, lights, speakers, etc. The ESPHome wiki is sort of a catalog of supported peripherals you can easily use in your build projects. Many times, you can substitute components or extend an existing component driver. Mostly you assemble your components and the controller, and then write some YAML do tell ESPHome what devices are plugged into what pins. ESPHome more or less handles the rest.

    The ESP32 integration creates HA devices and entities of the devices and sensors in the ESPHome add-on for use as triggers, conditions or actions in automation.

    As for my specific doodads:

    PIR is a Passive Infrared Receiver. It monitors its field of view for a change in infrared light (heat) which indicates a “hot.blob” has entered or left its field of view. The model I use, AM312, is designed to signal a change in IR light by raising a signal pin to +3 volts, which has applications in presence detection. It is fast, but not accurate. It also tends to “go blind” when the hot blob stops moving, and can be subject to false positives when the HVAC kicks on or by dappled sunlight

    The mmWave radar is a Seeed R60A 60Ghz radar module. This particular module is optimized for human presence detection and fall detection. It uses millimeter wave radar to acquire and track humans in its field of view. 60GHz gives enough resolution to detect heartbeat, respiration and micromkvements like fidgeting. It talks to the ESP32 over the I2C bus (a digital IO bus similar to USB). It has advantages over the PIR sensor because it actively tracks its targets and can even tell if there are multiple people. Its less prone to false positives from environmental changes and smaller animals. Unfortunately, it can take several seconds to acquire a target and begin tracking it. In a presence application, a human could walk across several steps into the field of view within that time, giving the impression of a slow response.

    Using both sensors in a presence application is a sort of belt-and-suspenders approach. You can compare the state of both sensors in your automations to determine presence with greater accuracy.

    As for learning HA itself: we all started in a similar place not even knowing what we didn’t know yet. You sort of poke and play and build some bad automations. Then you start to research new projects and start to learn what you don’t know yet. That’s OK: its a roadmap to future knowledge.

    In my rig, I use HA to solve problems or address nuisance situations around the house. Wife and kids are forever leaving doors open with the HVAC on. I programmed HA to watch the HVAC (ecobee thermostat) and the states of the windows doors. If a door gets left open for more than 10 minutes, HA starts flashing lights as an indicator for someone to check notifications. After 20 minutes of the door/window being open, it turns off the HVAC and sends a push notification to my phone that someone is being a dumbass.

    Another one is to shut off the basement lights at 10pm because the kids never remember to after they’re done gaming down there.

    Eventually you want to do.more sophisticated things, and that when the rabbit hole gets real deep.



  • I have two Digi WLED controllers a handful of project kits, myself.

    The WLED boards drive some addressable LED strings in my living room and on my patio. They hardly count as “project” kits, but learning about interfacing TTL logic with the LED driver boards was a helpful experience. I learned a lot about the different GPIO uses and modes.

    For the project kits I’ve built, I’ve been focused around presence and environment sensors. Using esphome I’ve successfully built PIR (AM312) + mmWave radar module (R60A) presence sensors, natural gas detectors for kitchen and basement utility areas, and a water leak sensor for the laundry area. I had goals of building a 5-in-1 presence sensor, but you can buy products for those now; its a solved problem.

    I’ve been considering a design for a sump pit depth gauge because that sounds like useless information that I’d like to have for some reason.

    I’ll probably get interested in energy management soon, and will look into current clamps and tracking usage at smart receptacles.


  • I appreciate the pun!

    For home networks, I agree there’s usually not a need. I do it for portability reasons: I always use 192.168.0.0/24 addresses (192.168.0.0 - 192.168.0.255) for services I’m hosting on prem at home. In general, my home router is a Linux box connected directly to my ISP’s network on one interface and a switch with several VLANs on its other interface, and which has IP forwarding enabled with IP masquerade. I also use IPv6 a fair amount and receive a healthy whack of addresses from my ISP that I delegate out portions of to each VLAN. By my count I have 6 or 8 active VLANs on my home net for the adults, for work, for the kids, for the central services, for isolating untrustworthy IOT doodads, for infrastructure management, and for guests.

    Most of my so-called central services have been hosted on the same Linux box that does the routing, using containers bount do tjose subnet zero IPs on the loopback. It skeeves me out a bit to do that though, so I’ve been moving that stuff over to a new applications server in a DMZ VLAN. I know what I’m doing, but I’m also incurring unnecessary risks having structured my service hosting the way I have.

    The IP-on-loopback trick let’s.me move those services from a VIP on the router to an IP on the new service host without having to reconfigure everything. I just fake in some /32 routes where I need to, and the traffic goes where I want of to.

    I admit up front this isn’t great discipline, but as I said I know what I’m doing and it only sounds crazy to me when I try to explain it to other people. Lol.


  • I do this, but I also work in tech and have a pretty solid grasp of routing and how that all works. I agree it may seem overkill for many installs, but makes sense for certain use cases. I’ll try to explain without writing a book. I’ll be glossing over a LOT of texture in the following…

    In networking, a router is considered to be a node in a graph with multiple host IP addresses, one for each edge. It has an interface-- sometimes physical but more often viirtual-- on each edge (network segment, VLAN) that connects to it, and which usually serves as the gateway IP for that edge. In larger networks where there is more than a single router, the routers must all tell each other which router has which destination network segment, so they all speak a routing protocol like RIP, OSPF or IS-IS. Each of the speakers must be able to identify itself uniquely among the others so the others know which node is making what advertisements. To do this, they each are assigned a unique router ID, which is normally a 32 bit integer value represented as a dotted quad. Customarily this is an IP address, and the protocols further this idea by adopting the highest numbered IP address on the device or the addrss of its loopback interface, if defined.

    The point of a routing protocol is for the participating nodes to advertise IP ranges associated with their connected edges. They assert advertisements for each edge when it is active.(I.e., the interface is UP) and withdraw or expire them when the edge is unavailable (I.e., the interface is in any state other than UP). Every time an edge changes state-- goes from UP to not-UP, or not-UP to UP-- that advertisement must propagate across the whole system, and every node must stop forwarding traffic to recalculate its own best path to the remaining available edges. This is called reconvergence, and network engineers try to do things to minimize the number and frequency of these events.

    Practically, one of the things network engineers do to try to avoid instability is not having the ID of a speaker change dynamically. Going back to how the device selects its router ID, it considers the loopback IP first, or else the highest numbered IP active on the device at the time of evaluation. Edge interfaces can go UP or not-UP for any number of reasons at any time, thus they are less than ideal to use for the router ID. The loopback interface by contrast is always up. This interface is typically assigned the IP the routing protocol will use for its router ID.

    In practice, the loopback is the only interface on a router than can be said to belong to the router itself¹, and not to an edge connected to the router². There are other practical reasons in routing to do this, but they all come back to the fact that the loopback is always up, and therefore it’s always apt to be advertised as an available edge.

    So what does any of this have to do with servers, applications and self hosting?

    Applications that provide services over the network, DNS servers for example, need to bind to at least one IP address and protocol port. On servers with multiple interfaces, these applications normally bind to all available interface addresses, using the address 0.0.0.0. In some situations this might be undesirable. Maybe you don’t want your pihole serving your internal DNS to your ISP, or maybe you have several VLANs at your house and want to use a single IP address for DNS across all of your VLANs, or you don’t trust the VLAN interface IPs to always be the same.

    Adding an IP to the lo interface ensures that IP is always available and reachable. It provides a single place for all hosts in the system to go that isn’t pinned to any one of the possible VLAN interface IPs.

    In my own home setup, I define several IPs on the loopback for different containers that all want to use port 8443/tcp for their public port. This gives me the flexibility of being able to assign different services their own IP (which I can then reference by name in DNS) on their native port vis-à-vis the documentation. So my Pihole container has its address and my Unifi controller container has its own as well.

    Anyway, this is very much a Done Thing in the industry. Not everyone needs it, but its a useful technique in the right circumstances.


    1. Considered from to perspective of graph theory, network nodes and the edges they connect are distinct things. A router participates in a LAN, but the LAN is its own thing, and not formally part of the router.
    2. In large IP networks, there are frequently tra sport topologies like VLANs or other shared.media that connect two or more routers, and are used exclusively to distribute traffic among themselves. Which of the participating routers is said to “own” that advertisement?

  • A painful lesson to be sure, but also perhaps an opportunity to spruce up or rethink some of those original automations and integrations. I’ve been messing with my own rig since the lockdowns and while it’s not exactly a mess, per se, I certainly know more now than I did then. Refactoring your code is rarely a spontaneous activity.

    Also, I’m checking now and oops, syncing backups off-box broke thanks for prompting me to check!