RaZberry: a full featured Z-Wave Home Controller

If you have a question or need help, this is the place to be.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RaZberry: a full featured Z-Wave Home Controller

Post by krambriw » Fri Jan 16, 2015 4:13 pm

I have not updated recently, I still have a rather old version running (1.7.2 from July 26 last year)

Phil
Experienced User
Posts: 108
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Phil » Fri Jan 16, 2015 4:26 pm

You should, the new expert gui is a lot more polished and the card is now z-wave plus certified (if that makes any difference!)
Also, if you upgrade and it breaks then I would benefit from your fix! :lol:

I'll continue to have a play.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RaZberry: a full featured Z-Wave Home Controller

Post by krambriw » Sun Jan 18, 2015 3:49 pm

I have upgraded to v2.0.0 and now it also works with my plugin as before (biggest mess was that I had to request NIFs from my devices to finish interview.

Some hints:

1) Check the path in the main.js. The old was like this

Code: Select all

function publish_mqtt (eventString, key) {
    try {
        system(
            "python /home/pi/Desktop/publish_mqtt.py",
            mqtt_host,
            mqtt_port,
            mqtt_topic,
            eventString,
            key 
        );
        return;
    } catch(err) {
        debugPrint("Failed to execute script system call: " + err);
    }
}
but since '/home/pi/Desktop' folder seems gone (at least I don't have it) I changed to "python /home/pi/publish_mqtt.py" where I put the publish_mqtt.py and mosquitto.py files.

2) Check the content of the file .syscommands in folder "/opt/z-way-server/automation" and, if missing, add on next line the key word 'python'


Restart z-way server after changes

Code: Select all

sudo /etc/init.d/z-way-server restart

Phil
Experienced User
Posts: 108
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Phil » Mon Jan 19, 2015 8:53 am

Thank you! All working again now.

I still have a desktop folder, but moved the files into a folder of their own anyway to keep things neat.

i think the part I was missing was the .syscommands part.
I had python in /opt/z-way-server file but not the /opt/z-way-server/automation
Now that I have put that in eventghost is getting all sorts of things once more!

Thanks again!
Now back to getting the doorbell to work...

Snowbird
Experienced User
Posts: 290
Joined: Fri Jul 03, 2009 10:04 am

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Snowbird » Fri Apr 08, 2016 8:22 am

Hello,

I've just bought myself a Razberry, and wanted to make it work with EG just as you guys did. I've read all 4 pages of this thread and I must admit that I'm a bit confused, the thread looks a bit messy (no offense to anyone I know that hard work that is behind it !), and I don't know where to start... It's just hard to follow when you have a very little knowledge, especially the part with MQTT that completely lost me :).

Would somebody be enough kind, to explain step by step from A to Z how install and setup the whole thing ? I'm sure this would be helpful to others too when they stumble on this topic.

Thank you !

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RaZberry: a full featured Z-Wave Home Controller

Post by krambriw » Fri Apr 08, 2016 9:33 am

R U up and running?

What is working? What is not?

Snowbird
Experienced User
Posts: 290
Joined: Fri Jul 03, 2009 10:04 am

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Snowbird » Fri Apr 08, 2016 7:11 pm

so far, I just installed the razberry in my RPI2, I upgraded the firmware to it's latest version (2.11), and can access the razberry web administration interface, and that's all for now. As for the EG plugin (and other corresponding files) I don't know what to install first, which version, what file to install on the RPI, what version of the EG plugin should be installed, and so on. All the info is in this thread I guess but it's just not very organized, some information can be found here and there, that's why I asked for a help from A to Z, what should someone that doesn't know much do to make this work, what to install, where, and in what order. Just a quick recap should be enough i think. Well I don't want you to spend more than 10 minutes of your time, that's already cool and kind to share your findings and your knowledge.

thank you in advance ;)

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RaZberry: a full featured Z-Wave Home Controller

Post by krambriw » Sat Apr 09, 2016 5:02 am

The first steps are already written and starting here, they are still valid:
http://eventghost.net/forum/viewtopic.p ... 394#p29915

The rest of this complete thread is, what I think very informative. It is just 4 pages....

For the latest version, always download from my link below. I do not update my plugins in the EG package for now, I am awaiting a better solution or repository.

Snowbird
Experienced User
Posts: 290
Joined: Fri Jul 03, 2009 10:04 am

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Snowbird » Sat Apr 09, 2016 7:12 am

I'm not afraid of reading 4 pages, actually I have read them several times before asking for help, usually I do my best to try understand without bothering others...
I don't know if you got the chance to re-read the 4 pages (takes only 5 minutes, read them if you have the time), you will see by yourself that some part are not very clear, especially for those with less knowledge... Anyway, thanks for the help, I will try to guess things and make it work, and if I manage to make it work, I will put in this thread a step by step guide, to help others.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RaZberry: a full featured Z-Wave Home Controller

Post by krambriw » Sat Apr 09, 2016 7:19 am

@Snowbird
It was not ment to wipe the request away from dashboard, sorry if it was understood like that. However, the interest for this plugin was deep-frozen for long. If interest is there, for sure we should do something better. To start the plugin should be posted in the correct forum part. If start on a tutorial, that would of course be great and I can help/give feedback

The first step is anyway to install the plugin, configure it and some actions. This does not differ from all other plugins. Have you managed this?

Second step is to have RaZberry to notify EG when new events are happening

Snowbird
Experienced User
Posts: 290
Joined: Fri Jul 03, 2009 10:04 am

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Snowbird » Sat Apr 09, 2016 8:49 am

No worries Walter ;)

Below, is what I did so far :

MQTT PART

- I have installed the MQTT broker using your link, and it worked flawlessly :
http://mosquitto.org/2013/01/mosquitto- ... epository/

- then copied those 3 files to the RPI :
1) .syscommands into /opt/z-way-server/automation
2) publish_mqtt.py and mosquitto.py into /home/Pi/Desktop (I didn't have the folder "Desktop" on my RPI, so I created it)

all 3files were taken from this link :
http://krambriw.net/Release/RaZBerry%20 ... our%20RPi/

- then I have edited the file main.js that is located in /opt/z-way-server/automation, and added the same code as you for now at the end of the main.js, and just change the IP address by mine for now, the remaining is untouched (for now).

Code: Select all

    ///////////////////////////////////////////////////////////////////////////////////////////////////
    var mqtt_host = '192.168.1.45';
    var mqtt_port = 1883;
    var mqtt_topic = '/zwave';

    function publish_mqtt (eventString, key) {
        try {
            system(
                "python /home/pi/Desktop/publish_mqtt.py",
                mqtt_host,
                mqtt_port,
                mqtt_topic,
                eventString,
                key
            );
            return;
        } catch(err) {
            debugPrint("Failed to execute script system call: " + err);
        }
    }

    function switch_binary (device, instance, theValue) {
        device += "";
        instance += "";
        state = 'on';
        key = 255;
        if (theValue == false){
            state = 'off';
            key = 0;
        }
        eventString = 'Device_' + device + '_Instance_' + instance+'_' + state;
        publish_mqtt(eventString, key);
    }

    function sensor_binary_temperature (device, instance, theValue) {
        device += "";
        instance += "";
        theValue += "";
        eventString = 'Device_' + device + '_Instance_' + instance + '_temperature';
        publish_mqtt(eventString, theValue);
    }

    function sensor_binary_input (device, instance, theValue) {
        device += "";
        instance += "";
        theValue += "";
        eventString = 'Device_' + device + '_Instance_' + instance;
        publish_mqtt(eventString, theValue);
    }


    zway.devices[2].instances[1].SwitchBinary.data.level.bind(function() {
        switch_binary (2, 1, this.value);
    });

    zway.devices[2].instances[2].SwitchBinary.data.level.bind(function() {
        switch_binary (2, 2, this.value);
    });

    zway.devices[6].instances[1].commandClasses.SensorBinary.data[1].level.bind(function() {
        sensor_binary_input (6, 1, this.value);
    });

    zway.devices[6].instances[2].commandClasses.SensorBinary.data[1].level.bind(function() {
        sensor_binary_input (6, 2, this.value);
    });

    zway.devices[6].instances[3].commandClasses.SensorMultilevel.data[1].val.bind(function() {
        sensor_binary_temperature (6, 3, this.value);
    });

    zway.devices[6].instances[4].commandClasses.SensorMultilevel.data[1].val.bind(function() {
        sensor_binary_temperature (6, 4, this.value);
    });

By the way, the main.js file located on my RPI doesn't exactly look as yours located on your link below, I kept mine untouched, and just added the last part to it (your specific setup) at the end of the file :
http://krambriw.net/Release/RaZBerry%20 ... our%20RPi/

- and finally, I have restarted the z-way server to apply changes :

Code: Select all

sudo service z-way-server restart
______________________________________________________________________

Eventghost PART

I have simply added both plugins :

- MQTT Client found here :
http://krambriw.net/Release/MQTT%20Clie ... 20version/

- Razberry plugin found here :
http://krambriw.net/Release/RaZBerry%20 ... 20version/

Both plugins loaded to EG perfectly.
______________________________________________________________________

Now, I will "try" :) to continue my setup, and figure out the rest :) can you just tell me if I missed something so far ? Thanks.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: RaZberry: a full featured Z-Wave Home Controller

Post by krambriw » Sat Apr 09, 2016 10:07 am

Sounds good so far I think

One thing to be noted: the file main.js needs to be edited and aligned with the z-wave ID's you have, the examples are mine and may not be the same in your system

Code: Select all

  zway.devices[2].instances[1].SwitchBinary.data.level.bind(function() {
        switch_binary (2, 1, this.value);
    });

    zway.devices[2].instances[2].SwitchBinary.data.level.bind(function() {
        switch_binary (2, 2, this.value);
    });

    zway.devices[6].instances[1].commandClasses.SensorBinary.data[1].level.bind(function() {
        sensor_binary_input (6, 1, this.value);
    });

    zway.devices[6].instances[2].commandClasses.SensorBinary.data[1].level.bind(function() {
        sensor_binary_input (6, 2, this.value);
    });

    zway.devices[6].instances[3].commandClasses.SensorMultilevel.data[1].val.bind(function() {
        sensor_binary_temperature (6, 3, this.value);
    });

    zway.devices[6].instances[4].commandClasses.SensorMultilevel.data[1].val.bind(function() {
        sensor_binary_temperature (6, 4, this.value);
    });


Also use screen shots to document your further

Sem;colon
Experienced User
Posts: 589
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Sem;colon » Sat Apr 09, 2016 6:38 pm

Hi snowbird,
Just fyi, there is also another plugin for z-way: http://www.eventghost.org/forum/viewtop ... f75ae71e7b
But it's not using mqtt for the communication. Just in case you don't get this one to work...

Snowbird
Experienced User
Posts: 290
Joined: Fri Jul 03, 2009 10:04 am

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Snowbird » Sat Apr 09, 2016 7:07 pm

Sem;colon wrote:Hi snowbird,
Just fyi, there is also another plugin for z-way: http://www.eventghost.org/forum/viewtop ... f75ae71e7b
But it's not using mqtt for the communication. Just in case you don't get this one to work...
Thanks for the tip, I will take a look there too ;)

Phil
Experienced User
Posts: 108
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: RaZberry: a full featured Z-Wave Home Controller

Post by Phil » Tue Sep 27, 2016 11:27 am

Hi again!
krambriw, I notice on your plugins page now you have two MQTT links where the mosquitto is the old way?
Are there new ways of implementing the z-wave?

After multiple updates of the z-wave software on the Pi im still able to control the sockets but not get anything back into eventghost. Ive been through the settings and cant figure it. Maybe the new MQTT is easier?

thanks

Post Reply