Page 1 of 1

An other stange thing zwave / x10 commander / program mode

Posted: Thu Dec 29, 2011 5:03 pm
by Aqua-Passion
Hello i have a new stange thing here
when domotiga is started in client/server mode
zwave commander and x10 commander work fine
but if i start server and after domotiga in client mode
x10 commander line is disabled
and when i click zwave commander it say
Z-Wave interface is not enabled or couldn't open port !

Re: An other stange thing zwave / x10 commander / program mode

Posted: Fri Dec 30, 2011 1:22 am
by Aqua-Passion
I have take a look at code .
the error
Z-Wave interface is not enabled or couldn't open port !
in zwave commander is returned by "IF NOT Main.hZWave"

Code: Select all

 IF NOT Main.bZWaveEnabled OR IF NOT Main.hZWave THEN
    Message.Info(("Z-Wave interface is not enabled\nor couldn't open port!"))
  ELSE

maybe because in Main.module

Code: Select all

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' open Z-Wave serial port and initialize
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PRIVATE SUB Setup_ZWave()

  IF bZWaveEnabled THEN
    WriteLog(("Z-Wave support enabled."))
    IF bServer THEN
      ' create a new Z-Wave class instance
      hZWave = NEW CZWave
      ' set the properties
      WITH hZWave
        .Port = sZWaveSerialPort
        .Baud = sZWaveBaudrate
        .ZWaveDebug = bZWaveDebug
        .ReloadNodes = bZWaveReloadNodes
        .UseOZW = bZWaveUseOZW
      END WITH
      ' connect to the serial port
      IF hZWave.Connect() THEN
        WriteLog(("Z-Wave interface connected to Port ") & sZWaveSerialPort)
        hZWave.InitZWave()
      ELSE
        WriteLog(("ERROR: Z-Wave interface FAILED to connect to Port ") & sZWaveSerialPort)
        hZWave = NULL
      END IF
    END IF
  ELSE
    IF bMainDebug THEN WriteLog(("Z-Wave support disabled."))
  END IF

END
maybe "IF bServer THEN" run only for server instance ?

->"Main.hZWave" is not initialized here ?

maybe it does not get server / separate instance ?

With other test I have see this :
"Control" buttons can activate zwave modules
but "Actions" can't and return :

Code: Select all

2011/12/30 00:17:03 [Devices] Can't control device 'Lampe test' because Z-Wave interface is disabled!

Re: An other stange thing zwave / x10 commander / program mode

Posted: Fri Dec 30, 2011 1:41 am
by Aqua-Passion
One more thing
:-( sorry
in zwave settings Poll Interval ever stay to 0 Seconds

Re: An other stange thing zwave / x10 commander / program mode

Posted: Fri Dec 30, 2011 9:34 pm
by RDNZL
Those commanders are disabled in client mode with a reason, there are no xmlrpc methods yet to control those interfaces, so the client cannot reach the server.
The server has connection to the interfaces.
The zwave poll timer is not implemented, hence the settings arent working, there is some partial code, but then the open-zwave wrapper came along.

Re: An other stange thing zwave / x10 commander / program mode

Posted: Fri Dec 30, 2011 9:51 pm
by Aqua-Passion
Ok thanks
an for
With other test I have see this :
"Control" buttons can activate zwave modules
but "Actions" can't and return :
Code: Select all
2011/12/30 00:17:03 [Devices] Can't control device 'Lampe test' because Z-Wave interface is disabled!
It is a bug zwave modules action work with Contol buttons an return this error in Events actions or it is a bug ?

Re: An other stange thing zwave / x10 commander / program mode

Posted: Fri Dec 30, 2011 10:35 pm
by RDNZL
They both call Devices.SetDevice() routine (either directly in server mode, or via xmlrpc when client asks it) which checks if the Zwave interface is enabled.

Or do you run your client also as server by mistake?
So the GUI needs to have "DomotiGa Client" in window title.
Please give more information.
Are you sure the control button switch your module, and the event action is using setdevice and runs on server?
You don't run two DomotiGa servers at the same time on your network?
Otherwise you see log entry broadcasts in boths logs, which mix up things.

Re: An other stange thing zwave / x10 commander / program mode

Posted: Sat Dec 31, 2011 1:54 am
by Aqua-Passion
Domotiga client print "Domotiga Client 0.1.1.202 - ....." in window title

server is run with

Code: Select all

        # domotiga_server
        #
        # Serveur Domotiga

        description     "DomotiGaServer Service"
        author            "Ron Klinkien <info@domotiga.nl>"

        start on (net-device-up
                  and started mysql
                  and runlevel [2345])
        stop on runlevel [016]

        # tell upstart we're creating a daemon
        # upstart manages PID creation for you.
        respawn
        respawn limit 5 5

        # configuratio variables

        env DOMO_USER=aqua-passion
        env GBX2=/usr/bin/gbx2
        env GBC2=/usr/bin/gbc2
        env GBC2_OPTS=-pam

        # Execute the program

        chdir /home/aqua-passion/domotiga/DomotiGaServer
        pre-start exec sudo -H -n -u $DOMO_USER $GBC2 $GBC2_OPTS
        exec sudo -H -n -u $DOMO_USER $GBX2 > /dev/null 2>&1

I just tested
button "light test" switch the module state is displayed all is ok no debug messages

I have an event with Set device = "light test" "Value1" "On"
when i click "Run Now" light stay off , and i have
2011/12/31 00:38:35 [Devices] Can't control device 'light test' because Z-Wave interface is disabled!
I have no other domotiga server on the network

Re: An other stange thing zwave / x10 commander / program mode

Posted: Sat Dec 31, 2011 3:43 pm
by RDNZL
Ok clear, found it.

The "Run now" button directly calls Events.RunActions(rResult!id) which is executed on the client.
I have to create an xmlrpc method for it.
Nevertheless, if you let you events run normally they will be executed on the server.

Re: An other stange thing zwave / x10 commander / program mode

Posted: Sun Jan 01, 2012 11:52 am
by Aqua-Passion
Hello,
Happy new year !
Yes , on event normaly run it's good thanks

and thank you for this very good software