more G-Labs products

Author Topic: Danfoss Living Connect Radiator Valve  (Read 3019 times)

December 30, 2015, 03:27:15 PM
Read 3019 times

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
Hi Gene,

I saw in the forum that you already had the topic on the table.
I now played a little with the Living Connect Module and found some interesting messages in the log.
They could maybe help to enhance the implementation of this module.

The vendor specific code is 0002:0005:0004

Supported classes are:
Battery, 46,75,81,8F, EF, Therostat set point, Version, WakeUp.

I attach the logfile.

If you have some time left, maybe you can have a look at this.

Thanks  and best regards
Christian

January 14, 2016, 09:10:57 AM
Reply #1

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
Hi Gene,

I did a little research about the Danfoss Living connect Radiator Valve.

I get the following log.
Code: [Select]
2015-12-30 14:25:53.9372 Info WebServiceGateway   192.168.1.1   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/ [CLOSED AFTER 0,002 seconds]
2015-12-30 14:25:56.1250 Debug 01-22-00-04-00-19-1C-8F-01-06-03-80-03-53-06-43-03-01-42-08-98-04-46-08-00-7F-02-81-05-02-46-04-02-84-07-60
2015-12-30 14:25:56.1255 Debug ZWaveMessage (RawData=01-22-00-04-00-19-1C-8F-01-06-03-80-03-53-06-43-03-01-42-08-98-04-46-08-00-7F-02-81-05-02-46-04-02-84-07-60)
2015-12-30 14:25:56.1255 Debug ZWaveMessage (Direction=Inbound, Header=SOF, NodeId=25, Type=Request, Function=ApplicationCommandHandler, CommandClass=MultiCmd)
2015-12-30 14:25:56.1262 Debug 06
MultiCmd encapsulated message: 8F-01-06-03-80-03-53-06-43-03-01-42-08-98-04-46-08-00-7F-02-81-05-02-46-04-02-84-07
Processing message chunk: 80-03-53
Processing message chunk: 43-03-01-42-08-98
Processing message chunk: 46-08-00-7F
Can't find CommandClass handler for command class 70
Processing message chunk: 46-08-00-7F
Can't find CommandClass handler for command class 70
Processing message chunk: 46-08-00-7F
Can't find CommandClass handler for command class 70
Processing message chunk: 46-08-00-7F
Can't find CommandClass handler for command class 70
2015-12-30 14:25:56.1275 Debug NodeUpdated (NodeId=25, Parameter=Battery, Value=83)
2015-12-30 14:25:56.1286 Info HomeAutomation.ZWave   25   ZWave Node   ZWaveNode.Battery   83
2015-12-30 14:25:56.1292 Info HomeAutomation.ZWave   25   ZWave Node   Status.Battery   83
2015-12-30 14:25:56.1324 Info HomeAutomation.ZWave   25   ZWave Node   Thermostat.SetPoint.Heating   22


My problem is now that in the Multicommand the WakeUp Notification is the last command

MultiCmd encapsulated message: 8F-01-06-03-80-03-53-06-43-03-01-42-08-98-04-46-08-00-7F-02-81-05-02-46-04-02-84-07

After the detection of unsupported command-classes  0x46 and 0x81(Thermostat Schedule, Clock)
MultiCmd encapsulated message: 8F-01-06-03-80-03-53-06-43-03-01-42-08-98-04-46-08-00-7F-02-81-05-02-46-04-02-84-07

As HG stops after unsupported command-class detection I never get the Wakeup notification and therefor the sleep Flag is not cleared. -->  No command to the valve.

Can you help?

Thanks and best regards!
Christian

January 14, 2016, 10:35:07 AM
Reply #2

dani

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

If you can compile ZWaveLib, you have to modify the file MultiCmd.cs

Code: [Select]
                if (cc == null)
                {
                    Utility.DebugLog(DebugMessageType.Information, String.Format("Can't find CommandClass handler for command class {0}", cmdClass));
                    offset += (byte)(length + 1);   // Add that line for analyze the remaining class
                    continue;
                }

At line 66 insert a copy of line 71 :
  offset += (byte)(length + 1);
« Last Edit: January 14, 2016, 10:41:00 AM by dani »

January 14, 2016, 02:07:59 PM
Reply #3

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
Hi dani,

thanks for the hint, I'll try to build the library.

br. Christian

January 14, 2016, 02:47:08 PM
Reply #4

Gene

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

let me know if this is working so I can include the correction in next ZWaveLib/HG update.

Cheers,
g.

January 14, 2016, 02:54:03 PM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Here is the patched ZWaveLib for you to try. Must be replace in the homegenie/lib/mig folder after stopping hg.

g.


January 14, 2016, 04:55:07 PM
Reply #6

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
Hi Gene, dani,  ;D

thanks for the library Gene!
Danis changes work for me!
Get now the WakeUp notification and commands are sent to the valve.

br. Christian

January 20, 2016, 02:19:54 PM
Reply #7

Maximo

  • ***
  • Information
  • Full Member
  • Posts: 84
Hi Christian,

Does this mean that you have full functionality of the device with the changes that have been made? I have a couple of Stella Z TRV's that don't want to play ball so was thinking of using an alternative but only one that fully functions. Although I am going to try and build a new widget for them to see if I can gain some control.

The main use I guess for me is being able to adjust the Set Point of the TRV to suit. I.E. Adjusting the TRV Set Point higher or low depending on the weather information.

Thanks,

Garry

January 20, 2016, 05:58:40 PM
Reply #8

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
Hi,
I'm using the setpoint set/get funcionality together with a customized widget and a customized calendar program to take care of the special Danfoss behavior --> that works for me. So I'm not using the build in Calendar functionality of the valve and therefor I also don't need the clock feature inside. I just send the predifined heating values (economy, heating and furnance) with the calendar program to the valve.

br. Christian

February 02, 2016, 10:32:21 AM
Reply #9

Ste

  • *
  • Information
  • Newbie
  • Posts: 8
Hi Christian,

I have your same radiator valve and with HG version 514 I'm able to Get/Set the setpoint on the device.
After about 10 wakeup cycle the valve go in "E5" status and sends the battery status every 30 minutes (standard error timeout).
In "E5" status I can't control it anymore.
Could you help me understanding what's wrong?
Maybe some command send by  the standard widget?

Thank you very much :)

Ste

February 04, 2016, 12:28:45 PM
Reply #10

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi emerich can you post your source code for that. I am interesting.

Cheers
Dani

February 07, 2016, 04:48:00 PM
Reply #11

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
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!

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

February 10, 2016, 10:02:51 AM
Reply #12

Ste

  • *
  • Information
  • Newbie
  • Posts: 8
Thank you very much emerich it helps me a lot  8)

May be usefull create a section in the forum with the supported hardware and the modules/solutions to let it work?
For example emerich's module will be the "standard" for the Danfoss radiator valve, any topic about this HW will start from here and don't get lost in the forum.
Quickly we can have a supported HW baseline also for the beginners.

What do you think about?

Ste