[SOLVED] Z-Wave, Aeotec Smart Switch 6: Help Required

Firstly, all aspects of the switch reporting values are working exactly as expected.

Here are the items:

// ServerRack Z-Wave Aeotec Smart Switch 6
Switch   GF_ServerRack_                           "Server Rack"                          <poweroutlet>             (GF_ServerRack, gPower, gPowerGF, gSmartSwitch)       { channel="zwave:device:0187d957:node12:switch_binary" }
Number   GF_ServerRack_kWh                        "Server Rack [%.3f kWh]"                                         (GF_ServerRack)                                       { channel="zwave:device:0187d957:node12:meter_kwh" }
Number   GF_ServerRack_kWh_Yesterday              "Server Rack (Yesterday) [%.3f kWh]"                             (GF_ServerRack)
Number   GF_ServerRack_Amps                       "Server Rack [%.1f A]"                                           (GF_ServerRack)                                       { channel="zwave:device:0187d957:node12:meter_current" }
Number   GF_ServerRack_Volts                      "Server Rack [%.0f v]"                                           (GF_ServerRack)                                       { channel="zwave:device:0187d957:node12:meter_voltage" }
Number   GF_ServerRack_Power                      "Server Rack [%.0f w]"                                           (GF_ServerRack)                                       { channel="zwave:device:0187d957:node12:meter_watts" }
Switch   GF_ServerRack_Reset                      "Server Rack Reset"                                              (GF_ServerRack)                                       { channel="zwave:device:0187d957:node12:meter_reset", expire="5s,state=OFF" }
Color    GF_ServerRack_Color                      "Server Rack Colour"                                             (GF_ServerRack)                                       { channel="zwave:device:0187d957:node12:color_color" } 

And all works perfectly - For testing I have added the group to the sitemap and use the BasicUI, changing the switch in BasicUI for the ‘Reset’ function zeros out the kWh value as expected. However attempting to do the same through a rule does not work.

Rule:

	logInfo("smartSwitch.rules", "Resetting Power Usage & recording Yesterdays usage")
	GF_ServerRack_kWh_Yesterday.postUpdate(GF_ServerRack_kWh.state)
	GF_ServerRack_Reset.postUpdate(ON)

On the rule triggering (and watching on PaperUI) The Reset switch is triggered, the log viewer also shows this, however the kWh value does not get reset.

I’m, obviously, missing something obvious but so far cannot see what it is. Any assistance would be greatly received!

Thanks

You need to send the command to the binding:

GF_ServerRack_Reset.sendCommand(ON)

1 Like

sihui - Thank you, knew it was something obvious I was doing wrong. Solved

I was confused myself so I found this thread which has some good explanation of the difference, I believe.

@dheneghan please click the square box on the post that provided the solution e.g. @sihui post, as this is the proper way to mark a topic solved. :wink:

Thanks

1 Like