An other stange thing zwave / x10 commander / program mode

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
User avatar
Aqua-Passion
Starting Member
Starting Member
Posts: 13
Joined: Wed Dec 21, 2011 2:16 pm
Location: FRANCE
Contact:

An other stange thing zwave / x10 commander / program mode

Post 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 !
User avatar
Aqua-Passion
Starting Member
Starting Member
Posts: 13
Joined: Wed Dec 21, 2011 2:16 pm
Location: FRANCE
Contact:

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

Post 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!
User avatar
Aqua-Passion
Starting Member
Starting Member
Posts: 13
Joined: Wed Dec 21, 2011 2:16 pm
Location: FRANCE
Contact:

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

Post by Aqua-Passion »

One more thing
:-( sorry
in zwave settings Poll Interval ever stay to 0 Seconds
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

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

Post 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.
Regards, Ron.
User avatar
Aqua-Passion
Starting Member
Starting Member
Posts: 13
Joined: Wed Dec 21, 2011 2:16 pm
Location: FRANCE
Contact:

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

Post 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 ?
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

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

Post 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.
Regards, Ron.
User avatar
Aqua-Passion
Starting Member
Starting Member
Posts: 13
Joined: Wed Dec 21, 2011 2:16 pm
Location: FRANCE
Contact:

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

Post 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
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

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

Post 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.
Regards, Ron.
User avatar
Aqua-Passion
Starting Member
Starting Member
Posts: 13
Joined: Wed Dec 21, 2011 2:16 pm
Location: FRANCE
Contact:

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

Post by Aqua-Passion »

Hello,
Happy new year !
Yes , on event normaly run it's good thanks

and thank you for this very good software
Post Reply

Return to “DomotiGa Forum”