more G-Labs products

Author Topic: MultiInstance ZMNHBA2 (Qubino)  (Read 3830 times)

September 21, 2015, 11:40:19 PM
Read 3830 times

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Hi,

I've add a 2 relay with power meter device (Qubino ZMNHBA2) in Homegenie and I the program "Multi Instance/Channel  Virtual Modules" is activated so HG create 3 modules : A master Module and two "child" module.(this seem's to be correct)

But I have some problem :
The first one and most important, If I toggle the Master switch, the 2 relays of the device switch to On or Off "In Real Life" but the widget of the child doesn't reflect this modification. For exemple, If all is "Off", when I set to On the Master, the 2 relays goes to on but the widget X.1 and X.2 stay Off

The second problem is that the device should return the power consumption of each relay and I only see the power consumption on the global switch (I haven't check if it correct or only one of the two relays)

The last one is that I must activate the program "Meter Watt Poll" in order to retreive the consumption data but normaly the device should send these data automatically (there is 4 parameters for push the consumption : 1 per switch for a change > X % and 1 per switch to set the time of a periodically push of the data)

Have you the same problem (with other 2 relay or with the same if you have)?
On which program should I search in order to correct this behavior ?

Thanks

September 22, 2015, 11:41:24 PM
Reply #1

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
I've made some complementary test and it seems that Homegenie track only response from the device when it ask something (poll the power or ask to turn off a switch), but when the device send it status (for exemple switch turn off or power consumption) independently , then Homegenie ignore the message?

This is correct or is it a wrong interpretation?

Is there a way to log message received from the zwave usb key in Homegenie?

Thanks

September 23, 2015, 09:24:22 AM
Reply #2

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can get zwave message in the event console since r494 using NLog library.

September 23, 2015, 09:24:31 PM
Reply #3

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Thanks for this reply.

So I've configured as Dani recommand the Nlog for logger "*Zwave*" to a file.

This is a part of the file :
Quote
2015-09-23 20:48:01.7986 ZWaveLib.Utility Trace [[[ BEGIN REQUEST ]]]
2015-09-23 20:48:01.7989 ZWaveLib.Utility Trace WaitAck
2015-09-23 20:48:01.7989 ZWaveLib.Utility Trace Sending Message (Node=3, CallbackId=12, Function=SendData, CommandClass=MultiInstance)
2015-09-23 20:48:01.8459 ZWaveLib.Utility Trace SendDataReady
2015-09-23 20:48:01.8965 ZWaveLib.Utility Trace Complete
2015-09-23 20:48:01.8972 ZWaveLib.Utility Trace [[[ END REQUEST ]]] took 98 ms
2015-09-23 20:48:02.4979 ZWaveLib.Utility Trace [[[ BEGIN REQUEST ]]]
2015-09-23 20:48:02.4979 ZWaveLib.Utility Trace WaitAck
2015-09-23 20:48:02.4979 ZWaveLib.Utility Trace Sending Message (Node=3, CallbackId=13, Function=SendData, CommandClass=MultiInstance)
2015-09-23 20:48:02.5494 ZWaveLib.Utility Trace SendDataReady
2015-09-23 20:48:02.6000 ZWaveLib.Utility Trace Complete
2015-09-23 20:48:02.6000 ZWaveLib.Utility Trace [[[ END REQUEST ]]] took 102 ms
2015-09-23 21:03:07.8152 ZWaveLib.Utility Trace [[[ BEGIN REQUEST ]]]
2015-09-23 21:03:07.8152 ZWaveLib.Utility Trace WaitAck
2015-09-23 21:03:07.8159 ZWaveLib.Utility Trace Sending Message (Node=3, CallbackId=14, Function=SendData, CommandClass=Meter)
2015-09-23 21:03:07.8231 ZWaveLib.Utility Warn Bad message checksum
2015-09-23 21:03:07.8736 ZWaveLib.Utility Warn Unhandled message type: 04-01-13
2015-09-23 21:03:07.8741 ZWaveLib.Utility Warn Bad message checksum
2015-09-23 21:03:07.9244 ZWaveLib.Utility Trace SendDataReady
2015-09-23 21:03:07.9750 ZWaveLib.Utility Trace Complete
2015-09-23 21:03:07.9750 ZWaveLib.Utility Trace [[[ END REQUEST ]]] took 159 ms
2015-09-23 21:03:08.0271 ZWaveLib.Utility Debug 3 MeterWatt 2,7

At 20h48, I turn on the virtual switch 3.1 and 3.2 (link with the Zwave Node 3 which is my Quibini ZMNHBA2).
I wait until it send the power comsumption (the parameter is configure to send this data every 5 minutes or if the more than 3 % of change).
We can see that at 21h00 nothing append so I try to force the retreive of the power consumption (clic on the parameter of the module 3, not 3.1 or 3.2 and then clic on "Setup" and the "Get" in the Meter section.
After that the power consumption is correctly reporter but only once, If i switch off vitual switch 3.1 and 3.2 and do nothing else, the power consumption stay at is old value, and I must force the refresh agan.

I know that there is a script for poll the power consumption but the device should send it automatically.

I think the problem is probably the same (or link) when I clic on the switch 3 as I say in the first post, the two Virtual model doesn't reflect the real state of each switch but I think the device send the correct value.


I think the ZWaveLib miss some message but I don't know how to confirme (I have try this device in "Domoticz" and the power consumption was reported automatically but I have other problem when switch the "master" then display of switch X.1 and X.2 was sometime incorrect, and turning switch 3.2 sometime affect switch 3.1)?
Is it a bug or a "Work As Design"? Have you an idea on how to fix it or change the behavior (in ZWaveLib or in a specific program)

Please find the entire log attached. I've seen in this log some "Unhandled message", could it be link to my problem?

September 23, 2015, 09:31:13 PM
Reply #4

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Your log is not showing debug from SerialPortLib that ZWaveLib is using for serial I/O. It would be also useful to see that.


September 23, 2015, 10:38:02 PM
Reply #5

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Very quick response thanks

I've add the logger "*Serial*" in the NLog config. Please find attach the log file.
Explanation of what I do and what I expect:
21:55:06 ==> I Activate the ZWAve Interface (I have only one ZWave device)
21:56:53 ==> I switch on the virtual module 3.2 in HG. It was switched on IRL and in the HG Interface so it's OK.
I wait for 5 minutes for the power consumption to be updated but nothing append (and it seems that there is no data receive by the serialPort in the log). I think there's a problem here because in the documentation of the device, it should send this data every 5 minutes (parameter 43 of the device)
22:03:39 ==> clic on the configure button on the "master" switch and then setup and then "Get" in the meter section with Watt selected in the combobox. This update the power consumption in HG interface.
22:05:32 ==> I switch off the virtual module 3.2 in HG. It was switched off IRL and in the HG Interface so it's OK.
22:06:20 ==> I switch on the "master" in HG. The two switch of the device were switch On IRL (it's normal) but the two virtual module 3.1 and 3.2 in HG stay off (In the log we can see that serial port receive 2 message which seems to be detected as bad message, I hope these message were for switch on module 3.1 and 3.2?)
I wait for 5 minutes for the power consumption to be updated but nothing append (and it seems that there is no data receive by the serialPort in the log). I think there's a problem here because in the documentation of the device, it should send this data every 5 minutes (parameter 43 of the device)
22:13:37 ==> I check the value of the parameter 43 on the "master" module and it was 300 (this parameter mean that the module should send power consumption every 300 seconde)
22:14:27 ==> I switch off the "master" module in HG.

A link to the documentation of the device Qubino ZMNHBA2 : http://www.vesternet.com/downloads/dl/file/id/409/z_wave_qubino_flush_relay_x_2_v6_4.pdf

Note I will do the same test again with a lamp which consumes more than 2 W because it's possible that the ZMNHBA device detect that the power consumption si to low to be reported because actually the device which was controle by the output link with the module 3.2 of the ZWave device si a contactor?

Thanks

Edit :
 - New question ==> I've seen in the setup of the "master" module that I must add the node 1 in a group to enable Homegenie to receive event for this group. I've add the node 1 in the group 1 but it doesn't change anything in my workflow. Could you explain me if I must do something with the association and in which case should I do it ? Actually in my module configuration, I think there's 3 group (get node id in group 0 result in a ERR_TIMEOUT, get node id in group 1 or 2 or 3 result in "None" and get node id in group 4 result in a ERR_TIMEOUT)
 - New question 2 ==> When I clic on get in the section "Configuration variables" the result is correct and I can set a new value but for all the variable Id available, there is never a title and a description and description of possible value. If I check on the web site  pepper1, it seems to be correctly define (except that the variable 78 does not exist and the default value seems to be wrong) : http://www.pepper1.net/zwavedb/device/642 Is there something to do in order to get the description of the configuration variables?
« Last Edit: September 24, 2015, 11:48:05 PM by DavZero »

September 27, 2015, 12:04:52 AM
Reply #6

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
So I've made some test with the association group and find that if I add node 1 to the group 3 (as mention in the device documentation, group 3 is for report) it seems to work better. (manipulate the master switch have an impact on virtual switch and power consumption seems to be reported)

I still have some problem that appends randomly (but not rarely).
Please find attach the extract of the log when I turn Off the "Master" switch. The expected result is that the main switch is turn of in HG and the two virtual module should turn off too (IRL it's always OK).
In the log ZWaveOK, we could see that it works correctly and the result was the two virtual switch were turn off in HG.
In the log ZWaveKO, I do exactly the same thing but we could see there were some "unhandled" message that seems to be cause by the SerialPort  and the result was that only the virtual module X.1 was turn off in HG, the other was not updated.

I think the message received on the serial port where "split" not at the good end of message?
Note : I've already seen this sort of problem with the serialPort on the rfx program I develop but I the case of the rfx it's not really a problem to miss some message because I use it for temperature reporting and this was send often so If one message was lost it's not a problem, the next one will be decoded correctly

An other problem I've seen in the log (see ReportZwave ) is that every five minute, there's a lot of unhandled message. It's probably link with the power report because the parameter of the ZMNHBA2 indicate that each relay sould send the power consumption every five minutes.
It's possible that this error was the cause of my last requirment, the Qubino ZMNHBA2 should send the power consumption of each relay and the global (sum of the two relays). Is this already handle by the program to manage power on virtual module and in this case the problem was cause by the serial port or should I develop something in the multiinstance program?

Thanks

Edit : if it's needed, I've install Homegenie on Lubuntu 15.04. And sorry for the attached files, all these file are txt file, I forgot to put the extension
« Last Edit: September 27, 2015, 09:36:12 PM by DavZero »

September 29, 2015, 08:00:10 PM
Reply #7

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Hi,

I continu to work on my problem.
I've installed a Windows 7 in order to test on this configuration and it seems to work better. There's to some unhandeled message but a lot less than on Lubuntu.

So is it a driver problem or is it a SerialPort.dll problem?
I have a UZB sigma design key. Should it be better with an other usb key?

For the problem of reporting the power consumption on virtual module, it seems that it was not handle on the Multi Instance program because it was correctly reported as we can see in the log join. I will try to modify this program in order to handle this for display the information of each switch.

If anyone could tell me if the problem is caused by my key or not, it will be very appreciate (and if it should not appear with an other key like http://www.domotique-store.fr/domotique/modules-domotiques/adaptateurs-controleurs-domotiques/452-aeotec-zw090-z-stick-gen5-dongle-usb-adaptateur-controleur-zwave-plus-aeotec-by-aeon-labs.html for exemple).

For the RFXTRX433, as I mentionned it earlier in this thread, the problem of incorrect message splitting appear in when using on Lubuntu. I've tried too on Windows but it doesn't change anything, some messages were always miss because of incorrect splitting (it appear the same number of time on Lubuntu and windows).

Thanks
« Last Edit: September 29, 2015, 08:32:47 PM by DavZero »

September 29, 2015, 08:01:12 PM
Reply #8

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
sorry for double post, I forgot the log file

September 30, 2015, 09:32:15 PM
Reply #9

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Hi (again ^^)

So for add the power consumption reporting on each virtual module if they have the capability, I have this :
Code: [Select]
else if (parameter.Name.StartsWith("Meter.Watts."))
  {
    var path = parameter.Name.Split('.');
    var instance = path[2]; // the instance number
   
    var id = 0;
    if (int.TryParse(instance, out id))
    {
      var virtualmodule = Modules.InDomain("HomeAutomation.ZWave").WithAddress(module.Instance.Address + "." + instance).Get();
      Program.RaiseEvent(virtualmodule, "Meter.Watts", parameter.Value, "ZWaveNode");
    }
at the end of the "When.ModuleParameterChanged" in the program "Multi Instance/Channel  Virtual Modules" and it works correclty for my case.

I still search information about what causing the serialPort "uncorrect message splitting" problem. Am I the only for you this problem occur?
Do you think this is a driver problem? A SerialPortHelper bug? something else?

Thanks

October 03, 2015, 11:58:48 AM
Reply #10

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Hi all (or me, Am i schizophrenic?)

So am I the only one that have SerialPort error on linux 15.04?
If anyone can tell me that he have no error with the name of is key and the linux version he use, it could help me a lot.

In the same time, I have serial port error to with the rfxtrx433E so I really think that there is some "bug" in the helper.

If nobody respond because of unanderstandable sentence, please excuse me I'm a french and try to explain my problem  the best possible manner and if it's not clear ask me for detail.

Thanks to don't leave me fall in a psychiatric hospital ^^

October 07, 2015, 09:50:14 PM
Reply #11

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
I've made a new test on Ubuntu 14.04 but the result is the same as on Lunbutun 15.04.

I don't know what to test now.

Please tell me which zwave usb key you have and if it works correctly or not.

Thanks

October 08, 2015, 02:13:35 PM
Reply #12

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
I am using AEonLabs Z Stick 2 for more than one year and I never get any problem on Debian PC or on RaspPI. with any versions of HG.

October 08, 2015, 07:44:25 PM
Reply #13

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
Hi,

thanks for the response.

I would try with a Raspberry first before buy a new key because it cost about 60€ but I can't find the iamge to put to my rasp.

Could you give a link?

Thanks

October 10, 2015, 11:20:28 PM
Reply #14

DavZero

  • **
  • Information
  • Jr. Member
  • Posts: 48
I have made a new install on a raspberry pi 2 with the raspian wheezy image and it works without any issue.

So the usb key and the serail port helper seems to work correctly both.

The principal difference with all my other test and OS is that all other was on Virtual Machine under ESXI. So the problem is to be the way that ESXI pass the udb key to the VM. I will investigate in that way and if I find a solution, I will post it here.

Note : use the rapsberry is not a bad idea but I prefere to use a VM because my server which run ESXI is under control so I prefer to add my HomeAutomation on it. Pending the solution I will use my raspberry.

Thanks all for your test and reply, It was very helpfull to identify the problem (and allowed me to saves 60€ which was a good thing for my WAF)