ST814 Humidity calibration

The humidity reading on my ST814 is way off, by >10% on average…is there a way to configure an offset in the VeraLite so that it displays and operates on a correct reading?

Others have expressed the same desire with the temperature calibration. A simple approach I’ve used is to make a dummy (humidity) device and have a scene which is regularly scheduled (say every 5 minutes) and reads your sensor device sensor, applies the required calibration, and writes it to the dummy device for display. Forget about the original hardware and just use the corrected device to display in whatever way you wish.

@akbooer - I see by your sig that you’re running both the Eversprings and the Aeon 4:1s, by your own experience how is the temp & humidity accuracy on them compared to each other (and compared to reality)? Thanks!

Thanks! I hate to ask, but I’ve been looking for some definitive info on exactly how to do this, but am not having any luck, or I’m so green that I don’t know what I’m searching for. I’ve had the Vera for only a couple months and only have a few devices added so far, so I’m a rookie. :wink:

[quote=“dgold21, post:4, topic:176201”]

A simple approach I’ve used is to make a dummy (humidity) device …

Thanks! I hate to ask, but I’ve been looking for some definitive info on exactly how to do this, but am not having any luck, or I’m so green that I don’t know what I’m searching for. I’ve had the Vera for only a couple months and only have a few devices added so far, so I’m a rookie. ;)[/quote]

Sorry for the delay - busy week! We’re on the forum to share knowledge, so don’t hesitate to ask…

From the UI5 interface, follow the tree: APPS > Develop Apps > Create device

This will create an empty ‘shell’ for a generic device. You have to tell it a few things to customise it to your needs. The key boxes to fill in are:

[ul][li]Device type: [tt]urn:schemas-micasaverde-com:device:HumiditySensor:1[/tt][/li]
[li]Description: choose a name for your device eg. [tt]Calibrated Humidity[/tt][/li]
[li]Upnp Device Filename: [tt]D_HumiditySensor1.xml[/tt][/li]
[li]Room: pick one from the drop-down menu if you want to[/li][/ul]

Hit the [tt]Create device[/tt] button and wait (I think it’s a restart.) You should find your new device with the correct icon in the room you assigned (if not, then restart again!). This doesn’t have an implementation file attached to it (or any parent) so it doesn’t actually do anything, but it’s a place to hang the new calibrated measurement.

All you need to make it ‘work’ in the way we discussed is to have a separate scene with some Luup code that reads from the actual sensor, does the calibration, and writes the new value to this dummy device. Ask if you need help with that once you’ve created the dummy device.

Good luck!

I’ve started logging temperature and humidity for an Everspring and an Aeon which are sitting side by side. Not a great test because this is in a rather stable temperature environment, but there are humidity swings. Qualitatively, I would say that the temperatures are generally +/- 1 degree C, but the humidity seems to differ by about 7 or 8 percentage points.

I have just acquired two more 4-in-1 devices (brave, huh?) so will set up another one there too, and one somewhere else next to another Everspring. I will post the results in a week or so, once I have a bit of data. As to absolute accuracy… who knows?! Compared to other measurements (Owl power meter, room thermostat) temperatures are again +/- 1 degree or so. I have no independent humidity measurement (a notoriously difficult measurement, especially with cheap sensors.)

The results are in… and confirm my earlier suspicions. Two test in separate places with different devices (two each of ST814 and 4-in-1). I conclude:

[ol][li]The ST814 results are, on average, about 7 to 8 percentage points above the 4-in-1[/li]
[li]The ST814 responds faster to changes - the up and down kicks are genuine (aside from quantisation)[/li]
[li]By comparison with other measurements, I believe the 4-in-1 to be closer to the truth[/li][/ol]

For me now, though, this is a moot point. Since discovering the Netatmo device with its plethora of sensors, build quality, and ease of installation, I shall be migrating to these sensors (but still logging on the Vera).

akbooer, I am curious were you able to integrate the Netatmo inot your vera? I tried the AEOTEC 4in1. The humidity sensor never worked correctly (I put it in a bathroom and turned on the shower, the humidity never rose above 23). I tried contacting both AEOTEC and MCV to no avail. My next try is the Everspring. If that doesn’t work I may spring for the NetAtmo, but I have never programmed in LUUP or JSON sooo I am not anxious to undertake that project.

Thanks in advance for your response.

Alan

Yes indeed, had it running for over a week now. Here’s a comparison of the outdoor temperature and humidity compared to a local Met Office station from the Wunderground plugin. Some may say this is not a good match, but actually, it is. There outdoor sensor is at the back of a block-built car port, not in a Stevenson screen, so well shielded and heavily damped (if I may use that term) from rapid temperature and humidity variations - the average values look about right.

There is lots of discussion in the Netatmo thread [url=http://forum.micasaverde.com/index.php/topic,13489.msg122948.html]http://forum.micasaverde.com/index.php/topic,13489.msg122948.html[/url]. Although the original code from Sebastien Joly works fine, it bears some modification. I’ve got routines for authentication, token rotation, device and measurement info working properly over HTTPS POST requests. Also auto-configuration for any number of stations and modules owned by the specified account. It’s currently running in the context of a scene code which is scheduled every 5 minutes. It could be a plugin, but I’m not really keen on all the extra overhead with JSON files, etc., to make it so. I just don’t use the Vera UI at all, if I can help it.

[quote=“akbooer, post:5, topic:176201”][quote=“dgold21, post:4, topic:176201”]

A simple approach I’ve used is to make a dummy (humidity) device …

Thanks! I hate to ask, but I’ve been looking for some definitive info on exactly how to do this, but am not having any luck, or I’m so green that I don’t know what I’m searching for. I’ve had the Vera for only a couple months and only have a few devices added so far, so I’m a rookie. ;)[/quote]

Sorry for the delay - busy week! We’re on the forum to share knowledge, so don’t hesitate to ask…

From the UI5 interface, follow the tree: APPS > Develop Apps > Create device

This will create an empty ‘shell’ for a generic device. You have to tell it a few things to customise it to your needs. The key boxes to fill in are:

[ul][li]Device type: [tt]urn:schemas-micasaverde-com:device:HumiditySensor:1[/tt][/li]
[li]Description: choose a name for your device eg. [tt]Calibrated Humidity[/tt][/li]
[li]Upnp Device Filename: [tt]D_HumiditySensor1.xml[/tt][/li]
[li]Room: pick one from the drop-down menu if you want to[/li][/ul]

Hit the [tt]Create device[/tt] button and wait (I think it’s a restart.) You should find your new device with the correct icon in the room you assigned (if not, then restart again!). This doesn’t have an implementation file attached to it (or any parent) so it doesn’t actually do anything, but it’s a place to hang the new calibrated measurement.

All you need to make it ‘work’ in the way we discussed is to have a separate scene with some Luup code that reads from the actual sensor, does the calibration, and writes the new value to this dummy device. Ask if you need help with that once you’ve created the dummy device.

Good luck![/quote]

Hello,

I am a little new to the Vera systems but after seeing that my ST814 was reading 4 degrees higher than a nearby thermostat I followed your instructions to create a dummy device to display a corrected temperature. I do not know how to write the code into a scene to have this new dummy device display a calculated/corrected value. Is there anyone that might be able to walk me through the steps? Thank you so much in advance.

Chris

Assuming you have created a dummy TemperatureSensor device using the following:

Device type: urn:schemas-micasaverde-com:device:TemperatureSensor:1
Upnp Device Filename: D_TemperatureSensor1.xml

Create a scene with a schedule that runs it periodically - maybe 5 minutes? Paste this code into the scene’s LUUP tab. Change dIDT and dIDD to the device IDs on your system. Change adjust as required.

local dIDT = 14 -- Device ID of actual temperature device local dIDD = 200 -- Device ID of dummy temperature device local adjust = 4 -- Amount to adjust temperature local curTemp = tonumber((luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",dIDT))) local newTemp = curTemp + adjust luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1",{CurrentTemperature=curTemp},dIDD)

[quote=“RexBeckett, post:11, topic:176201”]Assuming you have created a dummy TemperatureSensor device using the following:

Device type: urn:schemas-micasaverde-com:device:TemperatureSensor:1
Upnp Device Filename: D_TemperatureSensor1.xml

Create a scene with a schedule that runs it periodically - maybe 5 minutes? Paste this code into the scene’s LUUP tab. Change dIDT and dIDD to the device IDs on your system. Change adjust as required.

local dIDT = 14 -- Device ID of actual temperature device local dIDD = 200 -- Device ID of dummy temperature device local adjust = 4 -- Amount to adjust temperature local curTemp = tonumber((luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",dIDT))) local newTemp = curTemp + adjust luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1",{CurrentTemperature=curTemp},dIDD)[/quote]

Rex–

Thanks for your help. Since we are dealing with a humidity sensor shouldn’t the last line above be (I’m note sure it makes a difference):

luup.variable_set(“urn:upnp-org:serviceId:HumiditySensor1”,{CurrentTemperature=curTemp},dIDD)

Also, is the device id (i.e., diDT) that of the parent or child of the humidity sensor (ST814)?

At this point I’m getting a blank adjusted humidity reading on the GUI (for the new device). I have made sure the scene runs first and have reloaded LUUP.

Don

I think you will find that it should be:

luup.variable_set("urn:upnp-org:serviceId:HumiditySensor1",{CurrentLevel=curTemp},dIDD)

But, there again, ALL the temperature references should be humidity, if that’s what you’ve created.

[Edit: WRONG syntax… see later post]

[quote=“akbooer, post:13, topic:176201”]I think you will find that it should be:

luup.variable_set("urn:upnp-org:serviceId:HumiditySensor1",{CurrentLevel=curTemp},dIDD)

But, there again, ALL the temperature references should be humidity, if that’s what you’ve created.[/quote]

Hi –

Thanks for the information. The other part of the question is:

Also, is the device id (i.e., diDT) that of the parent or child of the humidity sensor (ST814)?

Don

If you want the number you are writing to appear on the child device, then it is the id of that device. Writing directly to the ST814 would simply (temporarily) overwrite that device’s reading, until it was refreshed with a real measurement.

If you want the number you are writing to appear on the child device, then it is the id of that device. Writing directly to the ST814 would simply (temporarily) overwrite that device’s reading, until it was refreshed with a real measurement.[/quote]

Hi Rex–

I’m not being very clear…

The ST814 generates 3 ACTUAL devices, the parent, and two children (temp and humidity).

Should I get the humidity from the ACTUAL parent device ID or the ACTUAL humidity child ID? At this point nothing is appearing on the GUI. Though perhaps I was trying the get the right variable from the wrong device…

Thanks for your help.

Don

Just to try once more and set you straight:

[ul][li]you can read the humidity from either the parent or the child device. It’s actually written to the parent first.[/li]
[li]I think that both Rex and I suggested the wrong syntax for [tt]luup.variable_set[/tt], confusing it with [tt]luup.call_action[/tt][/li][/ul]

The correct syntax to SET for HUMIDITY is:

luup.variable_set("urn:upnp-org:serviceId:HumiditySensor1","CurrentLevel",value,dIDD)

Sorry for the confusion.

[quote=“akbooer, post:17, topic:176201”]Just to try once more and set you straight:

[ul][li]you can read the humidity from either the parent or the child device. It’s actually written to the parent first.[/li]
[li]I think that both Rex and I suggested the wrong syntax for [tt]luup.variable_set[/tt], confusing it with [tt]luup.call_action[/tt][/li][/ul]

The correct syntax to SET for HUMIDITY is:

luup.variable_set("urn:upnp-org:serviceId:HumiditySensor1","CurrentLevel",value,dIDD)

Sorry for the confusion.[/quote]

Hi–

Thanks for your help.

This still isn’t working. My LUUP code is as follows from a scene that is updating every 5 minutes:

local dIDT = 202 – Device ID of actual ST814 device
local dIDD = 273 – Device ID of dummy device
local adjust = -20 – Amount to adjust Humidity

local curHumid = tonumber((luup.variable_get(“urn:upnporg:serviceId:HumiditySensor1”,“CurrentHumidity”,dIDT)))
local newHumid = curHumid + adjust
luup.variable_set(“urn:upnp-org:serviceId:HumiditySensor1”,“CurrentLevel”,value,dIDD)

Thanks

Don

NOTE: Is “value” variable correct in the last line? Should it be “newHumid?”

[NOTE: Is "value" variable correct in the last line? Should it be "newHumid?"

Yes, you’re correct, it should be newHumid. I only used value in the example because the previous reference to temperature was wrong.

Also, you have “upnporg” instead of “upnp-org” in part of a string.
You don’t need the call tonumber either (it will coerce automatically.)