[UPDATED] - Average All (Temperature, Humidity, Illuminance, Ambient Pressure & Motion)

Above was after calculate trend now click. Then after page refresh I get this:

Current States

  • DriverAuthor : Cobra
  • DriverStatus : Current
  • DriverUpdate : N/A
  • DriverVersion : 1.3.1
  • illuminance : 10.0
  • trend : Static

State Variables

  • Copyright : Ⓒ 2018 Cobra
  • Status : Current
  • current : 10.0
  • previous : 10.0
  • Version : 1.3.1
  • trend : Static
  • author : Cobra
  • calc : 10.0
  • InternalName : AverageIllum
  • UpdateInfo : N/A

But it doesn't appear to do it on it's own using base on the 5 min interval?

Yep!
I screwed something up! :slight_smile:

I’ll have a look now

Do the logs show anything in the way of errors?

No errors, but no state.previous = xx, state.current= xx, illuminace = xx reports based on the intervals. It only logs these if I manually click the calculate now button.

1 Like

Ok
I think I've found and fixed the error
I've updated the github files

Have a play with this one
BTW setting the trend interval to 0 will result in it updating every time the value updates

Andy

Just installed, will let you know if all is well. Thanks for adding the option for 0 interval too.

On a side note, this might be outside of the scope of the app, but I'm wondering if something like this could be used for control of a bathroom exhaust fan?

I'm currently controlling it with 3 RM rules that monitors the RH of the room compared to the RH of the room next to it (as a baseline) and then activates/deactivates a switch that controls my fan.

The only thing that would make it "better" IMHO would be to be able to monitor the RH and then activate the switch (fan) when it's trending upward rapidly and then deactivate the switch when it returns to normal.

My rules work fine, just a thought.

You could use it with Weather Switch for levels
E.g if humidity went above a certain level turn on a switch
Once it’s below that level you can auto turn it off

Andy

1 Like

looks like the apps are updating as scheduled now, thanks!

1 Like

None of this is really feasible with this app
It’s was just designed to answer my need to average out a bunch of sensors - that’s all.
Most of the apps/drivers I release start when I have a requirement that is not met by something already created.

Looking at your requirement...
In an app, the comparison to another sensor shouldn’t be too difficult.
The trending rise could be adapted to enter a threshold rather than just rising or falling..
Quick or slow rising/falling might be a bit more difficult though...

Andy

The primary reason I'm comparing RH of the bathroom to the RH of the adjoining master bedroom is to account for a seasonal differences in humidity making an arbitrary value to base turning the fan on and off impractical. By using a comparison with the master bedrooms RH I can account for what the "non-shower time" humidity is.

Does this make sense?

Ok..
Why not join me here:

And we can chat about it.

Andy

Hi Andy. Thought I'd have a little play with this and I'm seeing some anomalies with the illuminance driver.
I've defined 2 illumination sensors. Turned on a light (both were showing zero), illuminance on one goes up to 24. Virtual device shows 12. Great. Turned off and level remains at 12. Turned back on again and now virtual device shows 24. Dimmed the light and lux reading goes down but virtual device increases again. Turn light off nothing changes even though illuminance is now 0 on the sensor.
Turned light on again and virtual device is now showing 31.
It looks like it is not average current values, but an average of all level reports it has received.
EDIT: Manually set virtual device lux value to 0. Illuminance sensors are reading 0.
Turn light on and one sensor is showing 24. the other 0. Virtual lux device changes from 0 to 31.7. Very peculiar.

I found an issue with not setting a variable to 0 (I changed the name and forgot to carry it over)

This should work ok now.

New version of the child app uploaded to GitHub

I have also 'tweaked' the drivers so there are now new versions of these too :slight_smile:

Andy

1 Like

Looks like my average app stopped reporting again. Unfortunately I didn't have the logs open or configured to report all as I was having no problems for the last couple of days. The sensors being averaged were reporting properly but the virtual devices was showing a value completely out of range and did not update regardless of what I did.

Not sure how I can help debug this if it's so random😕

Mark
Do you have all the latest versions?

Andy

Yes, I used the versions updated a couple days ago.

Yes most recent

Not sure if it helps, but both times it stopped reporting it was midday and I was tracking average lux of two sensors facing outdoors. Lux reading got stuck at a higher number over 9000 lux. As I mentioned the sensors themselves kept reporting, but the average lux stopped.

Mark
I've been testing this for a couple of days with adding some really big lux numbers
Everything has worked perfectly

Is there something else on your hub that happens at midday?

Can you try and leave your logging open just before midday to see what is happening (if anything)?

Andy

Will do, and will report back

What settings for update interval both on lux and trend are you using?