openhab / org.openhab.ui.habmin

HABmin - a graphical user interface for openHAB 2
231 stars 92 forks source link

Aeon Labs Smart Switch GEN 5 -> Unknown Device #170

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

I can't seem to correctly add an Aeon Labs Smart Switch GEN 5. It does seem to add the node, but it turns up as Device Unknown. I've added the inclusion log for node 5. I am using a Zstick GEN 5 on OpenHAB-Snapshot running on Ubuntu 16.04 in ESXi 6.x.

What did i do:

Then i waited for HABmin to dicover the node and show me the 'little +1'.

Since i am still very new to OpenHAB en HABmin i am unsure if this is a bug, or that i am doing something wrong or is it the device not supported?.

What did i expect:

A discovered Smart Switch GEN 5, which the ability to switch on/off, and 4 number values (Watts, kWh, Voltage and Amps).

Thanks in advance.

node_5.zip

cdjackson commented 8 years ago

I’ll update the binding tonight - please try tomorrows snapshot. Hopefully this will fix the problem and the binding will generate an XML in the /userdata/zwave/ folder - please can you provide that file if it works...

ghost commented 8 years ago

I've tried the lastest snapshots of both openhab and habmin. Sadly, it's not working. The node comes up as an Device unknown :(.

This is what i did:

node3_smartswitch_Gen5.zip

Any ideas?

cdjackson commented 8 years ago

Please put the following link into your browser and send the output.

http://192.168.2.1:8080/rest/things/zwave:device:26bf9b20:node3 http://192.168.2.1:8080/rest/things/zwave:device:26bf9b20:node3

(obviously change the IP address to the computer running OH).

ghost commented 8 years ago

I had already deleted it as node 3, so i've readded it as node 4. The response i get is this:

{
  "statusInfo": {
    "status": "INITIALIZING",
    "statusDetail": "NONE"
  },
  "item": {
    "members": [],
    "link": "http://192.168.153.5:8080/rest/items/zwave_device_26bf9b20_node4",
    "state": "NULL",
    "type": "GroupItem",
    "name": "zwave_device_26bf9b20_node4",
    "label": "Node 4",
    "tags": [
      "thing"
    ],
    "groupNames": []
  },
  "link": "http://192.168.153.5:8080/rest/things/zwave:device:26bf9b20:node4",
  "label": "Node 4",
  "bridgeUID": "zwave:serial_zstick:26bf9b20",
  "configuration": {},
  "properties": {},
  "UID": "zwave:device:26bf9b20:node4",
  "thingTypeUID": "zwave:device",
  "channels": []
}
cdjackson commented 8 years ago

Thanks. I think I know the problem. I’ll create a PR tonight so let’s see if tomorrow brings more joy! :)

ghost commented 8 years ago

No dice yet, but i do see progress. At some point the node comes Online, however it then causes a NullPointer and switches back to status Uninitialized Handler Error. .

It is Node6 in the log.

nullpointer_on_node6.zip

cdjackson commented 8 years ago

Try restarting the binding. Let the XML be created in the /userdata/zwave folder, then restart the binding and see if it works. The issue is associated with including the device before all the information is available to create it - I need to work out how to manage this startup timing.

cdjackson commented 8 years ago

Sorry - to clarify - the issue is associated with "Adding the thing" - not including the device. So it's a matter of WHEN you add it from the inbox.

ghost commented 8 years ago

Making progress now.

I did the following:

The result is a device that 'looks' ok. I have many numbers and a switch, so far so good. I've also found a node9.xml file.

The node is detected correctly. If i unplug the node it will go offline and if i plug it back in the node comes online. However, it does not receive updates on wattage and the switch also doesn't respond. I see logs that end in MISMATCH.

2016-05-17 09:15:57.537 [DEBUG] [ocol.ZWaveController$ZWaveSendThread] - Took message from queue for sending. Queue length = 1
2016-05-17 09:15:57.537 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 0A 00 13 09 03 98 04 00 25 13 46
2016-05-17 09:15:57.538 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - NODE 9: Sending REQUEST Message = 01 0A 00 13 09 03 98 04 00 25 13 46
2016-05-17 09:15:57.547 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 04 01 13 01 E8
2016-05-17 09:15:57.548 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-05-17 09:15:57.548 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 04 01 13 01 E8
2016-05-17 09:15:57.548 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 04 01 13 01 E8
2016-05-17 09:15:57.548 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=SendData[0x13], type=Response[0x01], priority=High, dest=255, callback=0
, payload=01
2016-05-17 09:15:57.548 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 9: Sent Data successfully placed on stack.
2016-05-17 09:15:57.567 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 07 00 13 13 00 00 02 FA
2016-05-17 09:15:57.568 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-05-17 09:15:57.568 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 09 00 13 13 00 00 02 00 00 F4
2016-05-17 09:15:57.568 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 09 00 13 13 00 00 02 00 00 F4
2016-05-17 09:15:57.568 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=SendData[0x13], type=Request[0x00], priority=High, dest=255, callback=0,
 payload=13 00 00 02
2016-05-17 09:15:57.568 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 9: SendData Request. CallBack ID = 19, Status = Transmission complete and ACK rece
ived(0)
2016-05-17 09:15:57.569 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00],
priority=High, dest=9, callback=19, payload=09 03 98 04 00
2016-05-17 09:15:57.569 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=SendData[0x13], type=Request[0x00],
priority=High, dest=255, callback=0, payload=13 00 00 02
2016-05-17 09:15:57.569 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=SendData, callback id=19, expected=ApplicationCommandHandler, cancelled=false      MISMATCH

Configuration through HABmin2 results in errors like these:

2016-05-17 09:44:37.451 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 9: Transaction not completed: node address inconsistent.  lastSent=9, incoming=255
2016-05-17 09:44:57.633 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Configuration update received
2016-05-17 09:44:57.635 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Configuration update config_112_4 to 600
2016-05-17 09:44:57.636 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Error getting configurationCommandClass
2016-05-17 09:44:57.636 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Configuration update config_102_4 to 11
2016-05-17 09:44:57.636 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Error getting configurationCommandClass
2016-05-17 09:44:57.636 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Configuration update config_111_4 to 60
2016-05-17 09:44:57.636 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Error getting configurationCommandClass

I've added the node9.xml and the log from the inclusion. Node 2 is my MultiSensor which is working fine, node9 is the trouble some node.

node9_with_xml.zip

cdjackson commented 8 years ago

However, it does not receive updates on wattage and the switch also doesn't respond

If you're not receiving updates, then it probably means you need to configure the device - I'm not sure?

What does "the switch doesn't respond" mean?

I see logs that end in MISMATCH.

That's normal - it's not an error - it's just part of the transaction handling (it's a DEBUG message - not an error).

Configuration through HABmin2 results in errors like these:

Strange - I'll take a look at the XML as maybe something isn't discovered correctly.

cdjackson commented 8 years ago

The XML has no config command class in it which is VERY strange. Does this device support it? It's not shown in the NIF!

ghost commented 8 years ago

What does "the switch doesn't respond" mean?

I've added an item in my items file of type 'Switch'. I linked it to the zwave:device:26bf9b20:node9:switch_binary. When i flip the Item Switch through the Basic UI, i would expect the Node9 to respond and turn the power on/off. However the node9 does not respond.

That's normal - it's not an error - it's just part of the transaction handling (it's a DEBUG message - not an error).

Fair enough, i just noticed it and figured something might be wrong.

The XML has no config command class in it which is VERY strange. Does this device support it? It's not shown in the NIF!

I have no idea what the NIF is, but according to the manual it supports: COMMAND_CLASS_CONFIGURATION V1. However, i see a list under 'unsecure' and 'secure'.

Aeon Labs Smart Switch Gen5_Update 2.pdf

I have several of these same smart switches, Below are two screen shots, the first one is what HABmin gives me for configuration (sadly the screenshot was too large) and the second one is from a Zipabox. They both seem to give me the same configuration options.

This is what it looks like in HABMin:

ssgen5_habmin

This is what it looks like on a Zipabox:

ssgen5_zipabox

cdjackson commented 8 years ago

Another part of the issue is that the device included securely, and this isn’t working well. I’m going to add a setting to disable this.

That still doesn’t explain the lack of a configuration class though - it would be a shame if the device didn’t report the configuration class! :(

ghost commented 8 years ago

Well, looking at the two different tables in the manual i can only guess that:

As i see it, that would be the only way to get the Configuration Class in the secure and unsecure way.

2016-05-17 18:32 GMT+02:00 Chris Jackson notifications@github.com:

Another part of the issue is that the device included securely, and this isn’t working well. I’m going to add a setting to disable this.

That still doesn’t explain the lack of a configuration class though - it would be a shame if the device didn’t report the configuration class! :(

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin2/issues/170#issuecomment-219775398

cdjackson commented 8 years ago

Yes, but it doesn’t appear to report this class - that’s the issue. Maybe it’s an issue with the secure inclusion, but since it doesn’t seem to be in the NIF, it looks like it might not be reported which would be a major pain and quite a surprise.

cdjackson commented 8 years ago

Can you try again with the latest binding - just delete the XML before you restart the binding. This should do an initialisation without the secure class for this device.

ghost commented 8 years ago

It works. Thanks.

I've got all 4 values and a working switch.

node11.zip

cdjackson commented 8 years ago

Thanks. I'll close this then. Security classes still need some work obviously...