more G-Labs products

Author Topic: Generic Thermostat APP  (Read 20449 times)

November 18, 2014, 02:19:05 AM
Reply #15

bradvoy

  • ***
  • Information
  • Full Member
  • Posts: 50
mblack, I'm able to change the mode setting, but I am not able to change the temperature setting.  It doesn't display an error, but it doesn't seem to send the new temperature setting to the thermostat. 

I'm wondering if this is a Fahrenheit vs Celsius problem.  When I programatically change the temperature I use Fahrenheit, i.e. "Heating/72".  The widget shows the thermostat's current setpoint in Fahrenheit next to the flame image, i.e. "heat to 72".  The widget's temperature display always shows 0.  When I click on the gear image to change the settings, the range of possible temperatures it will let me select is 5 - 35.

November 20, 2014, 02:16:02 AM
Reply #16

mblack

  • *
  • Information
  • Newbie
  • Posts: 14
bradvoy,
as a temporary solution, edit your theromstat.json file located in the /html/pages/control/widgets/homegenie/generic/   directory. Replace this

 RenderView: function (cuid, module) {
    var displayUnit = 'Celcius'; // or 'Fahrenheit'
    var container = $(cuid);

with

 RenderView: function (cuid, module) {
    var displayUnit = 'Fahrenheit'; // or 'Fahrenheit'
    var container = $(cuid);




November 21, 2014, 01:56:15 AM
Reply #17

bradvoy

  • ***
  • Information
  • Full Member
  • Posts: 50
mblack,

Thanks!  That did it.  I am now able to control my thermostats with the widget.

November 22, 2014, 04:22:40 PM
Reply #18

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,

My understanding of your APP is this virtual thermostat is able to command directly a switch on/off (in zwave or X10) without a need of a real thermostat.
So you can use it for different type of heating (boiler, electric radiator, fan heater/cooler, ...).

Is it true ?
Bye

November 25, 2014, 12:14:33 AM
Reply #19

Marco

  • **
  • Information
  • Jr. Member
  • Posts: 36
Hi Nolio,
it's correct.
OR You can control easily a led of  one relay optical isolated like this
http://www.aliexpress.com/item/5V-Isolation-Relay-Module-Optocoupler-Driver-Module/1246826307.html

Use the contact of the relay to control ON/OFF your boiler.
Possible you need of another relay for the proper current and voltage of your load.

Marco
« Last Edit: November 25, 2014, 08:27:51 AM by Marco »

November 27, 2014, 12:16:47 PM
Reply #20

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

Other ideas for your Virtual Thermostat.

1 - I saw that you previous 3 states ( Stop, Cool, Heat ), in france we have a third wire in electric heater, ans local thermostat in the heater can set  4 states :
- Confort,  Eco, Hors Gel, ArrĂȘt in English it means Confort, Eco, No Frost, Stop.
At this we can had Cool for Inverter.

2 - Had scheduler condition  to the Thermostat

Best regards
Dani


November 28, 2014, 06:08:50 PM
Reply #21

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Here a new version of the thermostat app.
It now wait 5 minutes before switching back to a previous state.
For instance see at this sequence:

1) set point is 21
2) the temperature is 19
3) thermostat app go into "Heating Mode"
4) the temperature is now 21
5) the thermostat mode is now "Pending Heat"
6) someone open the window (as Marco suggested =)) and the temperature goes back fastly to 20
7) in the previous release the app would switch to "Heating Mode" again; with newer version will wait at least 5 minutes before switch back to "Heating Mode"

this avoid switching from Heating to Pending forth and back too often.
Also annoying repeated popup showing thermostat status have been fixed. The popup will only show once, when the thermostat app state changed.

Marco: as you seem to be the first one testing this, let me know if there are better optimization we can make to it.

Dani: for your idea 1, it would be useful having someone making a real test of this case, so to obtain a better guidance and understanding of possible ways to implement it. For idea nr. 2, a scheduler condition will be implemented along with a calendar UI... I'm thinking about it aready since the beginning, just waiting for some inspiration about the UI.

Cheers,
g.

November 28, 2014, 08:51:30 PM
Reply #22

Marco

  • **
  • Information
  • Jr. Member
  • Posts: 36
Hi Gene,
asap, I make a real test of your solution..

But I think if is possible modify with the first advice "Adjusting differential thermal" +/- 0.1/0.5/1 degree at setpoint, is better.. is a feature included in the most thermostats.
And so you can use this adjustment for "cool" and "heat".
Or use your app not only for the boiler
I think for example a lamp for floriculture don't need 5 minute of delay time or isn't a problem for ON/OFF frequently or an aquarium.

thank

Marco
« Last Edit: November 28, 2014, 09:02:27 PM by Marco »

November 28, 2014, 10:22:21 PM
Reply #23

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
All right Marco, I'll improve it like you said and update the app here soon.
Thanks!

g.

November 28, 2014, 10:50:38 PM
Reply #24

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Here the updated app which now waits for the temperature to get at least 1 degree below the setpoint before starting to heat again.
If this will be working fine, then I'll add a configuration parameter to the program so that the user can configure the preferred difference value.

g.

November 30, 2014, 02:33:52 AM
Reply #25

Marco

  • **
  • Information
  • Jr. Member
  • Posts: 36
Hi Gene,
I tested the last app but I think something is wrong ..the status is locked in "heating".
the temperature is read correctly
nothing happen if I change set point, the status not change.
thank
Marco

November 30, 2014, 01:13:05 PM
Reply #26

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Marco,

check if the app is still running. I've experienced some errors too when restarting the MCP3008, the Thermostat app sometimes stop with an error.
I'll check out this.

g.

November 30, 2014, 01:53:04 PM
Reply #27

Marco

  • **
  • Information
  • Jr. Member
  • Posts: 36
Hi Gene,
in details found this:
Program.Status = "Running"
Sun Nov 30 2014 13:39:37 GMT+0100 (ora solare Europa occidentale)

Runtime.Error = "CR: Object reference not set to an instance of an object"
Sun Nov 30 2014 02:12:35 GMT+0100 (ora solare Europa occidentale)

I don't have setting "Module to switch on/off on set point" but I remember worked first to change app.(I deleted it and reimported the new).
I can change the "status" and "mode"manually using icon  "OFF" and  "HEAT" but not work automatically when the temperature is the same or upper

Thank
Marco


November 30, 2014, 02:40:18 PM
Reply #28

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Ok Marco,

there were a couple of weak data consinstency checks. I fixed it. It should be rock solid now =)
Let me know how it go.
If you don't have a switch module connected yet, you can test it with one of the Philips Hue lights:
HomeAutomation.PhilipsHue:1
So you'll also have feedback when the module is switched on off (in the analytics section as well).

Cheers,
g.

November 30, 2014, 11:36:04 PM
Reply #29

Marco

  • **
  • Information
  • Jr. Member
  • Posts: 36
Hi Gene,
good work!!

now work as you described, change the status only below of 1 or 1 and 1/2 degrees from setpoint (depending to the time who the generic thermostat read the temperature from the sensor)
 
For start it, needed set the parameter "Module to switch on/off on set point".

I know is only a beta release...but the temperature displayed is the last read, first to change the status, it change value only when there is a new status.
So if the status not change, I display a wrong temperature all the time.

Is not better see the temperature in real time and add a parameter like "Update interval"  from the sensor?
And check  for 1 degree below or a temperature range in background?

Thank
Marco