krambriw wrote:The error was my mistake, sorry for that
I think your suggestion is fine, that should work as well, provided that the names can be unique even if you would have several sensors of the same kind.
Some questions to clarify:
- the actual 'Name', like 'Sensor.Luminance', 'Sensor.Temperature' and 'Status.Level', are they user configurable? I mean can you assign different names to them if you have several sensors of the same type?
- what kind of z-wave controller do you have (vera, razberry...)?
Yes, I think I need to clarify it to myself as well
I use HomeGenie as base with USB z-wave stick.
From HomeGenie, MqTT messages are sent to Eventghost.
Message comes like this:
19:58:12 Main.SilverHG/HomeAutomation.ZWave/2/event '0 {"Name":"Sensor.Luminance","Value":"11","Description":"","FieldType":"","UpdateTime":"2015-07-30T17:58:12.6733142Z","NeedsUpdate":false}'
Lets break it down!
First part: Main.SilverHG/HomeAutomation.ZWave/2/event
"Main" is normal EG.
"SilverHG/HomeAutomation.Zwave/2/" is the topic MqTT is sent on.
Here we have a unique identifier which is the "2"!
Other different sensors will have a 1, 3, 4 etc depending in what order they are added to the z-wave network.
In EG the events are unique
Then there is Payload:
'0 {"Name":"Sensor.Luminance","Value":"11","Description":"","FieldType":"","UpdateTime":"2015-07-30T17:58:12.6733142Z","NeedsUpdate":false}'
Sensors can have multiple functions, for example Sensor.Temperature, Sensor.Luminance, Sensor.Alarm, Sensor.Battery etc.
They are unique to the "2"
They are NOT configurable as they are standard for ZWave attribute.
What we type in dialog box "unique ID", I think you use the "Unique ID" in your database?
Maybe best would be if the Table Name is what is unique as you can set it for yourself. And then "unique id" is what it is supposed to search for in payload.
Shouldn't this work for all sensors, including oregon etc that you incorporated before?
Or am I just way off...?
/Nicklas