Skip to content
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.

LDR all over the place #22

Open
melsom opened this issue Jun 24, 2017 · 9 comments
Open

LDR all over the place #22

melsom opened this issue Jun 24, 2017 · 9 comments

Comments

@melsom
Copy link

melsom commented Jun 24, 2017

Hello,

Is there any way to correct this? The sensor i stationary but the values seems to be up/down alot even though the median seems to be correct, looking at the 24h logs.

image

image

@cooljimy84
Copy link

I get this when someone walks in front of the sensor. I was thinking of using a diffuser on top of it to try and level it out a bit.
I also have a 30 minute window where the sun bounces off cars going past and they reflect into the flat causing it to read higher for a second or so....

@jonathanweinberg
Copy link

Also, if you're using an LDR, lux is an arbitrary thing in that scale, you aren't getting true lux values.

@ntalekt
Copy link

ntalekt commented Jul 9, 2017

I got this too and realized it was my ceiling fan throwing shadows all over the place. I moved the sensor to a place that isn't affected and mounted in an enclosure and it's been rock solid.

@Jizar07
Copy link

Jizar07 commented Nov 19, 2017

I got a different issue , my sensor works backwards, if its dark the numbers goes up to about 600 lux, if is bright is goes down to 33 lux. , I got the 4 pin sensor and got signal pin on AO (analog output) instead of DO (digital output). already tried switch AO and DO, but got the same result. any help would be greatly appreciated.

@cooljimy84
Copy link

correct (well for me as well) so darkness for my sensor is 900 LUX and bright light is 20 odd.

@rdbahm
Copy link

rdbahm commented Dec 8, 2017

@Jizar07 At least with an LDR, this happens if your ground and 3v are swapped.

@mikewebb70
Copy link

Also, if you're using an LDR, lux is an arbitrary thing in that scale, you aren't getting true lux values.

Thanks. came here to ask about that as I found it just gave me a voltage reading between 0-1024 (as expected when using A0). So I wrote a template in HA that turned it into a % value.

@jonathanweinberg
Copy link

@mikewebb70 - you should share that template :)

@mikewebb70
Copy link

mikewebb70 commented Feb 2, 2019

@mikewebb70 - you should share that template :)

You are right I should have, it's nothing special. Here is my light sensor Home Assistant yaml entry

- platform: mqtt
  name: "lux office"
  state_topic: "tele/labmcu/SENSOR"
  unit_of_measurement: "%"
  #value_template: "{{ value_json['ANALOG'].A0 }}"
  value_template: "{{ (value_json['ANALOG'].A0|float/1024*100|float)|round(0) }}"
  availability_topic: "tele/labmcu/LWT"
  payload_available: "Online"
  payload_not_available: "Offline"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants