Author Topic: web interface confusion  (Read 5016 times)

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
web interface confusion
« on: January 13, 2013, 05:11:50 pm »
I'm having trouble understanding what's going on here.

I'm using this script to output the "state" of two of my outputs:

<html>
<body>
<%
names = elkm1.OutputNames;
states = elkm1.OutputStates;
Response.Write(states[64]);
Response.Write("<br>");
Response.Write(states[17]);
%>
   </body>
</html>


Output 64 and 17 should be false. When i run the script i get this answer:

true
false

I've validated that output 64 IS false per the attached screen shot.

Any clue what could be happening?





iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: web interface confusion
« Reply #1 on: January 13, 2013, 06:03:42 pm »
Is that the whole script?
What happens when you set the output to true and run the script? What happens when you set it to false and run the script?

Sent from my Galaxy Nexus using Tapatalk 2

I always wanted to be somebody. In retrospect, I think I should have been more specific.

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: web interface confusion
« Reply #2 on: January 13, 2013, 06:59:54 pm »
Yes, it's just a test script so i've boiled it down to just that to try and troubleshoot.

Doesn't matter what i set the outputs to - the script always gives the same answer.

I tried it in the script tester and that gives the correct answer.

I'm completely stumped.

Side note: The default test web page also gives the wrong value for climate setpoint. It's like the values are cached somewhere or something.

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: web interface confusion
« Reply #3 on: January 13, 2013, 07:20:34 pm »
That is a stumper. You try to restart the driver? I know the values are cached. You right click in the viewer app to see diagnostics and cached values. I would make some elk updates while viewing the properties in the management studio to make sure it is updating properly. Outside of that any chance there is an issue with the script code?

Sent from my Galaxy Nexus using Tapatalk 2

I always wanted to be somebody. In retrospect, I think I should have been more specific.

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: web interface confusion
« Reply #4 on: January 13, 2013, 07:27:57 pm »
Here is another result right from one of the default webpages, the Current temp should be the same as the heat set point. I've made changes using my ipod and eK Pro while watching in the management studio and everything updates fine.

Main
Refresh


Elk M1
Home
Current: 71°
Fan: Auto
Hold: true
Mode: Heat
Cool Set Point: 78°- +
Heat Set Point: 66°- +


iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: web interface confusion
« Reply #5 on: January 13, 2013, 07:35:04 pm »
Did you check the thermostat setpoint on the thermostat itself to rule it out as the issue?

Sent from my Galaxy Nexus using Tapatalk 2

I always wanted to be somebody. In retrospect, I think I should have been more specific.

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: web interface confusion
« Reply #6 on: January 13, 2013, 07:42:50 pm »
Sure did.


iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: web interface confusion
« Reply #7 on: January 13, 2013, 08:23:08 pm »
Was it ever working or is this something that you are just now trying to setup?

Sent from my A500 using Tapatalk HD
I always wanted to be somebody. In retrospect, I think I should have been more specific.

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: web interface confusion
« Reply #8 on: January 13, 2013, 08:26:30 pm »
Today is the first day i played with it.  But like is said, the default webserver pages are giving the wrong data too. Weird.


iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: web interface confusion
« Reply #9 on: January 13, 2013, 09:50:08 pm »
And your scripting identifier for your elk is "elkm1"? I am not currently using the web interface, but was reading up on it and it looks pretty cool. I'll try to get it up and running and do the same thing you are trying to do and see what happens.

Sent from my A500 using Tapatalk HD
I always wanted to be somebody. In retrospect, I think I should have been more specific.

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: web interface confusion
« Reply #10 on: January 14, 2013, 04:40:31 pm »
Yup elkm1.



Sent from my Nexus 7 using Tapatalk HD

dvand

  • Jr. Member
  • **
  • Posts: 41
    • View Profile
Re: web interface confusion
« Reply #11 on: January 15, 2013, 06:43:49 pm »
Ok, i figured out that if i used this convention:

outputDeviceContainers = System.GetOutputDeviceContainers();
device = outputDeviceContainers[1].GetDevice();
states = device.OutputStates;
Response.Write(states[64]);

It works fine.

I still don't get why the first doesn't work but at least i have a decent web interface now. Not sure how "brittle" that code is, i suppose if i ever added another output device there could be an issue....

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: web interface confusion
« Reply #12 on: January 15, 2013, 08:14:47 pm »
Glad you got it working! I am still trying to get the website working to test it out myself. Probably a conflict issue with my default whs website.

Sent from my Galaxy Nexus using Tapatalk 2

I always wanted to be somebody. In retrospect, I think I should have been more specific.