Hi,
I'm reacting on the multicommand from the valve and send requests and responses.
I only get the E5 status if the controler (Raspberry with Razberry) is down (happens sometimes) and there is no response from the controler for some time. After the controler is back again the valves recover from E5 on their own (no manual interaction on the valve necessary). I heard that requesting the battery value helps, therefor thats on of the first actions after the valve is awake.
I add my programm which starts if the valve is awake!
When.ModuleParameterChanged((module, parameter) => {
if (module.Parameter("ZWaveNode.ManufacturerSpecific").Value == "0002:0005:0004")
{
if (parameter.Name == "ZWaveNode.WakeUpNotify")
{
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + " - " + module.Instance.Address + "WakeUp Notification received");
// get Battery Level
module.Command("Battery.Get").Execute();
Pause(.2);
// set Thermostat set point
var command = module.Command("Thermostat.SetPointSet");
if (module.Parameter("Thermostat.Mode").Value == "Heat")
{
// command.Execute("Heating/" + module.Parameter("Thermostat.SetPoint.Heating").Value);
// Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Thermostat SetPoint Set Heat - " + module.Parameter("Thermostat.SetPoint.Heating").Value + "°C");
}
else if (module.Parameter("Thermostat.Mode").Value == "HeatEconomy")
{
command.Execute("Heating/" + module.Parameter("Thermostat.SetPoint.HeatingEconomy").Value);
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Thermostat SetPoint Set HeatEconomy - " + module.Parameter("Thermostat.SetPoint.HeatingEconomy").Value + "°C");
}
else if (module.Parameter("Thermostat.Mode").Value == "Furnace")
{
command.Execute("Heating/" + module.Parameter("Thermostat.SetPoint.Furnace").Value);
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Thermostat SetPoint Set Furnace - " + module.Parameter("Thermostat.SetPoint.Furnace").Value + "°C");
}
else if (module.Parameter("Thermostat.Mode").Value == "Off")
{
command.Execute("Heating/5");
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Thermostat SetPoint Set Off - 5°C");
}
Pause(.2);
// query Thermostat set point
module.Command("Thermostat.SetPointGet").Execute("Heating");
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Thermostat Get SetPoint Heating - " + module.Parameter("Thermostat.SetPoint.Heating").Value + "°C");
Pause(.2);
// set WakeUpInterval to 900 sec
module.Command("WakeUp.Set").Execute(module.Parameter("HomeGenie.ZWaveThermoWakeUpInterval").Value);
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Set WakeUpIntervall - " + module.Parameter("HomeGenie.ZWaveThermoWakeUpInterval").Value + " Sec");
Pause(.2);
// get WakeUpInterval
module.Command("WakeUp.Get").Execute();
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Get WakeUpIntervall - " + module.Parameter("ZWaveNode.WakeUpInterval").Value + " Sec");
Pause(.2);
// no more info, send the node to sleep
module.Command("WakeUp.SendToSleep").Execute();
Program.Notify("Danfoss Thermostat OnWakeUp", module.Instance.Name + "<br>" + module.Instance.Address + " Send to Sleep");
}
}
return true; // continue processing event
});
Program.GoBackground();
This program interacts with my Danfoss Widget which sets the values for heatpoints and WakeUpTime.
I also changed the Timetable programm! For Danfoss valves it only changes the heating mode and doesn't send any command to the valve (it's anyway sleeping). Only my "MySendDataOnWakeUp" programm sends commands to the valve. Also the Thermostat Widget doesn't send any command to the valve.
The notify messages are only for debugging and you can skip them.
Some background: I only use Economy, Furnace and Off mode to set different values. If the heating mode is set to Heating then I don't change the value on the valve. This state acts like a manual mode. So I don't override the manual set values from the valve. Therefor no setpoint set command is issued in heating mode.
Hope that helps!
br. Christian