check the pin you connect temt6000 to gpio on nodemcu.
I have connected it to pin A0 like in the picture in the description. This pin is also stated in the code. There is a value set for it, that is 25.
when you upload json to nodemcu. there is a test did you try the test to see if it works correctly?
Jou mean the test to monitor the com port.
I did that test, and everything shows data except the light sensor shows zero.
then probably your temt6000 broken. When finished upload and connected to wifi you can test and should show the result except the led because didn’t have on-off command yet.
I had 2 of them and both fail to give me results.
I ordered 2 of the other types, hope that they work.
Built one of these a few weeks ago and damn I think the wife hates it. HA! Why does she hate it? Because I’ve been spending hours learning the code. Think I’ve tore into just about every piece of this sketch except the LED part as I didn’t have one to play with. Have a batch coming and will probably fix/change a lot of that too. Reminds me of the old school days writing efficient and tight code in the DOS days.
It’s probably a little overblown but I’ve broken out the MQTT calls to each sensor to get rid of those spikes in the graphs at times, added some status changes with the internal LEDs, such as blue with no motion and red with motion, cycling LEDs for WiFi disconnects or MQTT disconnects, controllable internal LEDs, configuration files on the EEPROM, etc. Working on the HTTP status page and throwing in the WiFi AP stuff on new/reset configs. I hate hard coding stuff! Will probably see about ordering a few different sensor types to add to the config. I’ll probably drop the source code later once I get things cleaned up.
Now I just need to find some cases for them or breakdown and buy a 3D printer. Been thinking of some ideas to do an all in one with a wall power supply where I can just plug these in the wall and point the PIR, or mounting them in some 1 gang boxes with the sensors mounted in a 1 gang plate. Anyone use the BME280 sensor yet?
I’ve also thought about the gang box route - would love to hear about your experience if you do it! I was looking at getting/making something like this AC-to-DC converter so that I could just tap into an existing power source in the wall, and in the event that I move I can just replace my sensor with a standard outlet and not have a random hole in the wall.
I was trying to keep some costs down and labor, been thinking of a few things.
One would be to buy a 2 gang box, old work style(deep) (US here). Mounted over something like a doorway for motion. Like in a bathroom above the door, you probably wouldn’t see it unless you were looking up on the way out. Throw in one of those all in one USB all in one chargers outlets on one side and blank on the other side. The USB wire would be shown a bit but loop it back inside and attach to the NodeMCU. Other three sensors would attach to the blank side of the plate. It would be relatively easy to fish down a piece of romex to power the plug, although it would never get used but you aren’t modifying anything on the 120vac side, all of your “hackery” is on the low voltage side. But would that comply with things mixing voltages in the same box. Probably not. I guess you could mount two 1 gang boxes but then what do you do when you don’t want it there anymore? So I kinda scratched this one.
It would be awesome to get one of those little taps to 2 prong for a phone style charger and throw it all in the 1 gang box. Again does it comply with things… hmm…not sure. Or an alternative would be a decent little power supply that has two screw terminals in and 5vdc out on the other of course.
I do think the best solution to comply with things and makes things easy is to have a little enclosure snap over a small flat phone charger close to the wall. Pack the sensors in to the box and call it a day. There’s that 3D printer need again! Something kind of like this. https://www.amazon.com/Matone-Generation-Assistants-Space-Saving-Solution/dp/B078W5JHJB
I am interested in seeing your code when you get it ready. Please let us know when it is ready.
Thanks.
These look pretty good. Just need a say to throw some 12/14 gauge wire terminals on them for the input.
10Pcs HLK-PM01 AC-DC 220V to 5V Step-Down Power Supply Module Intelligent Household Switch Power Supply Module https://www.amazon.com/dp/B01B7GGL6C/ref=cm_sw_r_cp_apa_0erXAbPSNKQE3
This evening i built the other sensor with the other node mcu. But with one of the temt6000 that didn’t work on the other node.
I don’t understand it, but now the light sensor on that node does work.
So that problem is solved.
may be because of the power supply. I mean not enough electricity supply to all sensors. If temt6000 works on another node mcu that means temt6000 is not broken.
has anyone tried making the multisensor with “common” firmware, such as ESPEasy ?
Would a common anode LED work instead of a common cathode ?
If so, what do I need to change in order for it to work ?
Thanks !
Just managed to add IR send control via http requests to this. It will be usable via curl commands in Home Assistant. Let me know if interested and I’ll share the code…
Hello, I would like to take a look at your code if you can post thanks.
Uploaded it here for all:
if I want to build more than one and connect all of them to HA, should I make changes to bruh code? like sensor1, sensor 2 etc…
Yes, you’ll need to change the MQTT topic.