pmix35 comport read problem

Forum about Xanura, Eaton Holec and Marmitek and other brand X10 and A10 devices.
Post Reply
lukelle
Starting Member
Starting Member
Posts: 6
Joined: Wed Oct 21, 2009 2:48 pm
Location: Netherlands

pmix35 comport read problem

Post by lukelle »

Hi all,

Want to share the following problem. I've got a pmix35 with which i'm sending and receiving X10 data using c#. Works fine, so far. But i've got one small problem I like to figure out.

- Every 500ms i'm polling the pmix with the RQ command. He responds just fine.
- When i'm selecting the housecode and devicecode on my remote, pmix echos for example 'L01' (yes, it answers a complete line, but for now i'll skip the impendance, voltage and crc info)
- Now 15 minutes later i'm actually gonna send a X10 command from my remote. The pmix only responds the command, not the device and house code. The X10 receiver responds firm to the command.

My question is, how can i recall which house- and device code i'm sending to?

I've written some kind of mapper. Some X10 commands are 'abused' to send a macro from the computer to multiple devices. So, the problem is that an actual X10 receiver responds fine, but on my computer i can't get to recall to which housecode and device i was initially sending to, only the command is echoed by the pmix.

Ps. i've tried different (faster) poll timings, no effect. Xanura software uses 500ms. So am I, at this moment.

Thanks in advance for assistance!
Lempens
Member
Member
Posts: 265
Joined: Wed Dec 12, 2007 1:24 am
Location: Netherlands

Re: pmix35 comport read problem

Post by Lempens »

Maybe you can truy a signal repeater or a phasecoupler
lukelle
Starting Member
Starting Member
Posts: 6
Joined: Wed Oct 21, 2009 2:48 pm
Location: Netherlands

Re: pmix35 comport read problem

Post by lukelle »

Hi. The problem lies not in the quality of the line reads. It's in the data itself. The commands from the device are received properly, but the house- and deviceaddress are not in the data.
Thanks anyway,

Guido
Lempens
Member
Member
Posts: 265
Joined: Wed Dec 12, 2007 1:24 am
Location: Netherlands

Re: pmix35 comport read problem

Post by Lempens »

That's strange because. In the program I have made the command that's being send first the House and Device adress, (A01) and then the House code with the command (AOFF). (All this data I receive twice)

In my program I receive all data. And with al large "Select case" I filter all the data that I need. But I have a phascoupler, so maybe that's the reason I receive it.
lukelle
Starting Member
Starting Member
Posts: 6
Joined: Wed Oct 21, 2009 2:48 pm
Location: Netherlands

Re: pmix35 comport read problem

Post by lukelle »

I collect all the data too. One of my remotes just sends the house/devicecode only once, while selecting this particular receiving device. After that the house/devicecode is never being sent again. But all following commands do work! So, the odd thing is that the house/devicecode is being remembered (even for a day or so) by the receiver (e.g. an SAIX12) or the pmix35 (which is not plausible).

My best guess for now is;

- yes indeed, A10 receivers keep the DH-code forever (forever, until a new one is set)
AND (!!)
- my remote is not functioning according to the X10 standard (it does set the HD-code only the first time. The command will work anyway because the A10 receiver remembers the HD-code)


Probably a plain X10 (Not A10) will only process the initial command sent by the remote. All following command will be discarded because of the lack of DH-code. Can not test, don't have X10)

The reason you receive everything twice is because all X10 commands are sent twice, according the X10 standards. It's not the phase coupler.

Just curious; you're using a phase coupler, so there's (or can be) 380V available in your house. The devices that need the 380V, are they disturbing the X10 signals? And/or do you use filters?


Guido
Lempens
Member
Member
Posts: 265
Joined: Wed Dec 12, 2007 1:24 am
Location: Netherlands

Re: pmix35 comport read problem

Post by Lempens »

Yes I have 380V, I use it for induction cooking, and for the Groundwater pump.
I use 3 Sperfilters. I have my normal net (230v) behind the 3 Sperfilters. And the pump and cooking, are before the sperfilters.

I have bought them in the beginning so I don't know if there will be any trouble without the sperfilters. But I gues not, because these devices only work a couple of minutes per day. And the coper wires are in 1 piece and very long. Not like you normale wall outlet, which is splitted several times.
thewall
Starting Member
Starting Member
Posts: 36
Joined: Tue Jul 01, 2008 5:39 pm
Location: Netherlands
Contact:

Re: pmix35 comport read problem

Post by thewall »

Hi Lukelle,

Although I do not have an answer to your problem, I'm triggered by your project.

Every now and again I'm trying to find some time to write soem c code to control the PMIX35. I'm not making progress due to time but also due to lack of the timing scheme of the PMIX and some basic understanding how to communicate with the device.

So far I wrote this simple piece of code

Code: Select all


if( (stream = fopen("/dev/ttyUSB0", "r+" )) != NULL )
    {

     while ( FLAG == 1 ){
        i++;
        sleep(1);                                                // sleep for 1 sec
        fputs ("$>9000RQCE#",stream);                //stuur een RQ naar de PMIX
        iStrlen=0;
        do {
                  c = fgetc (stream);                //ontvang karakter voor karakter terug van de pMIX
                  szTelegram[iStrlen++] = c;            //...en hou een teller bij
            } while (c != '#');                    //todat het eindkarakter van de PMIX bereikt is

        szTelegram[iStrlen]='\0';                // term de ingelezen string
        printf(" PMIX: %s \n", szTelegram);

        to_struct(szTelegram);   // write whatever comes back from the PMIX into a struct 

        if ( i > 200)     //arbitrary counter to stop the program after 200 iterations
            FLAG = 0;
    }
    }
    else
        printf("error opening /dev/ttyUSB0 ");
    fclose( stream );
 
This works fine, I do get al the information back from the PMIX.

I read in the PMIX documentation that I should write a Request everey 500 ms . But is this mandatory? I work with a 1 sec interval and it looks OK, or do I mis half of the info from PMIX35?

Another question I have is the timing on sending info TO the PMIX eg " LW A01A01 AONAON ". Should I invoke this command in my While loop? Should it be in 500 ms interval as well or can I fire the comand at any time?

Some help is very much appreciated, or perhaps a cod snapit on how you handle your comms with the PMIX.

Thanks! __Frank
Lempens
Member
Member
Posts: 265
Joined: Wed Dec 12, 2007 1:24 am
Location: Netherlands

Re: pmix35 comport read problem

Post by Lempens »

As far is I know you can fire the command at any time. Ofcourse at the end of the last command.
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Re: pmix35 comport read problem

Post by Bwired »

The 500ms is a setting which is better if you want to be realtime.
For example: if you want to react to an X10 command generated bij a motion sensor, you probably want this fast to turn on a light.
So its up to you which parameter you use.
The bas thing about the PMIX and CTX35 that you need to poll it :( I wish there was a good on which was event driven.
Post Reply

Return to “X10, A10 Xanura Marmitek Forum”