I just picked up two Everspring ST814-2 Temperature/Humidity sensors. After searching through the forums here at [url=http://forum.micasaverde.com/index.php/topic,8510.0.html]http://forum.micasaverde.com/index.php/topic,8510.0.html[/url] I was able to get the devices to update to Vera properly (using changes in temp/humidity since Vera cannot poll battery powered devices unless you manually wake them up) and used Thorden’s lump instructions to create a modified virtual thermostat.
My main issue is that the Virtual Tstat created does not reflect the actual readings from my Everspring devices. For example right now my bedroom temperature reported by Everspring is 68 degrees F but my virtual thermostat device which should be linked to the Everspring devices remains a static 22 degrees F. I followed the below instructions to attempt to set up the virtual device but it isn’t working properly:
[quote=“Thorden, post:27, topic:169647”]Hi,
Sorry for my late replay, been away skiing. ![]()
My solution is based on the virtual HVAC Thermostat, I just removed some minor details from the I_ and .json files to make it work “live”, and as a basic set point for heat and current temperature. All the functionality of the full Thermostat is still there, should be cleaned up. I’ll work some more on it when I have the time.
Here is what you do:
- Upload the attached files (Apps, Develop Apps, Luup Files, choose files, GO (and restart luup after upload)
- “Create Device” from same menu, fill in fields:
- Description: Anything meaningful for you
- Upnp Device Filename: D_HVAC_ZoneThermostat1.xml
- Upnp Implementation Filename: I_HVAC_ZoneLiveTempThermostat1.xml
- Choose a room if you like
Then “Create Device”. Save and reload luup.
Note: It will appear buggy for a while, don’t worry. ![]()
To transfer live temperature to the device, create a new scene, and enter the LUUP code. I advice using oTi@'s code, with my minor adjustements:
(Remember to change device ID’s in the first 4 lines to match your devices)
local PARENT_DEV = 13 -- This is the Parent device, in this case the ST814
local TEMP_CHILD_DEV = 17 -- This is the ST814 temperature child device
local HUMI_CHILD_DEV = 18 -- This is the ST814 humidity child device
local DUMMY_TERM_DEV = 19 -- This is your newly created virtual device
local COPY_FUNC = "copyST814Data"
local TS1_SID = "urn:upnp-org:serviceId:TemperatureSensor1"
local TS1_TEMP = "CurrentTemperature"
local TS2_SID = "urn:upnp-org:serviceId:TemperatureSensor1"
local TS2_TEMP = "CurrentTemperature"
local HS1_SID = "urn:micasaverde-com:serviceId:HumiditySensor1"
local HS1_HUMI = "CurrentLevel"
luup.variable_watch(COPY_FUNC, TS1_SID, TS1_TEMP, PARENT_DEV)
luup.variable_watch(COPY_FUNC, HS1_SID, HS1_HUMI, PARENT_DEV)
function copyST814Data()
local curTemp = luup.variable_get(TS1_SID, TS1_TEMP, PARENT_DEV)
local curHumi = luup.variable_get(HS1_SID, HS1_HUMI, PARENT_DEV)
luup.variable_set(TS1_SID, TS1_TEMP, curTemp, TEMP_CHILD_DEV)
luup.variable_set(TS2_SID, TS2_TEMP, curTemp, DUMMY_TERM_DEV)
luup.variable_set(HS1_SID, HS1_HUMI, curHumi, HUMI_CHILD_DEV)
end
Run the scene.
Then, paste in the following code in the startup lua section (Apps, Develop Apps, edit startup lua):
(Change the scene number “3” below to match the number of your newly created scene)
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{SceneNum="3"},0)
The new device should now show the right temperature, and the current set point.
Start trying to set the temperature set point in the new device. It should work after a while. If the controls are not there, enter setup for the device, use the setpoint controls there, fool around with it, change parent and set it back to none or do something that triggers a save, then reload. There is a bug there, but it will stabilize. Haven’t had time to debug yet.
How to put it to work:
Create two scenes, one for Heat ON and one for Heat OFF.
Add the devices you want to switch on or off in the scenes, and set their target state for the scene respectively (ON or OFF)
Set the scenes to run at given intervals, for instance every minute.
Enter the following code in the Heat OFF scene: (remember to change the device ID’s, here 3, 5 13, 19)
[code]local TempState1 = tonumber(luup.variable_get (“urn:upnp-org:serviceId:SwitchPower1”, “Status”,3),10)
local TempState2 = tonumber(luup.variable_get (“urn:upnp-org:serviceId:SwitchPower1”, “Status”,5),10) – Checks the status of devices with ID 3 and 5, add/remove lines for more/less devices
local TempState = TempState1 + TempState2
local currentTemperature = tonumber(luup.variable_get (“urn:upnp-org:serviceId:TemperatureSensor1”, “CurrentTemperature”,13),10)
– Get current temperature from any of the temperature sensors, the virtual device will do fine
local currentSetPoint = tonumber(luup.variable_get (“urn:upnp-org:serviceId:TemperatureSetpoint1_Heat”, “CurrentSetpoint”,19),10)
– Get current set point from the virtual device
if TempState == 0 then return false – aborts if all devices already are off
end
if currentTemperature <= currentSetPoint then return false
– Abort if temperature is below or equal to set point, else turn switches off
end
[/code]
Enter the following code in the Heat ON scene: (remember to change the device ID’s, here 3, 5 13, 19)
(Comments for the OFF scene applies)
local TempState1 = tonumber(luup.variable_get ("urn:upnp-org:serviceId:SwitchPower1", "Status",3),10)
local TempState2 = tonumber(luup.variable_get ("urn:upnp-org:serviceId:SwitchPower1", "Status",5),10)
local TempState = TempState1 + TempState2
local currentTemperature = tonumber(luup.variable_get ("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature",13),10)
local currentSetPoint = tonumber(luup.variable_get ("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", "CurrentSetpoint",19),10)
if TempState == 2 then return false
-- Abort if both switces already ON
end
if currentTemperature > currentSetPoint then return false
-- Abort if temperature higher than set point, else turn heat on.
end
That’s it, the temperature (heating) will now be controlled accurately based on the virtual device set point . :)[/quote]
Also, assuming I can get this virtual tstat to read the Everspring values properly, how can I control my Trane wired Thermostat to the Everspring virtual thermostat as sort of a virtual 2-zone heating system? How can I slave the real thermostat to the readings/set-points of the virtual thermostat? Thanks in advance for any help anyone can provide me with!