[Official Thread] Z-Wave Plugin v0.5.1

Message
Author
aalmans
Posts: 1
Joined: Wed Feb 05, 2014 12:32 pm

Re: [Official Thread] Z-Wave Plugin v0.5.1

#131 Post by aalmans » Wed Feb 05, 2014 12:39 pm

Hi,

Newbie here. Trying to get my Aeon Labs Z-stick 2 zwave to work with a TKB_TZ67-G dimmer. Stick is communicating with the dimmer through zVirtualscenes ok.

When i install the zwave plugin on port 3 it sees the stick ok and the dimmer as: UNKNOWN: TYPE=0202, ID=0611. When i go to the object and change the level the dimmer does not respond. The zwave plugin log does not show a response to the change in level either.

Am i doing something wrong?

User avatar
bwoodworth
Site Admin
Posts: 1563
Joined: Tue May 04, 2010 6:49 am
Location: California

Re: [Official Thread] Z-Wave Plugin v0.5.1

#132 Post by bwoodworth » Thu Feb 06, 2014 10:44 am

Probably not. It sounds like your device doesn't have a configuration file yet. Plus the ZWave plugin needs a lot of work. I have that on my to do list to hopefully get done along with v4.4
Brian

Mama70
Posts: 17
Joined: Sat Dec 08, 2012 12:06 pm

Re: [Official Thread] Z-Wave Plugin v0.5.1

#133 Post by Mama70 » Thu Mar 20, 2014 2:26 pm

My water sensor did not give any alarms. The value update came from Z-wave but there were not any events or value updates in OSA.

I installed GitHub & MonoDevelop. I havent used Github before so I didn't just make a branch because I don't yet understand all Githubs concepts even thought I've been using version control 'all my life'. But I have to say it was fairly easy to get the Zwave-plugin compiled., maybe took 6 hours. Most of it came from trying to get right version out of Github.

- install Github ( does not work properly with firewalls because it seems to always make new temporary directories for exe-files -> firewalls think they are new files and ask persmissions )
- install Monodevelop
- install Windows 7 SDK

The problem was in file Zwave.cs, version Jul 18, 2013

Code: Select all

                            if (m_manager.IsValueReadOnly(value.ValueID))
                            {
                                if (value.Genre == ZWValueID.ValueGenre.User)
                                {
                                    if (value.Label == "Sensor")
                                    {
                                        if (value.Val == "False")
                                            OSAEObjectStateManager.ObjectStateSet(nodeObject.Name, "OFF", "ZWave");
                                        else
                                            OSAEObjectStateManager.ObjectStateSet(nodeObject.Name, "ON", "ZWave");
                                    }
                                    else if (value.Label == "Alarm Level")
                                    {
                                        if (value.Val == "255")
                                            logging.EventLogAdd(nodeObject.Name, "ALARM");
                                    }
                                    else
                                    {
                                        OSAEObjectPropertyManager.ObjectPropertySet(nodeObject.Name, value.Label, value.Val, "ZWave");
                                        logging.AddToLog("Set property " + value.Label + " of " + nodeObject.Name + " to: " + value.Val.ToString(), false);
                                    }
                                }
                            }
The problen was that when label is 'Alarm Level', it does not call ObjectPropertySet.

I changed this to:

Code: Select all

                            if (m_manager.IsValueReadOnly(value.ValueID))
                            {
                                if (value.Genre == ZWValueID.ValueGenre.User)
                                {
                                    if (value.Label == "Sensor")
                                    {
                                        if (value.Val == "False")
                                            OSAEObjectStateManager.ObjectStateSet(nodeObject.Name, "OFF", "ZWave");
                                        else
                                            OSAEObjectStateManager.ObjectStateSet(nodeObject.Name, "ON", "ZWave");
                                    }
									else {
										if (value.Label == "Alarm Level")
											if (value.Val == "255")
												logging.EventLogAdd(nodeObject.Name, "ALARM");

										OSAEObjectPropertyManager.ObjectPropertySet(nodeObject.Name, value.Label, value.Val, "ZWave");
                                        logging.AddToLog("Set property " + value.Label + " of " + nodeObject.Name + " to: " + value.Val.ToString(), false);
	                                    }
                                }
                            }

It seems to work now. Was my correction right?

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: [Official Thread] Z-Wave Plugin v0.5.1

#134 Post by Automate » Sat Mar 22, 2014 7:45 am

I don't use Z-wave yet. Brian will need to comment on your changes.

You're the first one I've heard of using MonoDevelop with OSA. Please add any MonoDevelop setup info to the wiki here http://www.opensourceautomation.com/wik ... ent_basics

Mama70
Posts: 17
Joined: Sat Dec 08, 2012 12:06 pm

Re: [Official Thread] Z-Wave Plugin v0.5.1

#135 Post by Mama70 » Sun Mar 23, 2014 12:37 pm

Automate wrote:I don't use Z-wave yet. Brian will need to comment on your changes.

You're the first one I've heard of using MonoDevelop with OSA. Please add any MonoDevelop setup info to the wiki here http://www.opensourceautomation.com/wik ... ent_basics
I had a RTFM error, I did not read that wiki page at first :)

Monodevelop seems to have been rebranded as Xamarin Studio and I don't know what they want to do with it. I don't want to get involved into politics about it, I just wanted to be able to compile and fix the error.

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: [Official Thread] Z-Wave Plugin v0.5.1

#136 Post by Vaughn » Mon Mar 24, 2014 10:22 am

I was going to slap in the change, but I show 8 other errors preventing the project from even compiling. If it was just the logging, I would make those changes, but I am not familiar with the nature of the rest of the errors.

I think Brian will have to put that change in for you.


Vaughn

JohnneyBoy
Posts: 147
Joined: Thu Aug 18, 2011 8:04 am

Re: [Official Thread] Z-Wave Plugin v0.5.1

#137 Post by JohnneyBoy » Wed Apr 02, 2014 1:59 am

Hello,

Have an interesting issue.

If I send a command to a device, see below sample of the Zwave.log

04/02/2014 10:53:25.560 AM - Found Command: STAY AWAKE | param1: 0 | param2: | obj: Lounge Sensor | addr: Z86
04/02/2014 10:55:02.317 AM - Found Command: REPORTS | param1: 0 | param2: | obj: Lounge Sensor | addr: Z86

I looks like OSA is sending the command however there is no resulting loging in the OZW_Log.txt file!

The device is awake and before the issue of the above there was chatter going on immediately before, any ideas?

John

JohnneyBoy
Posts: 147
Joined: Thu Aug 18, 2011 8:04 am

Re: [Official Thread] Z-Wave Plugin v0.5.1

#138 Post by JohnneyBoy » Wed Apr 02, 2014 3:38 am

Hello,

It seems there is an issue with the comparing of strings in the code

{
foreach (Value value in node.Values)
{

if (value.Label == method.MethodName)
{

The trouble is that they are in different cases... so... to fix,

{
foreach (Value value in node.Values)
{
if (value.Label.ToUpper() == method.MethodName.ToUpper())
{

Now it works :-) Would suggest someone updates the ZWave plugin and releases it.

John

automan
Posts: 16
Joined: Sat Aug 30, 2014 1:18 am

Re: [Official Thread] Z-Wave Plugin v0.5.1

#139 Post by automan » Sat Aug 30, 2014 3:44 pm

Using an Aeon Stick S2 and some TKB on/off power sockets I spent some time trying to get the stick to show up and had no success, it had worked for me in the past (4.x).

I found another user on this forum who had fixed issues with Z-Wave by reverting to 0.5.3 (Cant re find the post to thank them yet), and am confirming this solution worked perfectly for me too - all zwave devices are now present and correct. Not sure what the issue is..dont have the skills.

volfan6415
Posts: 175
Joined: Sun Jun 08, 2014 9:24 am

[Official Thread] Z-Wave Plugin v0.5.1

#140 Post by volfan6415 » Sat Aug 30, 2014 6:55 pm

I think that was me you were referring to.

The issue is that the current plugin on the website had updated logging methods for use with OSA 0.4.4 which are incompatible with 0.4.3.

The older versions use the older logging methods and hence are compatible with 0.4.3

Post Reply