Z-Wave on Mac OSX

Discussions about Z-Way software and Z-Wave technology in general
zeimon
Posts: 10
Joined: 07 Jun 2012 15:38

Thanks for the fast reply

Post by zeimon »

I installed argtable2.h and I am now getting a different error. I assume it is because I need to install openssl-dev, which I am having problems in finding.

I installed fink because I wanted to install openssl-dev? Is this right?


My error is:



make clean all
rm -f *.o z-agent
c++ -c ioutil.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
ioutil.c:21:12: warning: 'SSL_read' is deprecated [-Wdeprecated-declarations]
result = SSL_read(session, buffer, size);
^
ioutil.c:23:11: warning: 'SSL_get_error' is deprecated [-Wdeprecated-declarations]
switch (SSL_get_error(session, result))
^
ioutil.c:34:4: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
DEFAULT_HANDLER("Error reading data from server", session, result);
^
./ssl.h:4:57: note: expanded from macro 'DEFAULT_HANDLER'
#define DEFAULT_HANDLER(s, ssl, r) ERR(s ": (%d) %s
", ERR_get_error(), ERR_reason_error_string(ERR_get_error()))
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ioutil.c:34:4: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
DEFAULT_HANDLER("Error reading data from server", session, result);
^
./ssl.h:4:98: note: expanded from macro 'DEFAULT_HANDLER'
#define DEFAULT_HANDLER(s, ssl, r) ERR(s ": (%d) %s
", ERR_get_error(), ERR_reason_error_string(ERR_get_error()))
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ioutil.c:34:4: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
DEFAULT_HANDLER("Error reading data from server", session, result);
^
./ssl.h:4:74: note: expanded from macro 'DEFAULT_HANDLER'
#define DEFAULT_HANDLER(s, ssl, r) ERR(s ": (%d) %s
", ERR_get_error(), ERR_reason_error_string(ERR_get_error()))
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
5 warnings generated.
c++ -c main.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
main.c:81:5: warning: 'SSL_write' is deprecated [-Wdeprecated-declarations]
SSL_write(sslSession, buffer, bytes);
^
main.c:221:13: warning: 'SSL_read' is deprecated [-Wdeprecated-declarations]
sslRead = SSL_read(sslSession, b, sizeof(b));
^
main.c:222:11: warning: 'SSL_get_error' is deprecated [-Wdeprecated-declarations]
switch (SSL_get_error(sslSession, sslRead))
^
main.c:240:4: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
DEFAULT_HANDLER("Failed to receive server response", sslSession, sslRead);
^
./ssl.h:4:57: note: expanded from macro 'DEFAULT_HANDLER'
#define DEFAULT_HANDLER(s, ssl, r) ERR(s ": (%d) %s
", ERR_get_error(), ERR_reason_error_string(ERR_get_error()))
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
main.c:240:4: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
DEFAULT_HANDLER("Failed to receive server response", sslSession, sslRead);
^
./ssl.h:4:98: note: expanded from macro 'DEFAULT_HANDLER'
#define DEFAULT_HANDLER(s, ssl, r) ERR(s ": (%d) %s
", ERR_get_error(), ERR_reason_error_string(ERR_get_error()))
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
main.c:240:4: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
DEFAULT_HANDLER("Failed to receive server response", sslSession, sslRead);
^
./ssl.h:4:74: note: expanded from macro 'DEFAULT_HANDLER'
#define DEFAULT_HANDLER(s, ssl, r) ERR(s ": (%d) %s
", ERR_get_error(), ERR_reason_error_string(ERR_get_error()))
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
6 warnings generated.
c++ -c log.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
c++ -c serial.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
c++ -c ssl.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
ssl.c:18:2: warning: 'SSL_library_init' is deprecated [-Wdeprecated-declarations]
SSL_library_init();
^
ssl.c:19:2: warning: 'SSL_load_error_strings' is deprecated [-Wdeprecated-declarations]
SSL_load_error_strings();
^
ssl.c:30:20: warning: 'TLSv1_client_method' is deprecated [-Wdeprecated-declarations]
ctx = SSL_CTX_new(TLSv1_client_method());
^
ssl.c:30:8: warning: 'SSL_CTX_new' is deprecated [-Wdeprecated-declarations]
ctx = SSL_CTX_new(TLSv1_client_method());
^
ssl.c:33:47: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
ERR("Failed to allocate SSL context: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:42: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:33:47: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
ERR("Failed to allocate SSL context: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:18: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:38:11: warning: 'SSL_CTX_use_certificate_chain_file' is deprecated [-Wdeprecated-declarations]
if (1 != SSL_CTX_use_certificate_chain_file(ctx, certFile))
^
ssl.c:40:52: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
ERR("Failed to load personal certificate: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:42: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:40:52: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
ERR("Failed to load personal certificate: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:18: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:45:11: warning: 'SSL_CTX_use_PrivateKey_file' is deprecated [-Wdeprecated-declarations]
if (1 != SSL_CTX_use_PrivateKey_file(ctx, keyFile, SSL_FILETYPE_PEM))
^
ssl.c:47:56: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
ERR("Failed to load personal certificate key: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:42: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:47:56: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
ERR("Failed to load personal certificate key: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:18: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:52:11: warning: 'SSL_CTX_load_verify_locations' is deprecated [-Wdeprecated-declarations]
if (1 != SSL_CTX_load_verify_locations(ctx, caCertFile, NULL))
^
ssl.c:54:46: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
ERR("Failed to load CA certificate: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:42: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:54:46: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
ERR("Failed to load CA certificate: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:18: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:59:2: warning: 'SSL_CTX_set_verify' is deprecated [-Wdeprecated-declarations]
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
^
ssl.c:69:2: warning: 'SSL_CTX_free' is deprecated [-Wdeprecated-declarations]
SSL_CTX_free(ctx);
^
ssl.c:81:8: warning: 'SSL_new' is deprecated [-Wdeprecated-declarations]
ssl = SSL_new(context);
^
ssl.c:84:47: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
ERR("Failed to allocate SSL session: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:42: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:84:47: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
ERR("Failed to allocate SSL session: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:18: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:90:8: warning: 'BIO_new_socket' is deprecated [-Wdeprecated-declarations]
bio = BIO_new_socket(sock, BIO_NOCLOSE);
^
ssl.c:91:2: warning: 'SSL_set_bio' is deprecated [-Wdeprecated-declarations]
SSL_set_bio(ssl, bio, bio);
^
ssl.c:96:2: warning: 'SSL_set_connect_state' is deprecated [-Wdeprecated-declarations]
SSL_set_connect_state(ssl);
^
ssl.c:99:11: warning: 'SSL_do_handshake' is deprecated [-Wdeprecated-declarations]
if (1 != SSL_do_handshake(ssl))
^
ssl.c:101:44: warning: 'ERR_get_error' is deprecated [-Wdeprecated-declarations]
ERR("Failed to perform handshake: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:42: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:101:44: warning: 'ERR_reason_error_string' is deprecated [-Wdeprecated-declarations]
ERR("Failed to perform handshake: %s
", SSLERROR);
^
./log.h:11:40: note: expanded from macro 'ERR'
#define ERR(s, ...) Log(0, "[E] " s, ##__VA_ARGS__)
^
ssl.c:8:18: note: expanded from macro 'SSLERROR'
#define SSLERROR ERR_reason_error_string(ERR_get_error())
^
ssl.c:104:3: warning: 'SSL_free' is deprecated [-Wdeprecated-declarations]
SSL_free(ssl);
^
ssl.c:117:2: warning: 'SSL_shutdown' is deprecated [-Wdeprecated-declarations]
SSL_shutdown(ssl);
^
ssl.c:120:2: warning: 'SSL_free' is deprecated [-Wdeprecated-declarations]
SSL_free(ssl);
^
29 warnings generated.
c++ ioutil.o main.o log.o serial.o ssl.o -lssl -largtable2 -lcrypto -o z-agent
# Trying to copy z-agent to ../Release folder
cp z-agent ../Release
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

All these are warnings

Post by PoltoS »

So, Z-Agent was compiled successfuly.

You can not run it with ./Run_Z-Agent.sh (edit it to fill correct device name for your USB dongle).

Note that on latest OS X our Z-Agent ceased to work. We are seeking for a solution and hope to release new version net week.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Z-Connector now works on Mac OS X too!

Post by PoltoS »

Dear Z-Cloud users,

We are happy to announce that Z-Connector now works on Mac OS X too. Not compilation is needed anymore. Just open OSX folder, edit port name in Run_Z-Agent.sh file to something like cu.usbserial (depends on your Z-Wave stick) and execute it (it is good to run it in terminal to see what happens).

Have fun with Z-Cloud!
pvdspek
Posts: 20
Joined: 17 Jun 2011 11:52

Hi, thanks for the Mac OS X

Post by pvdspek »

Hi, thanks for the Mac OS X support!

I just could just use some help on finding out what port name I have to use for my TrickleStar USB stick.
Is there a place where I can find the right name to use in the Agent.sh file?

Thanks,
Pepijn.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Check /dev/ folder

Post by PoltoS »

Do ls /dev/cu.* in your terminal. Plugging on and off should result in desappear and creation of this device.You can also use sudo dmesg | tail -n 10 to see if the driver was loaded correctly. We are not sure about TrickleStar driver for OS X.
pvdspek
Posts: 20
Joined: 17 Jun 2011 11:52

Hi,

Post by pvdspek »

Hi,

Thanks for the helpful remarks. I should be /dev/cu.usbserial indeed.

However I still don't get it to work properly.
Running z-agent gives the following results:
---
Last login: Wed Jun 27 16:42:20 on ttys000
MacBook-Air-van-Dianta:~ apple$ /Users/apple/Desktop/Z-Connector/OSX/z-agent ; exit;
dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
Referenced from: /Users/apple/Desktop/Z-Connector/OSX/z-agent
Reason: image not found
Trace/BPT trap: 5
logout

[Proces voltooid]
----

Any suggestions how to get it right?

Thanks.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Please have a look in Run_Z-Agent.sh

Post by PoltoS »

If you don't want to run the software using Run_Z-Agent.sh file, make sure to set up the variable announced on the top of this file that sets the path to libraries.

I would propose you to edit device name in Run_Z-Agent.sh and execute it.
kiddtonda
Posts: 2
Joined: 09 Jul 2012 22:54

Z-connector won't start properly

Post by kiddtonda »

Hello, I have a problem when running Z-connector on Mac OS 10.7.4.
See attached log from the ./Run_Z-Agent.sh run.
It keeps on "restarting" after some socket failure...

./Run_Z-Agent.sh
Opening device...
Connecting to server...
Establishing SSL connection...
Performing SSL handshake...
Establishing SSL connection...
Performing SSL handshake...
Loop started
[E] Socket has gone
Loop ended
Opening device...
Connecting to server...
[I] Establishing SSL connection...
[I] Performing SSL handshake...
[I] Establishing SSL connection...
[I] Performing SSL handshake...
[I] Loop started
[E] Socket has gone
[I] Loop ended
[I] Opening device...
[I] Connecting to server...
[I] Establishing SSL connection...
[I] Performing SSL handshake...
[I] Establishing SSL connection...
[I] Performing SSL handshake...
[I] Loop started
[I] Loop ended

Any idea where the problem could be??
Many thanks
kiddtonda
Posts: 2
Joined: 09 Jul 2012 22:54

Z-connector won't start properly

Post by kiddtonda »

I am sorry I didn't read the forum more properly... This problem occurred here before.
Anyway in my case I solved it by installing drivers necessary for my Z-Wave USB stick (USBtoSerial drivers for Mac OS). Now I am connecting to the right port and it works fine.
Thanks
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

OS X package is now available

Post by PoltoS »

OS X package is now available via Download your Z-Connector package.

No compilation is needed anymore. Just open OSX folder, edit port name in Run_Z-Agent.sh file to something like cu.usbserial (depends on your Z-Wave stick) and execute it (it is good to run it in terminal to see what happens). Have fun with Z-Cloud!
Post Reply