[SOLVED] Z-Wave Binding shenzhen_coolcampwrplug_02_032 wrong devicetype via thing file

Hi, for better reusability I’m using the old fashion way of openhab file configuration.
It is easier for me, to find items and things when I can put them in different files.

Now to the Problem.
I ordered 5 new z-wave power plugs and add them to the z-wave network.

They are discovered in openhab, the device type is recognized and I can add them.
They are listed in the things menu and the item channels are also listed.
But the things id string is for a generic type “zwave:device:8c582004:node7”.
When I delete them it shows up again in the Inbox as it should.

When I add this id string to my zwave things file, the thing disappears from the inbox and is listed in the things menu but as unknown device type, because of the generic device type in the string.

But when I change the device type to the right one, the thing also appears in the Inbox as given device type with generic device type id and in the things menu as the given device type but without any item channels.

I know that there is a ignore function in the inbox, but the main problem is, that the binding has a problem with the device type recognition.

shenzhen_powerplug_00_000 is working
shenzhen_coolcampwrplug_02_032 is not woriking

I use a snapshot binding, because the shenzhen_coolcampwrplug_02_032 is new.
org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar

The zwave.things file:

Bridge  zwave:serial_zstick:8c582004    "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ] {
    Thing   shenzhen_powerplug_00_000       node2   "Steckdose Waschmaschine Papa" @ "Waschküche"   [ node_id=2 ]
    Thing   shenzhen_powerplug_00_000       node3   "Steckdose Waschmaschine Omi" @ "Waschküche"    [ node_id=3 ]
    Thing   shenzhen_powerplug_00_000       node4   "Steckdose Wäschetrockner" @ "Waschküche"       [ node_id=4 ]
    Thing   shenzhen_coolcampwrplug_02_032  node5   "Steckdose Kühlschrank" @ "Küche"               [ node_id=5 ]
    Thing   shenzhen_coolcampwrplug_02_032  node6   "Steckdose Backofen" @ "Küche"                  [ node_id=6 ]
    Thing   shenzhen_coolcampwrplug_02_032  node7   "Steckdose Gefrierschrank" @ "Vorratskeller"    [ node_id=7 ]
    Thing   shenzhen_coolcampwrplug_02_032  node8   "Steckdose Fernseher" @ "Anbau"                 [ node_id=8 ]
    Thing   shenzhen_coolcampwrplug_02_032  node9   "Steckdose Schreibtisch" @ "Anbau"              [ node_id=9 ]
}

Your Thing syntax is wrong.

Thing zwave:tkb_tz88_00_000:controller:node2 "ZWave Node 3: TZ88" (zwave:serial_zstick:controller) [ node_id=3 ]

What part is wrong?
Here is the part of yor posted link about Bridge definition:

Defining Bridges Using Files
Bridges can be defined together with contained things. The following configuration shows the definition of a hue bridge with two hue lamps:

Bridge hue:bridge:mybridge [ ipAddress="192.168.3.123" ] {
	Thing 0210 bulb1 [ lightId="1" ]
	Thing 0210 bulb2 [ lightId="2" ]
}

Within the curly brackets things can be defined, that should be members of the bridge. 
For the contained thing only the thing type ID and thing ID must be defined (e.g. 0210 bulb1). 
So the syntax is Thing <thingTypeId> <thingId> []. 
The resulting UID of the thing is hue:0210:mybridge:bulb1.
Bridges that are defined somewhere else can also be referenced in the DSL:

Thing hue:0210:mybridge:bulb (hue:bridge:mybridge) [lightId="3"]

The referenced bridge is specified in the parentheses. Please notice that the UID of the thing also contains the bridge ID as third segment. For the contained notation of things the UID will be inherited and the bridge ID is automatically taken as part of the resulting thing UID.

The part in () is only used when the thing is not defind in the same context as the bridge.
And the long id string can also reduced when the thing is defined in the same context as the bridge.

But I also tested you line of thing definition with the same result.
My things configuration is right.

File without Bridge context:

Thing   zwave:serial_zstick:8c582004    "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]

Thing   zwave:shenzhen_powerplug_00_000:8c582004:node2      "node1" (zwave:serial_zstick:8c582004)  [ node_id=2 ]
Thing   zwave:shenzhen_powerplug_00_000:8c582004:node3      "node2" (zwave:serial_zstick:8c582004)  [ node_id=3 ]
Thing   zwave:shenzhen_powerplug_00_000:8c582004:node4      "node3" (zwave:serial_zstick:8c582004)  [ node_id=4 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node5 "node4" (zwave:serial_zstick:8c582004)  [ node_id=5 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node6 "node5" (zwave:serial_zstick:8c582004)  [ node_id=6 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node7 "node6" (zwave:serial_zstick:8c582004)  [ node_id=7 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node8 "node7" (zwave:serial_zstick:8c582004)  [ node_id=8 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node9 "node8" (zwave:serial_zstick:8c582004)  [ node_id=9 ]

For reminding, this thing is working for since 6 month without a problem

    Thing   shenzhen_powerplug_00_000       node2   "Steckdose Waschmaschine Papa" @ "Waschküche"   [ node_id=2 ]

Nope. I linked to the developer post explaining how manual things config works for zwave. Please read again.

Yes, i read both the OH2 and the developer documentation of things definition.
Both descripe the same way of things definition.

according to this text

Z-Wave things can be configured in the same way as other OH2 bindings - for general information refer to the OH2 documentation. Note that at the time of writing, text configuration of things is only available in the development version of the binding - not the master or snapshot versions.

I wrote also bindings for my devices, the thing-file parsing is standardized,
you only have to grab the parsed information.
No one has to write his own config file parser, you only have to define the parameters and options.
Which i all used and defined.

The […, security_networkkey="???] is not the one i used in the real thing file.

The binding example is without a Bridge context,
therefore are the () in which the Bridge is defined,
if you defined it for example in another file.

The binding documentation is mainly about to get the device id from the zwave code,
which I used to get the “shenzhen_coolcampwrplug_02_032” device id and checked the firmware version.

And I also used the way without a Bridge context and the result is the same.
I can’ see any channels in the PaperUI,
there is nothing except " Status: ONLINE Node initialising: PING" and
“SHOW PROPERTIES”.

If you can tell me where the error is exactly.
Especially after I did it after your advice and it still does not work.
And pleas note the fact that it does not work with the new devices,
the old devices are working.

Here the config and the result in pictures

Bridge  zwave:serial_zstick:8c582004    "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]

Thing   zwave:shenzhen_powerplug_00_000:8c582004:node2      "node2" (zwave:serial_zstick:8c582004)  [ node_id=2 ]
Thing   zwave:shenzhen_powerplug_00_000:8c582004:node3      "node3" (zwave:serial_zstick:8c582004)  [ node_id=3 ]
Thing   zwave:shenzhen_powerplug_00_000:8c582004:node4      "node4" (zwave:serial_zstick:8c582004)  [ node_id=4 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node5 "node5" (zwave:serial_zstick:8c582004)  [ node_id=5 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node6 "node6" (zwave:serial_zstick:8c582004)  [ node_id=6 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node7 "node7" (zwave:serial_zstick:8c582004)  [ node_id=7 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node8 "node8" (zwave:serial_zstick:8c582004)  [ node_id=8 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node9 "node9" (zwave:serial_zstick:8c582004)  [ node_id=9 ]

Added via Thingsfile


Inbox:

Inbox Add:

Added via Inbox (zoomed out)

Thingsmenu:
node2 to node4 are working and are added via a thingsfile
node5 to node 9 are not working and are also added via a thingsfile
Z-Wave Node 008: NAS-WR01ZE Power Plug ON/OFF is added via inbox.

One of your examples:

Thing   shenzhen_powerplug_00_000       node2   "Steckdose Waschmaschine Papa" @ "Waschküche"   [ node_id=2 ]

Developers example:

Thing zwave:tkb_tz88_00_000:controller:node2 "ZWave Node 3: TZ88" (zwave:serial_zstick:controller) [ node_id=3 ]

shenzhen_coolcampwrplug_02_032 is only valid for firmware version 2.32.

Do you read all of my posts and my config?
What do you think is this line in my config.

Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node5 "node5" (zwave:serial_zstick:8c582004)  [ node_id=5 ]

So where is the error in this line.

I checked the firmware and hardware version.
I load a snapshot of the binding.
It works with the inbox in the gui, identified as shenzhen_coolcampwrplug_02_032.

Then I would stick to that.
Be aware that you cannot change configuration parameters via GUI if zwave things are manually configured in a things file.

This is not a solution of my problem, I already know that the inbox workaround is working.
I need the thingfile for better legibility and portability.
I do not need the possibility to change the parameters of the bridge.

As I said numerous times,

is the correct definition.
A long time ago I experimented with manual things files, here is my working solution, including some config parameter definitions:

Bridge zwave:serial_zstick:controller "Z-Wave Serial Controller" [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", controller_inclusiontimeout=60, heal_enable="true", heal_time=2, security_networkkey="removed" ]
   Thing zwave:popp_004001_00_000:controller:node10 "Z-Wave Node 10: 004001 Smoke Detector and Siren" (zwave:serial_zstick:controller) [ node_id=10 ]
   Thing zwave:fibaro_fgrm222_24_024:controller:node11 "Z-Wave Node 11: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=11 ] {
	Channels:
   Type blinds_control : blinds_control [ config_invert_percent="true" ]
	}
	Thing zwave:fibaro_fgrm222_24_024:controller:node12 "Z-Wave Node 12: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=12 ] {
	Channels:
   Type blinds_control : blinds_control [ config_invert_percent="true" ]
	}
	Thing zwave:fibaro_fgrm222_24_024:controller:node13 "Z-Wave Node 13: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=13 ] {
	Channels:
   Type blinds_control : blinds_control [ config_invert_percent="true" ]
	}
   Thing zwave:fibaro_fgbs001_00_000:controller:node23 "Z-Wave Node 23: FGBS001 Universal Binary Sensor" (zwave:serial_zstick:controller) [ node_id=23 ]
   Thing zwave:everspring_sf812_00_000:controller:node26 "Z-Wave Node 26: SF812 Smoke Sensor" (zwave:serial_zstick:controller) [ node_id=26 ]
   Thing zwave:fibaro_fgs222_00_000:controller:node28 "Z-Wave Node 28: FGS222 Double Relay Switch 2x1.5kW" (zwave:serial_zstick:controller) [ node_id=28 ]
   Thing zwave:fibaro_fgs223_00_000:controller:node30 "Z-Wave Node 30: FGS223 Double Switch 2" (zwave:serial_zstick:controller) [ node_id=30 ]
   Thing zwave:fibaro_fgs223_00_000:controller:node31 "Z-Wave Node 31: FGS223 Double Switch 2" (zwave:serial_zstick:controller) [ node_id=31 ]
	Thing zwave:fibaro_fgrm222_24_024:controller:node32 "Z-Wave Node 32: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=32 ] {
	Channels:
   Type blinds_control : blinds_control [ config_invert_percent="true" ]
	}
	Thing zwave:fibaro_fgrm222_24_024:controller:node33 "Z-Wave Node 33: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=33 ] {
	Channels:
   Type blinds_control : blinds_control [ config_invert_percent="true" ]
	}
	Thing zwave:fibaro_fgrm222_24_024:controller:node34 "Z-Wave Node 34: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=34 ] {
	Channels:
   Type blinds_control : blinds_control [ config_invert_percent="true" ]
	}
   Thing zwave:fibaro_fgms001_00_000:controller:node3 "Z-Wave Node 3: FGMS001 Motion Sensor" (zwave:serial_zstick:controller) [ node_id=3 ]
   Thing zwave:fibaro_fgwp101_00_000:controller:node41 "Z-Wave Node 41: FGWP101 Metered Wall Plug Switch" (zwave:serial_zstick:controller) [ node_id=41 ]
   Thing zwave:danfoss_lcz251_00_000:controller:node8 "Z-Wave Node 8: LCZ251 Living Connect Z Thermostat 2.51" (zwave:serial_zstick:controller) [ node_id=8 ]

If you think that is the case I leave further answers to other users. Good luck.

As I said numerous times, i used the form of

Thing zwave:tkb_tz88_00_000:controller:node2 "ZWave Node 3: TZ88" (zwave:serial_zstick:controller) [ node_id=3 ]

like here

Bridge  zwave:serial_zstick:8c582004    "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]

Thing   zwave:shenzhen_powerplug_00_000:8c582004:node2      "node2" (zwave:serial_zstick:8c582004)  [ node_id=2 ]
Thing   zwave:shenzhen_powerplug_00_000:8c582004:node3      "node3" (zwave:serial_zstick:8c582004)  [ node_id=3 ]
Thing   zwave:shenzhen_powerplug_00_000:8c582004:node4      "node4" (zwave:serial_zstick:8c582004)  [ node_id=4 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node5 "node5" (zwave:serial_zstick:8c582004)  [ node_id=5 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node6 "node6" (zwave:serial_zstick:8c582004)  [ node_id=6 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node7 "node7" (zwave:serial_zstick:8c582004)  [ node_id=7 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node8 "node8" (zwave:serial_zstick:8c582004)  [ node_id=8 ]
Thing   zwave:shenzhen_coolcampwrplug_02_032:8c582004:node9 "node9" (zwave:serial_zstick:8c582004)  [ node_id=9 ]

where is the error or the difference to your example?

I finally found the problem myself.
And no, it is not related to the writing style of the thing file.

It seems to be that the binding is using the zwave database for creating things when it is discovered via inbox.
For the thingfile configuration it uses the thing definition files in the binding sourcecode.
cdjackson update the binding repository a day ago and added the thingsfile for the shenzhen_coolcampwrplug_02_032 device.

zwave Binding 2.5.0 Snapshot from 24.03.2019

The device is now recognized via thingfile with all channels.

Now, the thingfile is used as follow:

Bridge <BindingName>:<DeviceType>:<Name> "Description" [Parameters and Options]
Thing  <BindingName>:<DeviceType>:<Name of the Bridge>:<Name> "Description" [Parameters and Options]

Bindingname: Here “zwave”
DeviceType: Devicetype ID from the zwave database (use the zwave id in cdjacksons database) of the device you want to use.
Name: Whatever you want, this is used as identifier in the other files and must be unique (but do not use ä,ö,ü,ß,…).
Name of the Bridge: The name you used for the bridge.
Description: Like name but you can use blanks and special characters,
this is the name to identify the thing in the PaperUI.
Parameter and Options: For the zwave bridge it is used for defining the serialport, mode, and so on.
For the zwave thing it is used for the the node_id. The node_id is the link between the internal zwave node system and the thing in openhab.
The options and paramters are speratetd by a , (comma).
Please use the binding documentation for all parameters and options.

Now you have two ways to use this, with and without a bridge context/body.

Without a “bridge body” is useful, if you want to saperate things into different files.

Without bridge context:

Bridge  zwave:serial_zstick:MyZwaveController "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]

Thing   zwave:shenzhen_coolcampwrplug_02_032:MyZwaveController:PPlug1Floor1     "Powerplug table left" (zwave:serial_zstick:MyZwaveController)  [ node_id=2 ]
Thing   zwave:linear_ws15z_00_000:MyZwaveController:SwitchRBathoom              "Powerswitch bathroom" (zwave:serial_zstick:MyZwaveController)  [ node_id=3 ]

Every thing has a new line.
The zwave stick or zwave controller has the node id 1, all things use a different number.
If you use the the thingfile without a bridge context you have to inform openhab which thing uses which bridge. Therefore is the (zwave:serial_zstick:MyZwaveController) part. The part is located behind the “Description” and before the [Paramters and Options].

If you use a bridge context you can use the long version or a shorter more legibility version.
Long version:

Bridge  zwave:serial_zstick:MyZwaveController "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]
{
Thing   zwave:shenzhen_coolcampwrplug_02_032:MyZwaveController:PPlug1Floor1     "Powerplug table left" [ node_id=2 ]
Thing   zwave:linear_ws15z_00_000:MyZwaveController:SwitchRBathoom              "Powerswitch bathroom" [ node_id=3 ]
}

Short version:

Bridge  zwave:serial_zstick:MyZwaveController "ZWave Controller"  [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]
{
Thing   shenzhen_coolcampwrplug_02_032   PPlug1Floor1   "Powerplug table left" [ node_id=2 ]
Thing   linear_ws15z_00_000              SwitchRBathoom "Powerswitch bathroom" [ node_id=3 ]
}

In the bridge context version you must define all things that are realated to the bridge between { }.
You can also leave out the bindingname and the additional name of the Bridge,
because the information is already defined by the bridge context itself.

Here is my working file:

Bridge  zwave:serial_zstick:8c582004    "ZWave Controller"  [ port="/dev/ttyZWAVE", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="???" ]
{
    Thing   shenzhen_powerplug_00_000       node2   "Steckdose Waschmaschine Papa" @ "Waschküche"   [ node_id=2 ]
    Thing   shenzhen_powerplug_00_000       node3   "Steckdose Waschmaschine Omi" @ "Waschküche"    [ node_id=3 ]
    Thing   shenzhen_powerplug_00_000       node4   "Steckdose Wäschetrockner" @ "Waschküche"       [ node_id=4 ]
    Thing   shenzhen_coolcampwrplug_02_032  node5   "Steckdose Kühlschrank" @ "Küche"               [ node_id=5 ]
    Thing   shenzhen_coolcampwrplug_02_032  node6   "Steckdose Backofen" @ "Küche"                  [ node_id=6 ]
    Thing   shenzhen_coolcampwrplug_02_032  node7   "Steckdose Gefrierschrank" @ "Vorratskeller"    [ node_id=7 ]
    Thing   shenzhen_coolcampwrplug_02_032  node8   "Steckdose Fernseher" @ "Anbau"                 [ node_id=8 ]
    Thing   shenzhen_coolcampwrplug_02_032  node9   "Steckdose Schreibtisch" @ "Anbau"              [ node_id=9 ]
}
1 Like