V_TEMP / V_STATUS update without ack

6 years 1 week ago #2559 by mihai.aldea
Yes, that's exactly what I did.
N9S0 is a virtual node configured as Temperature Output, N2S1 is a physical node also configured as Temperature Output.

If I move the N9S0 glider up or down, it changes its value, however the N2S1 value remains unchanged. If I upload a sketch that prevents N2S1 from sleeping (without the gw.sleep() directive) and leave it to constantly loop on gw.process(), whenever I change N9S0 value, it is instantly replicated to N2S1.

This is the automation code I'm using:
public void Setup()
{
   EventHelper.ModuleChangedHandler((o, m, p) =>
    {
      if (m.Domain == Domains.VIRTUAL && m.Address == "N9S0" && p.Property == "Sensor.Temperature")
        DriverHelper.ProcessCommad(Domains.MYSENSORS, "N2S1", "ControlLevel", p.Value);     
        return true;
    });
}

This is why I think that a Temperature Output value can not be updated unless the physical node gets the info, sends the acknowledgement to the gateway and the gateway updates the gauge with the actual data sent back by the node as part of the acknowledgement.

Please Log in or Create an account to join the conversation.

6 years 1 week ago #2566 by EasyIoT

mihai.aldea wrote: Yes, that's exactly what I did.
N9S0 is a virtual node configured as Temperature Output, N2S1 is a physical node also configured as Temperature Output.

If I move the N9S0 glider up or down, it changes its value, however the N2S1 value remains unchanged. If I upload a sketch that prevents N2S1 from sleeping (without the gw.sleep() directive) and leave it to constantly loop on gw.process(), whenever I change N9S0 value, it is instantly replicated to N2S1.

This is the automation code I'm using:

public void Setup()
{
   EventHelper.ModuleChangedHandler((o, m, p) =>
    {
      if (m.Domain == Domains.VIRTUAL && m.Address == "N9S0" && p.Property == "Sensor.Temperature")
        DriverHelper.ProcessCommad(Domains.MYSENSORS, "N2S1", "ControlLevel", p.Value);     
        return true;
    });
}

This is why I think that a Temperature Output value can not be updated unless the physical node gets the info, sends the acknowledgement to the gateway and the gateway updates the gauge with the actual data sent back by the node as part of the acknowledgement.


My mistake. Use Module helper instead of Driver helper. Replace DriverHelper.ProcessCommad with SetProperty(string domain, string address, string property, string value).

Please Log in or Create an account to join the conversation.

Time to create page: 0.214 seconds

Forum latest

  • No posts to display.