Replies: 11 comments 6 replies
-
Not yet, but someone needs to be first 😄 I guess you'll have to DIY as off-the-shelve display+POE are not readily available... It will depend on the screen you want to use (Nextion or SPI) and the amount of time and effort you want to put into porting (some) of the code to the custom configuration. I know of these 802.3af POE capable ESPs/boards:
None of these combinations have been tested, so you'll have to dig (deep) into the code. If there is sufficient room behind the plate, you can also consider a Micro USB POE Spliter which will give more choices of devices. If the board has SPI + INT + CS pins available, you could connect a WizNet W5500 mini Ethernet Module. If there is no mains at all in the work box, you could go local and connect the momentary switches to ESP GPIO's, provided there are pins left on the device... Make sure to use pull-up/down resistors to avoid ghost clicks. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed information! I guess it will have to be DIY. I looked around again and couldn't find any better choice for the display than the Nextion used in HASwitchPlate, so I ordered 15 of them. Now I'm left wth the power supply and MCU. The T-ETH-Lite products look like they are narrow enough to fit behind the wall switch and, including the PoE board, is comparable in height to the Silicognition RP2040 + PoE stack. I was thinking of 3D printing an enclosure for the switch + MCU/PoE assembly to make it as simple to install as the HASwitchPlate. There'll be no 120V in the area so I can use LV mounting brackets and have room to plug in the ethernet. The version with the display would need a different 3d printed enclosure, but I might be able to get away with having the same firmware support both the display and switch versions. I followed your link to the ESP32 Ethernet Unit with PoE. That's an intriguing product. I did buy some HASwitchPlate bare boards in the hopes of using a PoE power supply instead of the 120V Mean Well module. Is something like that and connecting the Grove serial port what you had in mind? |
Beta Was this translation helpful? Give feedback.
-
Bear with me as I leap outside the box, but what if I......?
Wouldn't this minimize FW changes on the HASwitchPlate end, keep the FW on the PoE+MCU end dirt simple, and produce a working prototype that does MQTT-over-ethernet instead of wireless? Little to no (deep) code work, simpler integration, yadda, yadda? Maybe even Over-the-wire updates? Then I could look at moving eveything onto a single MCU if I want to make the HW more compact? Since this seems to be where the heavy lifting is I might even find it's not worth the trouble (at least for now). MCUs are cheap. If I wanted to move towards HASPOne or OpenHASP wouldn't that be a relatively simple next step as well? |
Beta Was this translation helpful? Give feedback.
-
Yes, at least to begin. The display/switch is just a piece of the entire HA system in my renovation. I'm trying to figure out a way to get the full functionality with the lowest initial effort so I can also prototype at the system level. I can then learn as I go from there. For prototype purposes, the idea is to "tunnel" the old wifi or MQTT (whichever is simpler) operations of the HASwitchPlate/HASPone over a serial link between the HASwitchPlate/HASPone and the PoE MCU. I am assuming that creating the shims to make the tunnel on each side is a lot simpler than a platform migration. If true, then I can bring up something that works without having to do platform ports and integration testing requiring "(deep)" dives into code I'm not familiar with. It would be a fatter and clunkier solution mechanically and might have performance issues, but a new enclosure might be OK size-wise, and hide the clunkiness. Then I can refine it in steps to get it all on one MCU, improve the form factor, etc. Since I only need 50 or so of these for my home, it may not make sense to do ANY refinement until the renovation is done, my wife stops bugging me, and the Muse strike. |
Beta Was this translation helpful? Give feedback.
-
The " HASPone doesn't have ESP32 nor Ethernet support built-in" is something I missed. TBH, I've only looked closely at HASwitchPlate. I'm sorry about the confusion. Since I have a couple assembled HASwitchPlate's and a dozen bare boards, that would be my focus anyway. So would that mean that integrating into a single PoE+MCU is best thought of an OpenHASP based effort? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the patient explanation. It all makes sense. I fully admit I used a ready-fire-aim approach and am 100% open to take a different path if the Nextions are not the path of least resistance.. So, what I have to work with now is:
On the networking/system side, I've got several Cisco 3850 switches (UPoE), a Dell R730XD, and a menagerie of old laptops and PCs, RPI3/4/5, Teensy's, etc. to draw from. Eventually I plan a high availability Proxmox/CEPH cluster to control all this mess. Initially, I'd like to prototype an HASwitchPlate-type single gang display using PoE for both MQTT and power, and an IoT wall switch using the Leviton switch, all talking to Home Assistant. I have enough DMX/Artnet lighting controlled with HA to do a proper system prototype. For the scale-out of the displays over the long term it sounds like the OpenHASP approach may make the most sense. I defer to your wisdom on ths however. If I can make initial use of the eight HASwitchPlate PCBs and Nextion displays that would give me ten gangs worth of displays and plenty of time to do it "right" the second time. My memory of the D1 Mini and HASwithPlate designs is stale so I can't say exactly how I'd implement the connection to the PoE/MCU stack I philosophized about, but I assume I'd have a few GPIOs to work with. If that's a bad assumption then perhaps there's no reasonable way to "hack" the HASwitchPlate PCB/D1 Mini and HASPone SW into the prototype. In that case it probably makes no sense to get some D1 Minis. On a related note, I couldn't find the original Arduino sketch, but did see the Platform I/O implmentation. I don't have any experience with Platform I/O, but there's no time like the present to learn. You've already been way more helpful sorting through this than I have any right to expect. Whatver I end up doing will be provided as Open Source, so hopefully it proves worth the effort:-) (This is somewhat off topic, but it sure would be nice if the Lightkraken were still available. It would have been perfect for most of the lighting I want to install. It seems to have been about 5 years ahead of its time. But, I digress.) |
Beta Was this translation helpful? Give feedback.
-
OK, time to fish:-) You've pointed me to a lot of really useful information. I guess I need to get over my phobia and surf AliExpress more. I worked in the Logic Analyzer R&D lab at HP (now Keysight) in Colorado Springs and we were just accustomed to to having stuff like crimp tools and pins around or being able to turn to assembly techs when we needed a bunch of stuff done. Otherwise it really was often DIY, although with some pretty oddball special components. The FeatherWing PoE boards deiver about 5W, which should be enough for the display and an MCU (or two:-)). That definitely seems the way to go, certainly re: PoE for my prototype. I'm going to explore the HASwitchPlate hack avenue a bit more, using the PoE FeatherWing for power and a 2nd MCU for the wired ethernet, with a FW modified D1 Mini on the HASwitchPlate to access the 2nd MCU to do the actual ethernet work. If that proves a galactically stupid approach, then I'll suck it up and do the "done right" version from the get-go. If there still is an Arduino sketch version of the HASwitchPlate code, do you know where I could find it? Otherwise I'll look at the platform.io code and either bite that bullet or try and refactor it for the Arduino IDE, which I use a lot. I assume you whipped that shim up yourself (KiCad?). Very nice. It's shape is remarkably similar to the RP2040 shims I got from Silicognitioon/Patrick, except for the M.125 connectors:-) I thik that remains my default for the 2nd MCU since I've got them on-hand. For the "done right" version, something like that shim with the active circuitry on the back could be really attractive. Given the keep outs required by the PoE wing it seems like the normal ESP32 won't fit, but maybe another version would. Or, of course, an RP2040:-) For the "done right" version, perhaps relaxing my obsession with having a display fit reatly behind a standard decorator switchplate needs to be tossed. HASwitchPlate made a mighty effort just to get it within a single gang, and I suspect if the right display existed, something that would fit in a standard decorator switch opening wold have been almost a no-brainer. Since the cover plate will have to be custom anyway, a larger display that can plug into (and be mechanically supported) by something that does fit in a single gang slot would make sense. The display still should be <3.6" wide so it dosen't crowd whatever might be in the adjacent gang. Haptic feedback is important, I think, especially given the switch emulation HMI I'm about to describe. The first HMI I thought of for the display was actually an image of the decorator switch that you could press to operate just like the real one. Those center off momentary switches are so expensive I harbored the hope of just using HASwitchPlate-type versions instead! If, in fact, the switch image would have been the same size as the real switch I would have installed maybe 50 or so of them. That was before PoE entered the picture. But, the "done right" solution might make it all possible. Variations on this would be emulations of other physical devices, like scene controllers, slide dimmers with those LED bar graphs on the side, timers, what not. Things like color pickers would actually come later. I've already started stringing together my switch prototype. The HW took about 30 minutes, of which 20 minutes was soldering the headers connecting the PoE Featherwing and the RP2040 shim. If I make progress with the HASwitchPlate prototype should I post updates to this thread, or start a new one? How about the IoT switch? It's neither HASwitchPlate fish nor OpenHASP fowl. Finally, for the dive down the rabbit hole defining the "done right" version, Should we just continue here or start a new thread somewhere? |
Beta Was this translation helpful? Give feedback.
-
This is really productive for me. Thanks again for hanging in there. The Lilygo T-ETH-Lite with that tiny PoE shim is really the most attractive form factor I've seen. Like most things from China, I have to read between the lines a bit to understand what to order, but it looks to me like I would the "Lite ESP23 xxxxx" AND the PoE shield. Is that correct? I was curious about the "S3 W5500" vs the "RTL8201" variant. It looks to me like the difference is whether the ethernet stack on the ESP32 is used, with an MII connection to the RTL8201, or it's all outsourced to the W5500 via SPI. The W5500 is commonly used with the AVR Arduino boards for obvious reasons. But it apparently is more limited than the stack in the ESP32. I read Patrick's blog entry about ditching the ???8200 as well as some threads on whether the ESP32 processors are really burdened by using the onboard stack. Apparently the W5500 can have only five open connections while the ESP32 can have many more, limited only by memory. Certainly for the switch, it's hard for me to see stressing the W5500, but five connections seems more risky for an HMI given that all kinds of things might need to be added. E.g. for a dimmer with an LED bargraph, and maybe a few other annunciators or touch buttons, each becoming a distinct Entity in HA, then add a webDAV function, blah, blah, five connections wouldn't cut it. Maybe I'm missing something? Obviously I should see if OpenHASP supports the onboard stack, but if it does, why would I choose to get the W5500 variant? I 100% understand your point about replacing something old school with an HMI. Now you've opened a firehose so I'll try to keep it concise. Before being corrupted with PoE, recall my original plan was to use the switches to actuate relays (SSRs, actually, driven by a small latching relay) that would turn lighting branch circuits on/off. This is something that Joe Electrician can figure out, even if he hates 60's old school George Jetson lighting. I also said all my lighting is DMX controlled, which seems incongrous. In fact, I had designed a parallel system that is able to sense switch activity and override direct control of the lighting relays, basically leaving them energized all the time, using the DMX channel to handle on/off, dimming, scenes, color, yadda, yadda. The current mode (60's or HA) would be controlled by a heartbeat timer PLUS a Big Red Button that my family could hit if I got nailed by a bus. They wouldn't get automation (or even dimming), but the switches would all still work, including 3/4/n-way lighting control. All of this worked using diode logic with the mapping between a switch contact and relay coils using a BUNCH of DIP switches. I even had figured out how to make it scalable with a standard PCB module that would support switch contacts and latching relay coils, so I could plug modules together in a grid layout to support as many switches and branch circuits as I needed. Any switch contact could cause any branch (or set of branches) to turn on or off. A different PCB would plug into the top (switches) and sides (branches) to handle the HA connection, look for the HA heartbeat, or Big Red Button. Way over the top, but it's what I want, and wife mode is ignored at my peril. Enter PoE and IoT switches,. How do I pull this off? I'm still thinking through alternatives. Ideally I'd still like to have the Big Red Button, heartbeat, Cisco switch failure, etc. detection. There are several ways to do it, but something would be needed both at the wall switch and the wiring center. But, anything that "rewires" the wall switch's connection to the ethernet cable makes me nervous. Fortunately, I'm routing an extra Cat5e cable (i.e. one more than the number of gangs) to each LV box without really knowing ahead of time what I'd need it for. Maybe this is it. So now you've got me reconsidering the HASwitchPlate hack as my first step. Perhaps "doing it right" won't be as difficult as feared, especially if I can mooch off of OpenHASP. I think I'll take a few Rolaids and get some of those Lilygo T-ETH-Lite's with PoE shields from Aliexpress and see how it goes. Even though you mentioned the W5500 version, my gut tells me that the RTL8201 version is the way to go. (Besides, I worked with the R&D folks at Realtek several times, and was always impressed.) Of the 2.4" displays you mentioned, I had looked at the Lolin in some detail, but not the others, so I'll check those out. I appreciate the heads-up on the Lanbon display. It looked to me like it was actually too big for NA, but OK for Euro boxes. Maybe I misinterpreted what I read. I had found a few that were suitable for the "plug them on top of the 1-gang base" approach (the Lanbon being perhaps one of them). I believe I saw a 1-gang base module somewhere on the OpenHASP site. If I'm actually going to "do it right" the first time, then a larger display makes much more sense as long as the matching wallplate fits in NEMAs 3.12x4.87" max for single gang devices. I'll continue to post to this thread. If anyone has doubts about the value of another pair of eyes looking at a design idea, I'll point them here:-) |
Beta Was this translation helpful? Give feedback.
-
I forgot to mention I had looked at Platformio a few years ago. At the time I had the impression it had an enthusiastic but limited base - not too widely adopted yet. So I put it aside because the Arduino IDE was sufficient for the quickie projects I do. I do use VScode (often for SQL, actually, because Format Document works so well), so maybe it's time to make the leap. But, TBH, Prolog is still my favorite language. It just seems to map well to how I think. In fact, implmenting the wall switch in Prolog would be an interesting exercise. Maybe 20 lines of code:-) |
Beta Was this translation helpful? Give feedback.
-
Well, I on Aliexpress and tried to order some of the T-ETH-LITE boards (1 each W5500 and RTL8201) and a couple of PoE shims. The site froze after the Paypal payment. No active links, and on Paypal, no payment recorded. I need some more Rolaids... |
Beta Was this translation helpful? Give feedback.
-
After drinking from the firehose for the past week my Pooh-brain has filled up. Between the platform choices for SW, HW, displays, switchbox vs. wall, ????, as well as thinking about what I actually wanted to use the displays for, I was trying to solve a 20 dimensional problem with a non-orthogonal basis set. After the first 10 dimensions my head began to spin:-) I'm pretty comfortable, however, sticking with the 3.5" display dimension for the "done right" version. They can plug into a single gang core (i.e. mounted in the box) module will work without encroaching on multi-gang setups. If I want it to look like a decorator switch, there's plenty of room for a photorealistic image of one. But, then, I've already got all these 2.4" Nextions and Featherwing PoE and shims. So I think I'll use them, and hopefully a bunch of HASwitchplate SW pieces to simplify away some of the HMI, SW, and electromechanical issues while I learn. So, the gutter by brain is running right now looks like this:
It will probably take me a few months, given my copious free time, to get to step 4. But, whenever I get bored swinging a hammer or stringing cable, I'll have something fun to work on. Then again, I'll probably get to step 2 and decide the whole plan is garbage:-) |
Beta Was this translation helpful? Give feedback.
-
Executive summary:
Has anyone seen an HASwitchPlate/HASPone/OpenHASP that uses PoE for both power and communications?
Why I'm asking:
In the last few months I found I could get Cisco3850 switchws with POE++ or UPOE for a song. I'm doing a total remodel of my home and have complete access to the wall interiors. All lighting is LED and DMX/Artnet controlled. The wall switches are all commercial SPDT center-off momentary decorator style, with Cat5E going from each switch (only using some of the wires) to a structured wiring panel where switch presses are processed and turned into commands for the appropriate lights. There are a LOT of these switches (~50). Home Assistant is my SCADA platform, with local RPIs, Teensys, and 1-Wire for most sensors.
As you can see, I'm wireless-averse. I like the concept behind HASwitchPlate/HASPOne/OpenHasp, especially fitting in a single-gang NA switch boa. I picked up a couple to play wth. But it relies on wireless. Also, it was thoughtfully designed to accept 120Vac for use in existing wall boxes. In my case, however, there is no 120V and I want wired connections. In fact, I don't want even latent but unused wireless capability. So ESP8255, Nordic, etc., are right out.
On its face, PoE is perfect for this, except nobody has done a PoE version of HASwitchPlate....OpenHasp, at least that I could find. So now it's turned into a DIY/migration project. While I'm at it, converting the SPDT switches to real IoT endpoints seems to make sense. I did find a nice, small PoE Featherwing along with a RPI Zero MPU clone "shim" that mates nicely with it at https://silicognition.com/. You can buy them on Amazon or Tindie, This should have plenty of horsepower to run the Nextion display and HASwitchPlate/OpenHasp functionality and still fit in the NA wall box. I could use the same stack to process the SPDT presses and send MQTT (or whatever) messages intead of current to detect presses. I'll probably need a bit more depth to fit the board stack behind the switch, so I'd probably need to use an open backed LV mounting bracket instead of a nornal switch box. In my case, that's OK.
The DIY stuff is fun, but I've got plenty of that going on with the remodel. So, if anyone has a pointer to something already available I'd be grateful. And, of course, comments are welcome:-)
Beta Was this translation helpful? Give feedback.
All reactions