<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Request: New Sensor Type ? Thermostatically controlled switch]]></title><description><![CDATA[<p dir="auto">Would like to suggest a new sensor type, maybe V_SWTEMP?</p>
<p dir="auto">It would allow the controller to set a temp as a trip point for the switch/relay that could be stored in EEPROM.  This would allow the sensor node to continue to operate as a thermostat even when all comm with the gateway/controller might be lost. Under normal operation the controller could change the thermostat setting or even override the thermostat to force the sw/relay on/off.  What is needed to implement this?</p>
<p dir="auto">Currently have testbed: Arduino clone as sensor node talking to RPi as Gateway (via the NRF24L01+'s) - The RPi communicates via TCP/IP (had to mod the mySensors/Raspberry port to build a PiGatewayNetwork module to use the Domoticz's 'MySensors to gateway with LAN interface' setting) with a virtual machine on my development pc running Domoticz.</p>
<p dir="auto">Have tried to use the Domoticz's dimmer (virtual) as a way to transfer values into the sensor node but it doesn't seem to be fully implemented yet (using V2.2383) - sends a non-sensical string back to gateway.  Like Domoticz but still can't seem to 'get there' with it yet.</p>
<p dir="auto">Any help would be appreciated,<br />
thanks, littlejohn</p>
]]></description><link>https://forum.mysensors.org/topic/1337/request-new-sensor-type-thermostatically-controlled-switch</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 04:43:31 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/1337.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 May 2015 15:05:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Fri, 06 May 2016 09:01:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hek" aria-label="Profile: hek">@<bdi>hek</bdi></a> do you know anyone who would like to implement this for some "beer"?</p>
]]></description><link>https://forum.mysensors.org/post/38482</link><guid isPermaLink="true">https://forum.mysensors.org/post/38482</guid><dc:creator><![CDATA[pjr]]></dc:creator><pubDate>Fri, 06 May 2016 09:01:32 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Mon, 18 Jan 2016 17:04:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hek" aria-label="Profile: hek">@<bdi>hek</bdi></a> Just added: <a href="https://github.com/mysensors/Arduino/issues/356" rel="nofollow ugc">356</a></p>
]]></description><link>https://forum.mysensors.org/post/28919</link><guid isPermaLink="true">https://forum.mysensors.org/post/28919</guid><dc:creator><![CDATA[pjr]]></dc:creator><pubDate>Mon, 18 Jan 2016 17:04:34 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Fri, 15 Jan 2016 11:58:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pjr" aria-label="Profile: pjr">@<bdi>pjr</bdi></a></p>
<p dir="auto">Interesting idea. Please add an issue on github.</p>
]]></description><link>https://forum.mysensors.org/post/28699</link><guid isPermaLink="true">https://forum.mysensors.org/post/28699</guid><dc:creator><![CDATA[hek]]></dc:creator><pubDate>Fri, 15 Jan 2016 11:58:25 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Fri, 15 Jan 2016 11:35:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hek" aria-label="Profile: hek">@<bdi>hek</bdi></a> some new ideas for this:</p>
<p dir="auto">There is now <a href="https://www.domoticz.com/forum/viewtopic.php?f=31&amp;t=7244" rel="nofollow ugc">new switch type(SELECTOR) presented in Domoticz</a>. With that its now possible to handle with V_HVAC enum switches.</p>
<p dir="auto">I was thinking this functionality and new functionality of MySensors for presenting (enum)switch values would be more than nice. With this the controller could build the switch dynamically with values the HVAC device really has.</p>
<p dir="auto">For example:</p>
<ol>
<li>gw.presentcaps(childId, listOfValues) (user could give names for these in the controller)</li>
<li>or even better: gw.presentcaps(childId, listOfKeys) (in this case values would be from 0 to count of list but names are provided automatically)</li>
<li>or the best: gw.presentcaps(childId, listOfValues, listOfKeys). The contoller could buid up the switch from this info.</li>
</ol>
<p dir="auto">It would be alternative for gw.present(...) or called after?</p>
<p dir="auto">Keys would be used in UI of contoller and values(list of 8 bit int?) are what is transferred in messages.<br />
For example my air source heat pump has only V_HVAC_MODE modes "Off", "HeatOn", "CoolOn". Values for these could be 0, 1 and 2.</p>
]]></description><link>https://forum.mysensors.org/post/28698</link><guid isPermaLink="true">https://forum.mysensors.org/post/28698</guid><dc:creator><![CDATA[pjr]]></dc:creator><pubDate>Fri, 15 Jan 2016 11:35:50 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Mon, 26 Oct 2015 12:55:40 GMT]]></title><description><![CDATA[<p dir="auto">I finally put together a thermostat device sketch. Unfortunately it got a bit out of hand and I implemented lots of features that most people probably not need.</p>
<p dir="auto">Not sure if I'm using the V_HVAC_FLOW_STATE and V_HVAC_SETPOINT_HEAT correctly but it seems to work with my Vera UI5 presented as a S_HEATER device.</p>
<p dir="auto">Here is the sketch in case someone needs it.</p>
<p dir="auto"><a href="https://codebender.cc/sketch:169733" rel="nofollow ugc">https://codebender.cc/sketch:169733</a></p>
]]></description><link>https://forum.mysensors.org/post/23479</link><guid isPermaLink="true">https://forum.mysensors.org/post/23479</guid><dc:creator><![CDATA[korttoma]]></dc:creator><pubDate>Mon, 26 Oct 2015 12:55:40 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Fri, 16 Oct 2015 13:16:08 GMT]]></title><description><![CDATA[<p dir="auto">i am also very interested in the arduino sketch and how you wired it :)</p>
]]></description><link>https://forum.mysensors.org/post/22923</link><guid isPermaLink="true">https://forum.mysensors.org/post/22923</guid><dc:creator><![CDATA[BigDog]]></dc:creator><pubDate>Fri, 16 Oct 2015 13:16:08 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Tue, 22 Sep 2015 10:43:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stephenmhall" aria-label="Profile: stephenmhall">@<bdi>stephenmhall</bdi></a> would you mind sharing your latest version of the HVAC device arduino sketch?</p>
]]></description><link>https://forum.mysensors.org/post/21468</link><guid isPermaLink="true">https://forum.mysensors.org/post/21468</guid><dc:creator><![CDATA[korttoma]]></dc:creator><pubDate>Tue, 22 Sep 2015 10:43:53 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Sun, 20 Sep 2015 18:22:01 GMT]]></title><description><![CDATA[<p dir="auto">I've been thinking of integrating my <a href="https://github.com/ToniA/arduino-heatpumpir" rel="nofollow ugc">HeatpumpIR library</a> into MySensors. The S_HVAC isn't quite 1:1 mapping to what I've been thinking of, here's a Visual Studio screenshot of my current remote control app (sorry, not a fruit company one :)):</p>
<p dir="auto"><img src="/uploads/files/1442772900079-heatpump.png" alt="heatpump.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So, I think I'd need to pass this data for example from Domoticz to the MySensors node:</p>
<ul>
<li>Heatpump model (could be an index number to the list of supported models)</li>
<li>Power mode (on/off)</li>
<li>Operating mode (auto, heat, cool, dry, fan, maintenance heating)</li>
<li>Temperature (8,10, 16-30 degrees Celcius)</li>
<li>Fan speed (auto, 1-5)</li>
</ul>
<p dir="auto">As this is technically an infrared device, I've been also thinking of using the S_IR node type. I think I could pack the data into a 32-bit integer as an alternative. There's also no Domoticz support for this yet.</p>
<p dir="auto">Any ideas would be welcome.</p>
]]></description><link>https://forum.mysensors.org/post/21346</link><guid isPermaLink="true">https://forum.mysensors.org/post/21346</guid><dc:creator><![CDATA[ToniA]]></dc:creator><pubDate>Sun, 20 Sep 2015 18:22:01 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Mon, 13 Jul 2015 10:53:36 GMT]]></title><description><![CDATA[<p dir="auto">Sorry for my answer took a while. I was having weekend trip with my family.</p>
<p dir="auto">IMO the FLOW -keyword is not so needed for the "main" function mode. I was thinking FLOW as container for different set of enum values additional to HVAC mode. For fans or liquid pumps the machine may contain.</p>
<p dir="auto">So in the end these would be the things I think:<br />
S_HVAC<br />
V_HVAC_SETPOINT_HEAT<br />
V_HVAC_SETPOINT_COLD<br />
V_HVAC_MODE ("Off", "HeatOn", "CoolOn", "AutoChangeOver" or "Dry") Some heat pumps has also "Dry/Dehumidifying" mode.<br />
V_HVAC_FLOW_STATE ("Auto", "ContinuousOn", or "PeriodicOn") How the fan/liquid pump behaves<br />
V_HVAC_FLOW_SPEED ("Auto", "Min", "Normal" or "Max") And what speed it uses.</p>
<p dir="auto">In <a href="http://www.mysensors.org/download/serial_api_14" rel="nofollow ugc">documentation</a> there is:</p>
<pre><code>V_HEATER	21	Mode of header. One of "Off", "HeatOn", "CoolOn", or "AutoChangeOver"
V_HEATER_SW	22	Heater switch power. 1=On, 0=Off
</code></pre>
<p dir="auto">So porting to new arrangement would require sketch update like this?<br />
V_HEATER -&gt; V_HVAC_MODE (has identical states)<br />
V_HEATER_SW -&gt; Could the V_HEATER_SW remain or be renamed to V_HVAC_SW as we might need it to some alternative functionality? Electronic air filtering for example.</p>
<p dir="auto">V_HVAC_FLOW_SPEED for example in ventilation I could use Min when no one is home, Normal when my family is at home and Max when there is lot of quests and Auto it would run based on sensors.</p>
<p dir="auto">About V_HVAC_MODE I'm wondering could the node report the states it can use to controller? Then the controller could be able to filter its UI based on this information.</p>
<p dir="auto">I'm not sure about other heat pumps/ventilation systems but with these I'm able interface my two pumps + ventilation.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hek" aria-label="Profile: hek">@<bdi>hek</bdi></a> thank you very much in advance :)</p>
]]></description><link>https://forum.mysensors.org/post/16943</link><guid isPermaLink="true">https://forum.mysensors.org/post/16943</guid><dc:creator><![CDATA[pjr]]></dc:creator><pubDate>Mon, 13 Jul 2015 10:53:36 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Fri, 10 Jul 2015 17:43:31 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the help to interpret the needed changes @prj. The Heater/HVAC thing is a bit messy.</p>
<p dir="auto">So what about this:</p>
<p dir="auto"><strong>Rename</strong><br />
V_HEATER =&gt; V_HVAC_SETPOINT_HEAT (Used for heating devices setpoint). We must be able to handle both HEAT/COLD setpoint for this to be compatible with Vera.<br />
V_HEATER_SW =&gt; V_HVAC_FLOW_STATE ("Off", "HeatOn", "CoolOn", or "AutoChangeOver")</p>
<p dir="auto"><strong>New variables</strong><br />
V_HVAC_SETPOINT_COLD (Used for setting setpoint on hvac devices)<br />
V_HVAC_FLOW_MODE ("Auto", "ContinuousOn", or "PeriodicOn")</p>
<p dir="auto"><strong>New device type</strong><br />
S_HVAC (As Vera seems to distinguish between Heater and HVAC devices)</p>
<p dir="auto">I will also backport new device types and variables from development to master branch to keep things in sync.</p>
]]></description><link>https://forum.mysensors.org/post/16869</link><guid isPermaLink="true">https://forum.mysensors.org/post/16869</guid><dc:creator><![CDATA[hek]]></dc:creator><pubDate>Fri, 10 Jul 2015 17:43:31 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Thu, 09 Jul 2015 09:59:14 GMT]]></title><description><![CDATA[<p dir="auto">Would this require something else but adding new message types to MyMessage.h?</p>
<p dir="auto">hek: Looks like in Vera it can handle many cases + many other I cant imagine yet. So it would be good idea to not invent wheel again :D</p>
<p dir="auto">Just throwing some ideas(mainly naming) about this:</p>
<p dir="auto">(already) V_HEATER (while it supports needed modes already) == HVAC_UserOperatingMode1<br />
Perhaps rename to V_HVAC_MODE and V_HVAC_SW?</p>
<p dir="auto">With setpoints, do we really need two separate values?<br />
(needed) V_SETPOINT_HEAT == TemperatureSetpoint1_Heat<br />
(needed) V_SETPOINT_COOL == TemperatureSetpoint1_Cool<br />
OR:<br />
(needed) V_SETPOINT == TemperatureSetpoint1</p>
<p dir="auto">Couple ques tions to make some discussion:<br />
Could V_SETPOINT be enough? Just use two instances of these?<br />
Or should MySensors have all three options?</p>
<p dir="auto">Are these two mainly for controlling fans? Could general naming for fans, circulating pumps etc. be for example FLOW?<br />
(needed) V_FLOW_STATE(Do we need some additional states compared to Vera?) == HVAC_OperatingState1<br />
(needed) V_FLOW_MODE == HVAC_FanOperatingMode1 (why to use only for fans. it could be circulating pumpt etc..)</p>
<p dir="auto">Should there be HVAC prefix on every of these?</p>
<p dir="auto">And would it be good idea to rename S_HEATER to S_HVAC?</p>
]]></description><link>https://forum.mysensors.org/post/16800</link><guid isPermaLink="true">https://forum.mysensors.org/post/16800</guid><dc:creator><![CDATA[pjr]]></dc:creator><pubDate>Thu, 09 Jul 2015 09:59:14 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Tue, 16 Jun 2015 11:33:07 GMT]]></title><description><![CDATA[<p dir="auto">Nice work :+1:</p>
<p dir="auto"><a href="http://forum.mysensors.org/topic/1471/s_setpoint-v_setpoint-for-thermostat-devices" rel="nofollow ugc">http://forum.mysensors.org/topic/1471/s_setpoint-v_setpoint-for-thermostat-devices</a><br />
SetPoint is the thing I need to make the next step.<br />
I'll start my project soon as this is merged :)</p>
]]></description><link>https://forum.mysensors.org/post/15566</link><guid isPermaLink="true">https://forum.mysensors.org/post/15566</guid><dc:creator><![CDATA[pjr]]></dc:creator><pubDate>Tue, 16 Jun 2015 11:33:07 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Sat, 13 Jun 2015 23:33:29 GMT]]></title><description><![CDATA[<p dir="auto">Nice Indeed!, too bad I left Vera..  :cry:  .. Well Not really.. :-)</p>
]]></description><link>https://forum.mysensors.org/post/15452</link><guid isPermaLink="true">https://forum.mysensors.org/post/15452</guid><dc:creator><![CDATA[RJ_Make]]></dc:creator><pubDate>Sat, 13 Jun 2015 23:33:29 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Sat, 13 Jun 2015 20:11:31 GMT]]></title><description><![CDATA[<p dir="auto">Damn! Great work!</p>
<p dir="auto">I'll merge this ASAP.</p>
]]></description><link>https://forum.mysensors.org/post/15447</link><guid isPermaLink="true">https://forum.mysensors.org/post/15447</guid><dc:creator><![CDATA[hek]]></dc:creator><pubDate>Sat, 13 Jun 2015 20:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Sat, 13 Jun 2015 17:07:56 GMT]]></title><description><![CDATA[<p dir="auto">I went with your suggestion, its definitely a work in progress, but there is progress.<br />
I have a nano with DHT22 sensor and a relay for heating on/off.<br />
I played with the I_Arduino.xml and L_Arduino.lua files and added</p>
<pre><code>HVAC = {26, "urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1", "D_HVAC_ZoneThermostat1.xml", "HVAC "}
</code></pre>
<pre><code>HVAC = {40, "urn:upnp-org:serviceId:TemperatureSetpoint1", "CurrentSetpoint", "" }
</code></pre>
<pre><code>function SetTheNewHvacTemp(device, NewCurrentSetpoint)
	sendCommand(luup.devices[device].id,"HVAC",NewCurrentSetpoint)
end
</code></pre>
<p dir="auto">to L_Arduino.lua</p>
<p dir="auto">and</p>
<pre><code>&lt;action&gt;
  &lt;serviceId&gt;urn:upnp-org:serviceId:TemperatureSetpoint1&lt;/serviceId&gt;
    &lt;name&gt;SetCurrentSetpoint&lt;/name&gt;
      &lt;job&gt;
        if (p ~= nil) then p.SetTheNewHvacTemp(lul_device, lul_settings.NewCurrentSetpoint)  end
  			return 4,0
      &lt;/job&gt;
&lt;/action&gt;
</code></pre>
<p dir="auto">to  I_Arduino.xml</p>
<p dir="auto">Also added V_HVAC and S_HVAC to MyMessage.h for Arduino.</p>
<p dir="auto">And I get this on Vera Edge UI7</p>
<p dir="auto"><img src="/uploads/files/1434213743594-vera_arduino_hvac.png" alt="vera_arduino_hvac.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As of now I can change the setpoint, although it comes back from the node as 27.6 which throws off the vera temp display, makes it 2 line but shows it, I can also send the states "CoolOn", "HeatOn" and so on.</p>
<p dir="auto">I haven't worked out how to get the temp on the card instead of separate, or the battery level yet.</p>
<p dir="auto">Here is serial from node<br />
<img src="/uploads/files/1434214405357-vera_arduino_hvac_serial.png" alt="vera_arduino_hvac_serial.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Here is my node sketch</p>
<pre><code>#include &lt;SPI.h&gt;
#include &lt;MySensor.h&gt;  
#include &lt;DHT.h&gt;
#include &lt;Bounce2.h&gt;

#define NODE_ID AUTO
#define SKETCH_NAME "MySensor_Heater"
#define SKETCH_VERSION "1.1"
#define NODE_REPEAT true

#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
#define CHILD_ID_HVAC 2
#define CHILD_ID_BATT 3
#define CHILD_ID_HEATER_SW 4

#define HUMIDITY_SENSOR_DIGITAL_PIN 3
#define RELAY_PIN  4  // Arduino Digital I/O pin number for relay 
#define BUTTON_PIN  5  // Arduino Digital I/O pin number for button 
#define RELAY_ON 0
#define RELAY_OFF 1
unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)

Bounce debouncer = Bounce(); 
int oldValue=0;
bool state;
MySensor gw;
DHT dht;
float lastTemp;
float lastHum;
boolean metric = true;
unsigned long CHECK_TIME = millis();
String heaterMode = "Off";
int setPoint = 20;
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
MyMessage msgHeaterSW(CHILD_ID_HEATER_SW,V_HEATER_SW);
//MyMessage msgHeaterState(CHILD_ID_HEATER_STATE,V_HEATER);
MyMessage msgHvac(CHILD_ID_HVAC, V_HVAC);
MyMessage msgBattery(CHILD_ID_BATT, I_BATTERY_LEVEL);

void setup()  
{ 
  gw.begin(incomingMessage,NODE_ID,NODE_REPEAT);
  dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 

  // Send the Sketch Version Information to the Gateway
  gw.sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
  
  // Setup the button
  pinMode(BUTTON_PIN,INPUT);
  // Activate internal pull-up
  digitalWrite(BUTTON_PIN,HIGH);
  
  // After setting up the button, setup debouncer
  debouncer.attach(BUTTON_PIN);
  debouncer.interval(5);

  // Register all sensors to gw (they will be created as child devices)
  gw.present(CHILD_ID_HUM, S_HUM);
  gw.present(CHILD_ID_TEMP, S_TEMP);
  //gw.present(CHILD_ID_HEATER_SW, S_HEATER);
  //gw.present(CHILD_ID_HEATER_STATE, S_HEATER);
  gw.present(CHILD_ID_HVAC, S_HVAC);
  
  metric = gw.getConfig().isMetric;
  
  // Make sure relays are off when starting up
  digitalWrite(RELAY_PIN, RELAY_OFF);
  // Then set relay pins in output mode
  pinMode(RELAY_PIN, OUTPUT);   
      
  // Set relay to last known state (using eeprom storage) 
  //state = gw.loadState(CHILD_ID);
  //digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
}

void loop()      
{
  gw.process();
  debouncer.update();
  // Get the update value
  int value = debouncer.read();
  if (value != oldValue &amp;&amp; value==0) {
      gw.send(msgHvac.set(state?false:true), true); // Send new state and request ack back
  }
  oldValue = value;
  
  // Check Temp and Humidity sensor every set ammount of time
  unsigned long NOW_TIME = millis();
  if(NOW_TIME - CHECK_TIME &gt;= SLEEP_TIME) {
    getTemps();
    CHECK_TIME = NOW_TIME;
  }
  
  
}

void getTemps(){
  delay(dht.getMinimumSamplingPeriod());

  float temperature = dht.getTemperature();
  if (isnan(temperature)) {
      Serial.println("Failed reading temperature from DHT");
  } else if (temperature != lastTemp) {
    lastTemp = temperature;
    if (!metric) {
      temperature = dht.toFahrenheit(temperature);
    }
    gw.send(msgTemp.set(temperature, 1));
    //gw.send(msgHvac.set(temperature, 1));
    gw.send(msgBattery.set(65, 1));
    Serial.print("T: ");
    Serial.println(temperature);
  }
  
  float humidity = dht.getHumidity();
  if (isnan(humidity)) {
      Serial.println("Failed reading humidity from DHT");
  } else if (humidity != lastHum) {
      lastHum = humidity;
      gw.send(msgHum.set(humidity, 1));
      Serial.print("H: ");
      Serial.println(humidity);
  }

  //gw.sleep(SLEEP_TIME); //sleep a bit
  
}

void incomingMessage(const MyMessage &amp;message) {
  Serial.println(message.type);
  //Serial.println(message.value);
  // We only expect one type of message from controller. But we better check anyway.
  if (message.isAck()) {
     Serial.println("This is an ack from gateway");
  }

  if (message.type == V_HVAC) {
     // Change relay state
     Serial.println("Message received");
     setPoint = String(message.data).toInt();
     Serial.println("New Set Temp is : " + String(setPoint));
     gw.send(msgHvac.set(setPoint, 1));
     // Store state in eeprom
     //gw.saveState(CHILD_ID, state);
    
     // Write some debug info
     Serial.print("Incoming change for sensor:");
     Serial.print(message.sensor);
     Serial.print(", New status: ");
     Serial.println(message.data);
   }
  if (message.type == V_HEATER_SW) {
    Serial.println("Switch Message received");
    Serial.println(String(message.data));
    if(String(message.data) == "HeatOn"){
      Serial.println("Heating ON");
      digitalWrite(RELAY_PIN, RELAY_ON);
      //gw.send(msgHeaterSW.set("HeatOn", 1));
    }
    if(String(message.data) == "CoolOn"){
      Serial.println("Heating OFF");
      digitalWrite(RELAY_PIN, RELAY_OFF);
      //gw.send(msgHeaterSW.set("CoolOn", 1));
    }
  }
}
</code></pre>
<p dir="auto"><a href="/uploads/files/1434214680427-l_arduino.lua">L_Arduino.lua</a><br />
<a href="/uploads/files/1434214680426-i_arduino1.xml">I_Arduino1.xml</a><br />
<a href="/uploads/files/1434214714817-mymessage.h">MyMessage.h</a></p>
<p dir="auto">I have a couple of StellaZ Zwave radiator thermostats that use the hvac files, and they have many variables for temps and batteries and setpoints, but it is beyond me how to enable these for the mysensors nodes.</p>
<p dir="auto">We also need to be able to add a scene that goes</p>
<pre><code>If currentTemp is &gt; currentSetpoint
  Turn on heat
</code></pre>
<p dir="auto">and looking at scenes to switch on heating, it seems you have to add a temp to create a scene involving temperature. I don't know LUUA code at all at the moment so I do not know if you can create a function that ignores the temp you had to add to create it and looks at current temp and setpoint. babbling now.</p>
<p dir="auto">Over to you :)</p>
]]></description><link>https://forum.mysensors.org/post/15445</link><guid isPermaLink="true">https://forum.mysensors.org/post/15445</guid><dc:creator><![CDATA[stephenmhall]]></dc:creator><pubDate>Sat, 13 Jun 2015 17:07:56 GMT</pubDate></item><item><title><![CDATA[Reply to Request: New Sensor Type ? Thermostatically controlled switch on Sat, 02 May 2015 08:49:55 GMT]]></title><description><![CDATA[<p dir="auto">Yes, agree we need to have another look at the HVAC device.</p>
<p dir="auto">We could perhaps <em>steal</em> some ideas from the Vera controller<br />
<a href="http://wiki.micasaverde.com/index.php/Luup_UPNP_Files#HVAC_OperatingState1" rel="nofollow ugc">http://wiki.micasaverde.com/index.php/Luup_UPNP_Files#HVAC_OperatingState1</a></p>
<p dir="auto">It has a HVAC_UserOperatingMode1, HVAC_OperatingState1, HVAC_FanOperatingMode1 and TemperatureSetpoint1_Heat/Cool which seems to cover most use cases when it comes to controlling HVACs.</p>
<p dir="auto"><img src="/uploads/files/1430556568069-verde-dashboard.png" alt="Verde - Dashboard.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mysensors.org/post/13474</link><guid isPermaLink="true">https://forum.mysensors.org/post/13474</guid><dc:creator><![CDATA[hek]]></dc:creator><pubDate>Sat, 02 May 2015 08:49:55 GMT</pubDate></item></channel></rss>