[ABANDONED] Fibaro Wall Plug ZW5

A different implementation has been posted, that is not supposed to have the issues discussed below. Some members have tested it successfully, so I recommend using it instead: [RELEASE] Fibaro Wall Plug ZW5 (Z-Wave+) DTH


Old stuff for reference:

WARNING: There are issues with this new version of the plug (hw or firmware probably) when no load is connected. Read further down in the thread. It might be intended or not, but it limits some use cases.

A new version of the Fibaro Wall Plug has just been released to the market (December 2016) . This handler is for the new version. It supports Z-Wave Plus.

You can find a handler for the previous version here: [Release] Fibaro Wall Plug (Old version, not zwave+) . The code for this handler is based on that, so thanks to @cscheiene .

I am really new to the whole Z-Wave / Smartthings eco-system so please give feedback on any improvements. I’m especially not sure about the fingerprint stuff I did in the handler. Acccording to my understanding of the docs it should be good though.

Working (and tested):

  • On/Off (of course)
  • Watt reporting
  • Kwh reporting
  • Several parameters implemented (not all of them tested)

Some notes:

  • Not all parameters has been tested, just updated against the documentation of the new switch. Please let me know if you find something that’s not working.
  • This handler is less forgiving than the previous one. If a message arrives that is not recognized by the handler it will result in an error message in the logs. This is by design to weed out anything that is missing in the handler. Please give reports back if you have some.

Please let me know if you use it. Even if it works without any hiccups, so I can upgrade it’s status. :slight_smile:

The code:
https://github.com/anderssv/smartthings-code/blob/master/devicetypes/smartthings-f12-no/fibaro-wall-plug-zw5.src/fibaro-wall-plug-zw5.groovy

3 Likes

I’d appreciate if you could update how it’s working for you @Fredde here. :slight_smile:

Hi Anders

So far all is well, many thanks for this. I have upgraded 4 wall plugs without issues and so far on/off, watt and kwh is working without issues. I have used only your defailt settings and not changed anything.

Thanks a lot for your effort here :grin::grin:

Thanks
Fredrik

1 Like

Been using it for a while myself now, and I’ve not seen any issues. Upgraded it to Beta. :slight_smile:

@anderssv as discussed in another thread I am trying to get these wall plugs to work - without success. I currently have three identical plugs (zw5 - dated october 2016 and v. 3.02 on the box) and none of them responds as expected.

If I click the “reset kw/h” they will respond to the next on or off action but nothing more.

I have tried removing them and re-adding and tried different DH without success.

The following error i logged:

90cd4afb-02f7-4ef8-946b-f5538df826f3  4:35:19 PM: error groovy.lang.MissingMethodException: No signature of method: script14837256145391703987148.zwaveEvent() is applicable for argument types: (physicalgraph.zwave.commands.meterv1.MeterReport) values: [MeterReport(meterType: 33, meterValue: [0, 0], precision: 1, scale: 2, scaledMeterValue: 0.0, size: 2)]

Possible solutions: zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport), zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap), zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport), zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation), zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv2.SensorMultilevelReport), zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport) @ line 146

Appreciate any feedback. :blush:

Still at a loss on how this can happen. Been asking around and there doesn’t seem like there is a good reason why you should be getting other versions of the command classes.

If you like you can try to change line 181 of the handler to do v1 commands. From what I gather, the code in that method should compatible with v1 too. :slight_smile: See here for the line I’m talking about: https://github.com/anderssv/smartthings-code/blob/master/devicetypes/smartthings-f12-no/fibaro-wall-plug-zw5.src/fibaro-wall-plug-zw5.groovy#L181

Just change v3 to v1.

Anders,

Thanks for assisting - I am no stranger to such things not working. :blush:

You state that I have a different command class - how can you tell?

The error you posted states that it can’t find a method for:

physicalgraph.zwave.commands.meterv1.MeterReport

Because I know the code; I know that the only method with a MeterReport is:

def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd) {

Each one of those methods are signals from the device, containing different information. :slight_smile:

Anders,

1 Like

Executed the change on line 181 and but the result is the same - switch does not react. No error though.

But - when hitting the “reset kwh” an almost identical error appears:

b69a798b-6285-4e3b-a608-06c4352c7aad 7:19:24 PM: error groovy.lang.MissingMethodException: No signature of method: script1483899564177156597316.zwaveEvent() is applicable for argument types: (physicalgraph.zwave.commands.meterv3.MeterReport) values: [MeterReport(deltaTime: 0, meterType: 1, meterValue: [0, 0, 0, 0], precision: 2, previousMeterValue: [0, 0, 0, 0], rateType: 1, scale: 0, scale2: false, scaledMeterValue: 0.00, scaledPreviousMeterValue: 0.00, size: 4)]
Possible solutions: zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport), zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap), zwaveEvent(physicalgraph.zwave.commands.meterv1.MeterReport), zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation), zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv2.SensorMultilevelReport), zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport) @ line 209

Please advise.

I must also add that when hitting the “reset kwh” the plug blinks green twice - every time - suggesting that the plug is in communication with ST.

Seems like there is something going after the plug has responded correctly to one “power on or off”.

Two questions:

Exactly which device type handler do you now have assigned to the plug? ( if you can post a screenshot of your devices page that would be helpful, you can crop it down to just that device if you want)

Second, just to be sure, did you paste the DTH into the Device Handler tab, not the smartapp tab? Because that “missing method” or usually means a problem in the code installation, not the DTH itself.

This might help:

My thought on this is that you might not have installed the device type handler at all, and the plug is just trying to use whatever generic DTH it paired with initially. But the device list will tell you what handler it is actually using.

Good questions. Ill test later and report.

1 Like

I believe so yes. It is listed under “My Device handlers”. :slight_smile:

Just tested again after leaving a plug off for about an hour - and it respons to the first command (being it on or off) but not any consequtive actions. No error messages in the log during these tests.

Then I click “reset kwh” and the debug error I postet about an hour back pops up and the plug responds to one more action.

Wierd.

Hi there.

I changed a few lines in the debug output section and were able to produce this during my failures:

Could not extract command from Crc16Encap(checksum: 234, command: 2, commandClass: 50, data: [33, 68, 0, 0, 0, 0, 0, 0, 5])

Does this tell you anything at all?

I think I found the culprit:

Line 142 reads as follows:

def cmd = zwave.parse(description, [0x20: 1, 0x32: 1, 0x72: 2])

This line does some z-wave version-checking (you probably know more about this than I do) and the parameter 0x32 contains the version number for “Meter” and based on this it seems to be telling the code to use V1.

I changed it to 3 and so far I have not gotten any debug errors. (I must add that I am at work and unable to visualy verify that the plug changes state - but the lack of errors is good).

I’ll report status when I return home.

Thomas

Awesome Thomas, that seems plausible. It doesn’t explain why it gives different versions for you and me, but it is probably related to that.

I must admit I copied that crc unwrap code without completely understanding what it did. :slight_smile:️ Looking into it now I actually think the second parameter (the map) can be completely removed. I’ll try it later when I get home.

The only reason I can think of why it behaves differently at your location is because we have different versions of the software on our hub. Mine is v2 FW 000.016.00011. What is yours?

I am on that version myself.

Could there be a difference in the plugs themselves?

Hi @ulfthomas74, @cscheiene and @anderssv ,

i have the complete equal failure like Ulfthomas.

  1. "If I click the “reset kw/h” they will respond to the next on or off action but nothing more. "
  2. “I must also add that when hitting the “reset kwh” the plug blinks green twice - every time - suggesting that the plug is in communication with ST.”

@ulfthomas74: Do you have a solution?

I changed it and tested it:
def cmd = zwave.parse(description, [0x20: 1, 0x32: 3, 0x72: 2])

It´s not possible to change On/Off. In “Recently” i get no updated when I push “on” or “off”.
If i click “reset kwh” and than “on” so it works. In Recently it is shown the correct action

Hub:
Firmware Version 000.016.00009
Hardware Version hub v2, UK customer

Plug:
Raw Description:
zw:Ls type:1001 mfr:010F prod:0602 model:1001 ver:3.02 zwv:4.05 lib:03 cc:5E,22,59,56,7A,32,71,73,98,31 sec:85,70,72,5A,8E,25,86 role:05 ff:8700 ui:8700