Lux sensor

Looking for a sensor that would register the amount of light in a room, and if its below a number the lights in the room would turn on when a door is opened.

Not necessarily looking for a motion sensor, but just a lux sensor that isn’t over say $20 USD.

Zigbee / Zwave or even wifi are all options…

1 Like

I can recommend the Xiaomi Mijia light intensity sensor (GZCGQ01LM). Zigbee, cheap, reliable, and works well.

Amazingly enough, I can’t find that on Amazon…

Does anyone have any experience with the Huge Motion sensor? I see it also has lux capability?

Hi,

I just bought such a sensor and integrated it into HA through the Xiaomi Gateway 3 (like many other Zigbee and BLE Aqara / Mi sensors that work perfect).

The new device automatically pops up in HA but the battery and the illuminance levels are unknown.

Looking at the gateway log, I can see that the correct levels are broadcasted and received in HA.

In the following example I can see that 139 Lx is received

2022-01-23 02:41:56  DEBUG    gateway3      192.168.0.104 | MQTT | gw/588E81FFFE77B41C/MessageReceived b'{"sourceAddress":"0x67D8","eui64":"0x54EF4410001A4285","destinationEndpoint":"0x01","clusterId":"0x0400","profileId":"0x0104","sourceEndpoint":"0x01","APSCounter":"0x18","APSPlayload":"0x18540A000021D653","rssi":-32,"linkQuality":255}'
2022-01-23 02:41:56  DEBUG    gateway3      192.168.0.104 | MQTT | zigbee/send b'{"cmd":"report","id":2000000140,"did":"lumi.54ef4410001a4285","time":1642902115055,"rssi":-32,"zseq":84,"params":[{"res_name":"0.3.85","value":139}],"mi_spec":[{"siid":2,"piid":1,"value":139}],"dev_src":"0"}'
2022-01-23 02:41:56  DEBUG    gateway3      192.168.0.104 | lumi.54ef4410001a4285 lumi.sen_ill.mgl01 <= {'0.3.85': 139} [0.3]
2022-01-23 02:41:56  DEBUG    gateway3      192.168.0.104 | MQTT | log/miio b'\x1b[0;32m2022:01:23:09:41:55.844 [D] miio_client_func: ot_agent_recv_handler_one(): fd:9, msg:{"method":"properties_changed","params":[{"did":"421164399","piid":1,"siid":2,"value":139}],"id":2048} length:102 bytes\x1b[0m'
2022-01-23 02:41:56  DEBUG    gateway3      192.168.0.104 | Process props [{'did': '421164399', 'piid': 1, 'siid': 2, 'value': 139}]

but I can’t figure out why these are not “understood” and displayed in HA.

Any Ideas, what to do?

Thanks :slight_smile:

Sorry to revive, but did you happen to find a fix for this?

I’m looking for lux sensors as well and it seems VERY hard to find anything decent, which works with HA, and isn’t crazy expensive - the Mijia model, for instance, is $28 at AliExpress, at the only seller with these…

Hi @igorsantos07,

Yes, it is working just fine, and I base my outdoor light automation on it.

The issue at that time was due to the XiaomiGatyway3 integration version (v.1.6.5) was not working perfectly with the gateway firmware version (1.5.1_0032) that I was running.

I had to downgrade the firmware to version 1.5.0_0102 in order to get it working.

I don’t know whether the latest integration version 2.1.2 works properly now with the latest version of the Aqara gateway firmware version 1.5.4_0090. but it still works fine with my 1.5.0_0102 which I didn’t try to upgrade since then.

Kind regards,
Ghassan

1 Like

A cheap (~$1) BH1750 combined with a esp of choice (obviously supercharged with esphome) might not be only low budget but probably quite accurate at the same time :muscle:

Opposed to other solution you can also freely configure the update interval or even force an update like when the reed (or whatever) sensor from the door :door: is triggered :raised_hands:

2 Likes

i have 2 ldr’s running in addition to a bh1750.
the ldr’s are totally acceptable.

Ok, good to know! So it seems at least that using the Xiaomi/Aqara combo of sensor+gateway works fine, right?

On the other answers… Good to know that, but I guess that tinkerers that already find it fine to create sensors with esphome won’t be around asking for pre-made and pretty-ish sensors, right? :eyes:

My lux sensor is a Wemos D1 Mini with a BH1750 shield, and it’s taped to a southern-facing window, behind a sofa. Not in anyone’s view at all. But if it were necessary to be in plain view, a very small plastic project box with a hole for light above the BH1750 sensor would work. Due to pet (dog) activity, the power sometimes comes unplugged. I’ve considered moving it upstairs behind a television set, again where nobody would ever see it. The D1 Mini and sensor are small indeed. Using an ESP-01F or ESP-01M module instead of the D1 Mini would make it even smaller still.

2 Likes

Cool, it’s indeed quite cheap.

But then again, my idea coming to HA was to streamline and simplify the integration of devices in my home, not to end up with a side job on learning electronics, soldering, case printing and whatnot.

I guess the OP’s ideas was also around pre-made stuff, not looking for project ideas to create anything.

Exactly for that reason (“streamlining” or unified experience/handling and consistent functions) I ended up having my HA almost exclusively working with esphome devices/nodes. I tried also for a while going with the typical z-(and other)-type of commercial products but in the end it turned out that mostly a esphome based solution was not only technically superior but specially the “streamlined” on-boarding and configurations are just a treat to work with. :ok_hand:

Not sure what your main job is :stuck_out_tongue: but you should be able to install esphome on a esp board and plug a bh1750 sensor in without any side job - but be careful! You might learn something :see_no_evil:

For example one can combine a D1 Mini with a Ambient Light shield by making use of a cable :raised_hands:
image :heavy_plus_sign: image
image

How easy it can be to install esphome on a esp can be self-taught :muscle:

2 Likes

Precisely how mine was built, years ago, still running strong.

Damn.
I hate you.

You have all compelling arguments. I can’t find a single reason to disagree! :joy: :joy:

The only one I found is very weak: they’re ugly! :joy:

1 Like

Finally moved mine upstairs behind a TV a few days ago.

If I re-assembled a new sensor using the ESP-01M + adapter and detached the BH1750 from the D1 mini shield, the entire device would be about the size of my thumbnail. 3-D print a small open box and slap a transparent cover on that sucker and you’re done.

A slightly larger and more visually-appealing BH1750 device is this one. Comes with a nice Fresnel lens/dome. Might fit into a 3-D printed case a bit easier.

1 Like

I started my HA journey focusing on the DIY solutions, it was fun and cheap.

But I recognized one significant issue with these DIY sensors, you need to plug them to electricity. They don’t run on battery like most industrial ones. This makes them much less flexible.

Example the Xiaomi iIluminance sensor I am using. It is nice looking, small, magnetic back can easily be attached to any metal surface, and the battery lasts several years. It is now at 80% and I have been using it for almost a year.

Maybe you save 10 Euros by the DIY solution but you get much for the extra money spent

1 Like