We have moved at community.getvera.com

Author Topic: Everspring ST814 reports  (Read 48773 times)

Offline nickrwym

  • Full Member
  • ***
  • Posts: 139
  • Karma: +0/-0
Re: Everspring ST814 reports
« Reply #15 on: December 19, 2011, 03:57:12 pm »
I was getting the updates on my "outdoor ST814" BEFORE I put the Lua code in to make use of it. Until then it was just logging data into DataMine and displaying on the dashboard.

It's possible that Datamine is stimulating it in some way, Chris may be able to help there?

I have no idea about creating your dummy device, I'm a novice here feeling my way, I've got some things working well but there is a lot that I know nothing about.

There are lots of people out there that have much more experience than me.

If you are doing temperature control I would thoroughly recommend changing to the "one wire" server and sensors though, much better updates and much better resolution. You can get a wifi version so you can put it anywhere you have power and run wifi back to Vera.

Nick

Offline Chris

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: Everspring ST814 reports
« Reply #16 on: December 19, 2011, 05:11:28 pm »
I have no problem with the ST814. It doesn't update very often, but it works ok. I have the following settings -:
Var 6 - 2 byte - val = 5
Var 7 - 1 byte - val = 1
Var 8 - 1 byte - val = 5


I don't believe that you can poll a Z Wave battery device (but I may be wrong) it only wakes up periodically, and you can't poll it when it's asleep. The above settings are assocaited with how often it sends updates, and how much the temperature or humidity needs to change for it to send out a message.

Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #17 on: December 19, 2011, 05:36:51 pm »
Hi Chris,

Thanks for your input!

I had the exact same settings as you, nothing happened.
Var 6 = 5 means it should report status every 5 minutes
Var 7 = 1 means it should report status every time the temp changes by 1 degree
Var 8 = 5 means it should report status every time the humidity changes by 5%

Does it do any of this in your system? What if you put the device in the fridge, will it report the change in temperature within 5-10 minutes?

Yes, you can poll it, but only by adding some LUA code. I created a scene with this code luup.call_action("urn:micasaverde-com:serviceId:HaDevice1","Poll",{},22)
(My device is #22)
Set a timer on the scene so it runs at given intervals, works OK. It obviously only succeed in polling every time the ST814 wakes up (If I'm lucky), all other polls will fail.

Offline Chris

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: Everspring ST814 reports
« Reply #18 on: December 19, 2011, 05:53:22 pm »
I've not tried putting it in a fridge. I don't think it is working quite as I'd expect, but it does update. I think you can also force an update by pressing the second button from the left 3 times.

Attached is a picture of what one of my ST814s does - I've got 2 of them and they both work similarly (which isn't brilliant, but it's 'ok'). Blue is temp, and green is humidity.

Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #19 on: December 19, 2011, 06:03:01 pm »
I have no idea about creating your dummy device, I'm a novice here feeling my way, I've got some things working well but there is a lot that I know nothing about.

Well, I managed to create it, and started playing around with it. Promising, but not quite stable yet.  :)
Pretty easy (UI5): Apps/Develop Apps/Create Device
Upnp Device Filename: D_HVAC_ZoneThermostat1.xml
Description: What ever

I get a lot of "No Implementation" errors when changing values, no clue why. And it seems to clear the set temperature and the UI randomly.

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Everspring ST814 reports
« Reply #20 on: December 26, 2011, 01:50:15 pm »
Picked one up. Looks like the device does Auto Report as configured, and Vera does receive the reports, but only processes them against the main device, so the individual sensor devices that show the temperature and humidity do not update on the Dashboard.

As a quick workaround, try creating a scene with just code in the Luup tab, changing the device #'s (8/9/10) accordingly:

Code: [Select]
local PARENT_DEV     = 8
local TEMP_CHILD_DEV = 9
local HUMI_CHILD_DEV = 10

local COPY_FUNC      = "copyST814Data"

local TS1_SID        = "urn:upnp-org:serviceId:TemperatureSensor1"
local TS1_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(HS1_SID, HS1_HUMI, curHumi, HUMI_CHILD_DEV)
end

Manually start the scene, or add the following to the Startup Lua, changing the SceneNum (1) accordingly (Apps > Develop Apps > Edit Startup Lua):

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{SceneNum="1"},0)
Could not get the wake-up stuff to work for me. Also, the device does report in full resolution, but Vera rounds it.

I asked MCV to look at this.
« Last Edit: December 26, 2011, 01:52:47 pm by oTi@ »
Dezwaved at the moment...

Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #21 on: December 27, 2011, 10:16:53 am »
Excellent, Thanks! This works like a charm!  :)
Note: I needed to remove the Grouping 1 definition from the device to make it work.

Strange I haven't noticed that the values got updated in the parent device, but not the children. I left the whole auto-reporting alone, used wake-up interval and forced polling instead, and that has worked sort of OK. But this is much better!

I created a small Virtual Thermostat that displays the current temperature from the ST814, and has a temperature set point control  (see picture below).

By creating two scenes (for heat ON and OFF), I can actually control the temperature pretty accurately now. In fact, it's 0.1 degree variation, sort of.
Thing is, Vera will round for instance 22.5 degrees to 22, and 22.6 degrees to 23.
So if set point is 22, it will keep heat on as long as temperature is 22.5 or below, and turn it off as soon as it reaches 22.6 degrees. As long as larger variations don't occur within the reporting interval (set at 30 minutes currently), it's ok. It will anyhow report a 1 degree change, since I defined ST814 parameter #7 to 1 degree. This works absolutely flawlessly with your code, so the biggest variation I can get is ~1 degree, but normally a lot less. Brilliant!
If anyone wants the files and code I use for this, please say so.

I will make some modifications to the Virtual Thermostat to implement some functions I need; like manual and automatic night and away modes with individual set points.
Believe I figured out how I can use the ST814 physical device to enter the set point too, as soon as I find out how to read the time stamp portion of the variable. Any clues?

Thank you again, this was really helpful! 
 
« Last Edit: December 27, 2011, 10:19:09 am by Thorden »

Offline mezozoy

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Everspring ST814 reports
« Reply #22 on: December 28, 2011, 10:06:37 pm »
Thorden,

Could you please explain what do you mean by "remove the Grouping 1 definition" ?
I'm able to get temp/humidity Auto Report using Aeon USB stick & HomeSeer just fine- it's not instant (I have var 7=1, var 8=5), but at least I get updates withing 1~2min after the change.
Also setting associations and triggering other devices on/off works fine- controlling my HVAC humidifier with LFM-20 relay this way (had to set associations in Group 2).
But I'm not sure how to setup associations in Vera for it to receive trigger events- looks like setting association with Dev 1 (Vera???) is not sticking, or I just don't know how to do it....

Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #23 on: December 29, 2011, 04:58:17 am »
Associations in Vera is under the Device Options tab.
You create the Associaction Groups you need, and add the the devices you want in the different groups.

For the ST814, you need to create a group with ID "2" under the parent device and place the devices you want ST814 to turn on or off in this group. That is, if you wanted it to do that. I prefer letting Vera handle other devices.

Now, I created a group with ID "1" this way, since the ST814 manual said it could only send Auto-report to the (only) device in this group. I added the Zwave device to this group, but also tried different devices, and no devices. As you say, it doesn't quite stick. Adding the ID #1 device doesn't help, the ST814 will report that the ID #2 device is the one in the group anyway.
To make auto reports work like described above, I needed to delete the group with ID "1" completely from the device. So I do not have any groups defined under the ST814 parent device.
   

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Everspring ST814 reports
« Reply #24 on: December 29, 2011, 07:15:12 am »
Note: I needed to remove the Grouping 1 definition from the device to make it work.
Correct. Vera should do this automatically (and since there can only be a single node, you presumably wouldn't be able to add anything else), so she gets the updates. I did not manually assign anything into group 1.

[...] you need to create a group with ID "2" [...]. That is, if you wanted it to do that. I prefer letting Vera handle other devices.
Precisely. The Associations are a bit under-the-hood kind of stuff. I think the intended way of controlling other devices is through scenes, like @Thorden stated.
Dezwaved at the moment...

Offline chrifabre

  • Sr. Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Everspring ST814 reports
« Reply #25 on: January 09, 2012, 04:39:15 am »
Hello Thorden
I am interested in your work
Can you send me the files please
How did you create the virtual thermostat?
thank you
cordially
Christian
VERA_EDGE 1.7.3500 / VERA_PLUS 1.7.3501 /  VERALITE - 1.5.672
Interface : RFXCOM LAN/Google Home/ImperiHome Pro/AltUi v2.14.2305

Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #26 on: January 11, 2012, 06:33:38 pm »
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:
1) Upload the attached files (Apps, Develop Apps, Luup Files, choose files, GO (and restart luup after upload)
2) "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)

Code: [Select]
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)

Code: [Select]
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: [Select]
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

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)

Code: [Select]
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 . :)

Offline chrifabre

  • Sr. Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Everspring ST814 reports
« Reply #27 on: January 12, 2012, 08:02:26 am »
Thank you for having responded to my request.
I tried this morning, but I have some problems with the virtual device.
I display the correct temperature of the ST814, but the parties to define the set that is not
did I miss something does not it?
VERA_EDGE 1.7.3500 / VERA_PLUS 1.7.3501 /  VERALITE - 1.5.672
Interface : RFXCOM LAN/Google Home/ImperiHome Pro/AltUi v2.14.2305

Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #28 on: January 12, 2012, 08:19:53 am »
That is strange.
Looks a bit different than mine, see below.
Seems like the "slider_vertical" object is not displaying properly. What version of MiOS are you on?

What happens if you try the full virtual Thermostat? (files attached).



Offline Thorden

  • Full Member
  • ***
  • Posts: 127
  • Karma: +11/-5
Re: Everspring ST814 reports
« Reply #29 on: January 12, 2012, 08:25:58 am »
Oh, by the way. I have seen that the "slider_vertical" object doesn't show up immediately several times. I have no clue why, it just can take some time. It seems to help to force/trigger a "Save" on the object, and then a LUUP reload. Did you try this?