Announcement

Collapse
No announcement yet.

Under kitchen cabinet LED lamps with mcsMQTT control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • alexbk66
    replied
    Originally posted by lj502 View Post
    Pete I use these small wifi contollers all over the house, and cheap too!

    Click image for larger version

Name:	led controller.jpg
Views:	236
Size:	239.7 KB
ID:	1246661

    Click image for larger version

Name:	led controller flash wiring.jpg
Views:	245
Size:	151.3 KB
ID:	1246662
    They do retain the last settings if power is cut, comes back on to last setting.

    John
    Hi John, can you please provide more info, i.e. what's the model? Where do you get them? How do you flash and what?

    Leave a comment:


  • Pete
    replied
    Good idea John!!! Found these on a search of Amazon Magic home controllers. This price is close to Ebay prices except with 2 day delivery.

    Like the Espurna Firmware too because of the HASS (Home Assistant) ready play Mosquitto commands stuff which I use with mcsMQTT now.

    BTW sent back one el cheap 1.25 amp LED power supply. Want the other two I have here? Will trade for two digital pots as I do not need more than that right now.

    switch:
    - name: ICS_SonOff2
    platform: mqtt
    state_topic: SonOff-1Wire-2/relay/0
    command_topic: SonOff-1Wire-2/relay/0/set
    payload_on: 1
    payload_off: 0
    availability_topic: SonOff-1Wire-2/status
    payload_available: 1
    payload_not_available: 0

    sensor:
    - name: ICS_SonOff2_temperature
    platform: mqtt
    state_topic: SonOff-1Wire-2/temperature
    unit_of_measurement: °F


    sensor:
    - name: ICS_SonOff2_humidity
    platform: mqtt
    state_topic: SonOff-1Wire-2/humidity
    unit_of_measurement: '%'

    With Tasmota you have to just watch the log for the Mosquitto messages and then utilize mcsMQTT for the variables from Mosquitto.


    And concurrently now playing a bit with Home Assistant, Node Red installed in a docker set up on another computer. Learning docker here now. Never knew anything about using Docker before.

    Correction: wire spools are 26 guage stranded with is much easier to work with than the 22 guage stranded with is the alarm wire.
    Last edited by Pete; November 21, 2018, 03:09 PM.

    Leave a comment:


  • lj502
    replied
    Got 4 more for 12 bucks, Sat delivery. If they are right I'm gonna get 100 and sell them here cheap flashed and ready.
    John

    Leave a comment:


  • lj502
    replied
    2.99 w/Prime holy cow how did you find those, they should be fine, worst case I had a few that required soldering on the side of the large chip module (in pics above).
    Gonna order some myself (gotta lower my average now,haha)

    John

    Leave a comment:


  • Pete
    replied
    Here is what I was just getting ready to order from Amazon. Guessing that it is the same you are using. So cheap was going to order three of these in the next few minutes.

    Ordering more DHT22's with this order...2 days by Friday if I order these today.

    Click image for larger version

Name:	magichome2.jpg
Views:	183
Size:	30.4 KB
ID:	1261127
    Click image for larger version

Name:	image_73486.jpg
Views:	198
Size:	69.4 KB
ID:	1261123

    Wow these are way cheaper than the H801A's except that the H801A was easier to work on as it is a larger board. I still have been testing the H801A connected to a small RGB strip, WW strip and W strip (5 channels). No pot is mounted on the H801A box.

    Leave a comment:


  • Pete
    replied
    Thank you John.

    So the 12VDC topology here for the under counter LED strips (in tubes with diffusers is:

    120 VAC wall switch powers on and off inside 2 AMP LED transformer ==> 12VDC wires go out of the box to a female barrel connector mounted on a little wooden plate right under and close to the kitchen cabinet ==> controller ==> LED lamps. (very high on the WAF and it works fine turning it on and off but no dimming and no automation.)

    So far have built only two test strips this way. One is a 4 foot strip and one is 3 sections totally around 5 feet (or a bit more).

    What guage of wire are you using above? Looks a bit like 18 guage wire?

    Here way long time ago ordered little spools of 22 guage wire (all different colors) from All Electronics.

    Here is the magic home controller I am ordering from Amazon. Should work fine. Really they all look the same to me.

    Basically removing the controller from the case to fit it in the little case where the Sonoff SV sat. I have the old pot still hooked up.

    So will rewire the new digital pot right to the board in the little case and will use barrel female connectors for the input 12VDC and output 12VDC LED lamps.

    Did find an issue with my Espurna firmware Sonoff Wifi basic gonna be 1-wire sensors.

    1 - so far cannot hook up two different sensors on two GPIOs (DHT22 and DS18B20)
    2 - NTP did not work as I was using the old SonOff SV IP and the arp cache on the router still had the old mac and IP in it. So had to go to the router and remove that device from the ARP cache before NTP worked on my new Sonoff. Will move the IP though and replace the old SonOff SV IP with the new magic home IP and mac.
    3 - today extending a combo DHT22 some 30 feet using 22/4 cable to see if it works.

    Leave a comment:


  • lj502
    replied
    Pete, hoping you have the same board (all use gpio 4 for IR but RGB is different on some) This is the pinout for RGB on my newest ones.
    Click image for larger version

Name:	new magichome pinout.jpg
Views:	345
Size:	120.1 KB
ID:	1261108

    I went ahead a compiled a bin for you with 1 channel (gpio 12) for led and gpio 0 for the button with gpios 1 and 3 for the encoder (just swap if backwards dim) if you want to test it out. I left off the DHT22 but thats just 3 lines added back.

    Click image for larger version

Name:	esp-cap.JPG
Views:	181
Size:	75.5 KB
ID:	1261109

    Same routine as usual, find the Espurna wifi and join then go to 192.168.4.1 and setup your wifi and such.

    John

    Leave a comment:


  • lj502
    replied
    Pete can you upload a pic of your magichome board?

    I have never messed with the one-wire stuff, only a few dht22s, each on their own board, so I am of no use there.

    On my new magichome boards I used a 4 pin female jumper cut in half for (gpio 0,gnd,1,3) and a 3 pin jumper for (+v, gpio 4, gnd). The wiring on the 3 pin allows direct connection to a dht22 and the other is for flashing and then an encoder or buttons or whatever. I never need to open them again as everything is there now and when doing the first flash I just power it up with 12 volts while grounding gpio 0, no power from the TTL unit is needed. After the first flash I reflash new firmware through Espurna over wifi.
    Click image for larger version

Name:	new magichome setup.jpg
Views:	242
Size:	129.8 KB
ID:	1261084

    This is the board I have been getting lately
    Click image for larger version

Name:	Magichome new wiring.jpg
Views:	462
Size:	231.7 KB
ID:	1261085

    John

    Leave a comment:


  • Pete
    replied
    Thank you John.

    Yeah here removing the dead Sonoff SV and old pot and replacing it with a magichome board (which is smaller than the H801A board and new digital pot. Have settled on the Espurna firmware as I like the flexibility of using a static IP and your add too of a DHT22 to the mix. I am using the Ubuntu 18.04 version of PlatformIO. For just uploading firmware utilize the python esp command line. Yes a single color LED control is all that I am looking for in this endeavor and solder points / schematic of the magic home controller as I have never played with one.

    At this time only have swapped out the el cheapo 1.25 AMP Power supplies with the the 2AMP UL approved power supplies. Works and a tight fit. I have left the SMD5050 LEDs on 24/7 dimmed with an old LED dimmer (and no automation for now). The PITA part is wiring it and fitting it to the back of the electrical box and using the old toggle switches over it. I am sending back the unused 1.25 AMP power supplies to Amazon.

    Not there yet as I went off on a Espurna 1-wire hub endeavor and noticed yesterday that I cannot have both DHT22 (on GPIO14) and DS18B20s (on a different GPIO).
    For this endeavor using SonOff WiFi basics small terminals (6 of them) glued to the case and soldered wires to the pins inside such that I do not open the case any more except for JTAGing it to another firmware.

    When I connected both types of sensors

    Multiple DHT22's using GPIO14 worked fine.
    Multiple DS18B20's using GPIO14 worked fine

    Separate GPIOs for two type of sensors did not work and in fact messed up the humidity sensor on the DHT22 where it no loinger works.

    1 - DHT22 ==> DQ, Ground and GPIO14
    2 - DS18B20 ==> DQ, Ground and GPIO (serial RX Pin) plus resistor DQ/GPIO

    Another test is extending the sensors some 20 to 30 feet. I have read that the DHT22's do not extend well. I have not had issues extending the DS18B20 sensors.

    I was going to this endeavor using ESPurna and now may try using Tasmota instead.

    Leave a comment:


  • lj502
    replied
    Okay I think I was making this harder than it needed to be, I thought I had changed more than I actually had inside Espurna, so I just started over to make sure. I downloaded the Espurna zip again and put it inside my PlatformIO projects folder where I re-added my devices with my settings to the hardware.h file in the config folder and the added those devices to the platformio ini file in the code folder. Then I ran the build task for that device and grabbed the new firmware bin from the new device folder created inside the pioenvs folder inside the code folder, rename to something better and the upload over wifi or flash it if it is new.

    I realized you are already messing with Espurna so you must be OK with Platformio and compiling. What I figured I would do is just upload those 2 files and let you see exactly what I did, they are unchanged except for my additions at the top of the hardware file and the bottom of the platformio file.

    An RGB setup that the encoder dims brightness and turns on and off with a click, the double click and long click can be used with MQTT also and it has a DHT22 on GPIO 4.
    A single color led with encoder working channel 0, I just leave the brightness set at 255, Espurna only subscribes to brightness if it is color or 3 channels and the button handling on/off
    A Nodemcu with a single encoder used with MQTT.
    A Nodemcu that just has buttons attached sending MQTT to HS3
    Click image for larger version

Name:	cap1.JPG
Views:	203
Size:	95.7 KB
ID:	1260960
    Click image for larger version

Name:	cap2.JPG
Views:	183
Size:	102.2 KB
ID:	1260961
    Click image for larger version

Name:	cap3.JPG
Views:	184
Size:	108.4 KB
ID:	1260962
    Click image for larger version

Name:	cap4.JPG
Views:	223
Size:	116.4 KB
ID:	1260963

    John
    [ATTACH]n1260964[/ATTACH]

    Leave a comment:


  • Pete
    replied
    No rush...hope your son is better...geez....University of Houston??

    Just finished one of two 1-Wire hubs and using Epurna....not sure if it will work with DS18B20's and DHT22's. Testing one DHT22 with GPIO 14 and it works great.

    Leave a comment:


  • lj502
    replied
    Pete, Sorry for forgetting this, my son got jumped leaving U of H Friday afternoon and I just got back to my stuff. He's fine but crazy weekend. I'll get something posted shortly. I did use Espurna compiled with platformio and then uploaded over wifi. Give me a few and I'll be back.
    I did notice someone has added single button dimming to Espurna but I have not looked at it.

    John

    Leave a comment:


  • Pete
    replied
    Redoing this project using the RGB controller / digital on/off dim pot / Magic Home controller and 2 AMP UL approved mini LED power supply.

    The RGB controller will be utilized primarily for the 4 foot SMD5050 strip under the counter and maybe a second channel for a foot foot SMD3528 on top of the cabinet.

    Not much to automation here as the SMD3528 strip will be on 24/7 and the SMD5050 strip will be on 24/7 but dimmed at night.

    Removing SonOff SV DEAD board and replacing it with Magic Home RGB controller inside of tiny case.

    LEDs test #2 are SMD5050 under counters and microwave (~ 6 feet total) on demand here and only used when cooking. Replacing 1.25 AMP non UL approved power supply with 2.0 AMP UL approved power supply. Here it is a 4X4 metal box with a single duplex metal mudplate with a combo toggle switch and outlet. Don't play live with this as I did and touched the hot terminals to the metal box and tripped a breaker (and almost myself)...put black tape around the back of the combo switch and outlet cover all of the terminals.

    WAF way neat kitchen wiring

    Wall switch + mini 2AMP LED driver in metal 4X4 box ==> 12VDC to wall barrel connector ==>

    A - direct connection to LED strips in tubes with diffusers
    B - optional connection to RGB controller and digital pot

    Test #3 over the home office book shelves LED strips is doing well here with the dimmable 120VAC to 12VDC UL approved transformer connected to a UPB Dimmer module. These are SMD3528's warm white indirect lighting in office. Regular lighting is 2 lamps with LED bulbs and overhead FAN with LED bulbs (rarely utilized here).

    Another option that I have looked it is a dimmable 120VAC in wall switch with power supply to 12VDC LED light strips. These start at $100 and go to $200 and have no automation built in. They are about the same size as an automation in wall switch in width, height and depth.
    Last edited by Pete; November 17, 2018, 09:26 AM.

    Leave a comment:


  • Pete
    replied
    Thank you John. No rush. Using an old style LED pot on the Kitchen SMD5050 tube now with the power on and off at the wall switch.

    Installed the 2 AMP LED power supply in the 4X4 box. Fits fine. Little tight where the wires come out of the box on either side.

    Took apart the none working 1 AMP power supply. Did burn up as inner case has a few burn marks on it. Gonna switch the other test strip in the kitchen to same 2 AMP power supply. What is nice is that these are UL approved. They feel much heavier than the original ones.

    Forgot that your configuration is using a Magic Home RGB controller. I will get one of those, remove it from the case and replace the bad SonOff SV controller out.

    Moving along with the 1-Wire SonOff Wifi Basic modules purchased two more of these and a bunch of DS18B20 cabled sensors, combo DHT22 sensors and DS18B20 chips.

    Leave a comment:


  • lj502
    replied
    I will write it up this afternoon when I get back home

    John

    Leave a comment:

Working...
X