Announcement

Collapse
No announcement yet.

xapmcsRF - W800 / RFXCOM xAP Node

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Do you see the RFX sensors using the xAP Viewer? Do the RFX Sensors look to be processed properly in the IO window or debug output?

    I set it up to provide a message with each RF transmission. I would have thought that the transmission rate would be modest to conserve battery for these sensors.

    I use two bsc classes. One is .info and the other is .event. I could send only .event messages to reflect only changes in the sensor value. This is the way I do things with most of my xAP things with the .info only comming upon request from a bsc query.

    Another technique is to put a user-specified deadband zone so only changes outside this window would be transmitted. A third technique is to apply a smoothing algorithm so high frequency noise would be filtered.

    Give me some guidance on what you thing would be best.

    Comment


    • #62
      The RFXSensors do not show up in the device list of the browser window for xapmcsRF, only the X10 and OS sensors. I have not had a chance to look at the debug, but I will later tonight or tomorrow.

      For whatever reason the OS sensors send status at least once a minute (I am concerned about battery life...) and this is not configurable. As I posted in the mcsxAP plug-in thread, I am OK with the once a minute status as long as it doesn't bog down whatever systems are receiving that status, but that is what is happening.

      The .event option sounds like the best approach for the OS sensors, but wouldn't necessarily work for motion sensors, so the ideal implementation would make this optional.

      Also, I was fumbling around with the script option and it did not seem that the script was being called for sensor value change, only for the periodic (2 seconds default I think) call.

      And a minor cosmetic issue, the browser window is looking for blank1.gif in xapmcsw800\images\sensors rather than images\sensors.

      Bill

      Comment


      • #63
        My error for the RFXSensor going from the test setup to the build setup. It should be fixed with V1.5.0. The RFX Power was also implemented there.

        The correct path for the image is \xapmcsW800\... I added the missing files to the zip.

        I did a short test of the scripting and event trigger and it worked as I expected. The script file in the archive uses Test1 and Test2 tag names and I setup my M9 and M10 to map into these for the test. When I had both M9 and M10 ON with a palmpad then the xap message was generted from the script. The periodic interval should be 60 seconds. If you are seeing 120 seconds then something is bogging down the computer since this is a simple timer control.

        Note when doing scripting from my xAP applications you need to reread the script using the button at the bottom of the setup after changes are made. I do this so I do not need to reparse the text file each time it is executed. I just retain the tokenized file within scriptcontrol. Compiling/parsing script files usually takes longer than executing them. This is most important with large script files and files with lots of comments.

        xap-header
        {
        v=12
        hop=1
        uid=FF005200
        class=Message.Display
        source=mcs.W800.MCS5
        }
        Display.Text
        {
        line1=Test1 and Test2
        }
        Attached Files

        Comment


        • #64
          I don't know if maybe you pulled it for some reason, but 1.5.0 is not attached to the first message of this thread.

          I didn't try the script with motion sensors, only the temperature sensors. I will try and do some more thorough testing.

          Comment


          • #65
            I guess I messed-up when posting it. I did not intentionally omit it. It is there now.

            Comment


            • #66
              The RFX sensors are now recognized. Still getting some errors though:

              mcs.W800.MUAD-DIB 2006-12-28 11:07:27 | xapmcsW800 | ProcessCommData C8, 82, 40, 10, 00, 20 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:07:41 | xapmcsW800 | ProcessCommData 74, 8B, 38, C7 Line 4600 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:08:18 | xapmcsW800 | ProcessCommData A0, 50, AF, 08, F7 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:09:13 | xapmcsW800 | ProcessCommData A0, 50, AF, 08 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:09:57 | xapmcsW800 | ProcessCommData AB, 50, A0, 00, 04 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:09:57 | xapmcsW800 | ProcessCommData A0, 50, AF, 08, F7 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:11:38 | xapmcsW800 | ProcessCommData 60, 00 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:11:38 | xapmcsW800 | ProcessCommData B0, 50, AF, 08, F2, 82, 00 | Discarding AF while trying to sync on byte-count byte | Discarding 08 while trying to sync on byte-count byte | Discarding F4 while trying to sync on byte-count byte | Discarding 80 while trying to sync on byte-count byte | Discarded Power because parity invalid Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:11:38 | xapmcsW800 | ProcessCommData B0, 50, AE, 02, 00, 00, 00 | Discarding AF while trying to sync on byte-count byte | Discarding 08 while trying to sync on byte-count byte | Discarding CB while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarding B0 while trying to sync on byte-count byte Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:11:38 | xapmcsW800 | ProcessCommData B0, 50, A8, 00, 00, 00, 00 | Discarding AF while trying to sync on byte-count byte | Discarding 08 while trying to sync on byte-count byte | Discarding F2 while trying to sync on byte-count byte | Discarding 82 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarded Power because parity invalid Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:11:39 | xapmcsW800 | ProcessCommData 50, 0A, 4D, 10, 04, 00, 23 | Discarding AE while trying to sync on byte-count byte | Discarding 02 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarded Power because parity invalid Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:13:40 | xapmcsW800 | ProcessCommData 50, 0A, 4D, 10, 2A, 00, 02 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:21:16 | xapmcsW800 | ProcessCommData 54, 00, 00, 00, BC Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:21:16 | xapmcsW800 | ProcessCommData 80, 01, 8B, C0 Line 4720 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:21:16 | xapmcsW800 | ProcessCommData A1, 50, AC, 84, 7B, 80 | Discarded Power because upper nibble of address bytes not complemented | Discarding 00 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarding BC while trying to sync on byte-count byte | Discarding B0 while trying to sync on byte-count byte Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:23:36 | xapmcsW800 | ProcessCommData B0, 50, AF, 00, 00, 00, 00 Line 4190 Overflow
              mcs.W800.MUAD-DIB 2006-12-28 11:23:36 | xapmcsW800 | ProcessCommData B0, 50, 12, 02, 00, 00, 00 | Discarding AE while trying to sync on byte-count byte | Discarding 08 while trying to sync on byte-count byte | Discarding 00 while trying to sync on byte-count byte | Discarding 02 while trying to sync on byte-count byte | Discarding F4 while trying to sync on byte-count byte | Discarded Power because parity invalid Line 4190 Overflow

              Comment


              • #67
                The overflows are on integer math so it looks as if the internal calc is with integer and then stores the result as long. I changed it to use long for all elements of the expression. It is posted V1.5.1. I also filtered the OS and RFX Sensor output to only send xAP messages on changes. It still could be an issue where the lsb is toggling, but it is a start to see how it does on your system.

                Comment


                • #68

                  Comment


                  • #69
                    The discard message is not what I would consider an error, but simply a validity check that indicates some data in the stream is not correct when trying to sync with a packet start. For this one it is looking for the start of a packet and it found the 30 (48 bit packet and power is the only 48 bit sensor), but rejected it because other conditions for a power sensor not satisfied.

                    A0, 60
                    21:27:06 | 30, 58, 00, 00, 20, 00
                    21:27:06 | 40 | Discarded Power because upper nibble of address bytes not complemented
                    It looks like the next data to be received is the rain sensor with a packet count of 84 bits (54 byte). The stream shows what looks like a transmission being aborted and then restarted. There is some checksum information in Bert's document, but It was sketchy and did not indicate what was being checksummed so the OS sensors currently do not have checksum validation and this will cause bad data getting through. I need to check with Bert on how to use the checksum bits.

                    I would guess that it accepted the first 54 and the next 11 bytes rather than rejecting the first line. If the second 54 was accepted as the byte count packet if would have also failed because there were only 80 bits received. I'm guessing that the line starting with 50 is one of the 80 bit OS sensors.

                    When sensor reporting is spaced out with a few second separation then it is easy to find the start, but when they stack up and overlap then it becomes important to have as much validation as possible.

                    21:27:06 | 54, 2A, 1D, 00, 86
                    21:27:06 | 54, 2A, 1D
                    21:27:07 | 00, 86, 00, 00, 10, 05, 40
                    21:27:09 | 50, 0A, 4D
                    21:27:09 | 10, 0A, 00, 04, 00, 00, 20
                    For the Baro I'm dividing the hPa by 33.8638 to get the inHg. This may not be the correct conversion. Can you check for what the coversion should be? Do you ave an apples to apples comparison of what I report vs what it should be?

                    Comment


                    • #70
                      Michael, I have information ready how to calculate the checksum for the different sensors. Please send me an email and in return I will send the data.

                      hPa conversion: http://www.unit-conversion.info/pressure.html

                      Bert

                      Comment


                      • #71
                        Right now the pressure isn't updating. Last night it was -20. Should be around 1025 or 30.27 (what it is now according to the sensor, it has a display).

                        Bill

                        Comment


                        • #72
                          My conversion factor is correct for baro, but my offset was removed rather than added to the base number. I implemented the checksum for the OS sensors based upon Bert's data. I simulated the baro and temp sensors to confirm correct implementation. Note that the rain sensor does not have checksum defined so it could be a problematic one.

                          Update posted V1.5.2.

                          Comment


                          • #73
                            OK, baro is working now, but the temperature is still not always correct. Right now it is -19 rather than 82.

                            And I am not sure what is happening to the string values for these sensors. I know with the 1wire sensors that the temperatures come through as 79.4, but with the OS sensors (and the RFXSensors) it appears the device string is based off the device value, which has no fractional part. But I thought I saw that the text value coming in the xAP message was correct, is mcsXap doing something different based on the device type or something else? This is not a big deal for temp or humidity, but it is for pressure. I would also be OK without the conversion for pressure (and then the issue with the fractional part wouldn't matter), at least as an option.

                            And I still can't get scripting to work with xapmcsRF. I add a tag value to a sensor (I have one on both a motion sensor and an OS sensor) and check the Ev column. This is the start of the script:
                            Code:
                            sub main(sTag)
                            
                                '=================== Script Objective ============================
                                'Send a Message.Display message when Security Test1 and X10 Test2 are ON
                                '==================================================================
                            
                                'xap.writelog "W800 Script", cstr(sTag)
                            
                            
                                'When sTag is null it means that this is periodic call to the script
                                'rather than on a data change event.  For this script there is nothing
                                'to do on periodic called if it occurs
                            
                                if sTag = "" then
                                    exit sub
                                end if
                            
                                xap.writelog "W800 Script", sTag
                            If I uncomment the first xap.writelog, I get a log entry every two seconds as expected (that is my script interval). But I never get anything for the second xap.writelog.

                            Bill

                            Comment


                            • #74
                              For the script, post your .ini file and we can work from there.

                              For the Temperature, capture the debug output so we can see both the incoming data and the decoded output. If the outputs are not in the debug then I will need to add it.

                              I did not include the DisplayText key in the messages and that is why the DeviceString is not updating. I did inlcude the Text key and that goest to the DeviceValue. It was an oversight on my part. I usually format DisplayText with HTML and icons. Is that OK with you?

                              Comment


                              • #75
                                The ini file is attached, here is recent debug log info:

                                12/30/2006 7:19:08 PM 69548.85 | xapmcsW800 Debug Data Received and Procesed: 50, 0A, 4D, 10, 0A
                                12/30/2006 7:19:08 PM 69548.87 | xapmcsW800 Debug AddW800Unit at 0A4D_105
                                12/30/2006 7:19:08 PM 69548.87 | xapmcsW800 Debug AddW800Unit Existing Device at 0A4D_105 on DC 0A4D_105
                                12/30/2006 7:19:08 PM 69548.88 | xapmcsW800 Debug AddW800Unit at 0A4D_105_B
                                12/30/2006 7:19:08 PM 69548.88 | xapmcsW800 Debug AddW800Unit Existing Device at 0A4D_105_B on DC 0A4D_105_B
                                12/30/2006 7:19:08 PM 69548.88 | xapmcsW800 Debug Data Received and Procesed: 40, 05, 00, 00, 25, 00
                                12/30/2006 7:19:09 PM 69549.84 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3
                                12/30/2006 7:19:09 PM 69549.84 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3 on DC 5A6D_2C3
                                12/30/2006 7:19:09 PM 69549.85 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_H
                                12/30/2006 7:19:09 PM 69549.87 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_H on DC 5A6D_2C3_H
                                12/30/2006 7:19:09 PM 69549.87 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_B
                                12/30/2006 7:19:09 PM 69549.87 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_B on DC 5A6D_2C3_B
                                12/30/2006 7:19:09 PM 69549.87 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_F
                                12/30/2006 7:19:09 PM 69549.87 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_F on DC 5A6D_2C3_F
                                12/30/2006 7:19:09 PM 69549.88 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_L
                                12/30/2006 7:19:09 PM 69549.88 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_L on DC 5A6D_2C3_L
                                12/30/2006 7:19:09 PM 69549.88 | xapmcsW800 Debug Data Received and Procesed: 60, 5A, 6D, 00, C3, 80, 27, 60, 06, A9, 61, 5E, 41
                                12/30/2006 7:19:10 PM 69550.02 | xapmcsW800 Debug Data Received and Procesed: 60, 5A, 6D, 00, C3
                                12/30/2006 7:19:10 PM 69550.04 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3
                                12/30/2006 7:19:10 PM 69550.04 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3 on DC 5A6D_2C3
                                12/30/2006 7:19:10 PM 69550.04 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_H
                                12/30/2006 7:19:10 PM 69550.04 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_H on DC 5A6D_2C3_H
                                12/30/2006 7:19:10 PM 69550.04 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_B
                                12/30/2006 7:19:10 PM 69550.05 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_B on DC 5A6D_2C3_B
                                12/30/2006 7:19:10 PM 69550.05 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_F
                                12/30/2006 7:19:10 PM 69550.05 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_F on DC 5A6D_2C3_F
                                12/30/2006 7:19:10 PM 69550.07 | xapmcsW800 Debug AddW800Unit at 5A6D_2C3_L
                                12/30/2006 7:19:10 PM 69550.07 | xapmcsW800 Debug AddW800Unit Existing Device at 5A6D_2C3_L on DC 5A6D_2C3_L
                                12/30/2006 7:19:10 PM 69550.07 | xapmcsW800 Debug Data Received and Procesed: 80, 27, 60, 06, A9, 61, 5E, 41
                                12/30/2006 7:19:10 PM 69550.87 | xapmcsW800 Debug Data Received and Procesed: 54
                                12/30/2006 7:19:10 PM 69550.88 | xapmcsW800 Debug Data Received and Procesed: 2A, 1D, 00, 86, 00, 00, 10, 05
                                12/30/2006 7:19:10 PM 69550.9 | xapmcsW800 Debug AddW800Unit at 2A1D_286_E
                                12/30/2006 7:19:10 PM 69550.9 | xapmcsW800 Debug AddW800Unit Existing Device at 2A1D_286_E on DC 2A1D_286_E
                                12/30/2006 7:19:10 PM 69550.91 | xapmcsW800 Debug AddW800Unit at 2A1D_286_R
                                12/30/2006 7:19:10 PM 69550.91 | xapmcsW800 Debug AddW800Unit Existing Device at 2A1D_286_R on DC 2A1D_286_R
                                12/30/2006 7:19:10 PM 69550.91 | xapmcsW800 Debug AddW800Unit at 2A1D_286_F
                                12/30/2006 7:19:10 PM 69550.91 | xapmcsW800 Debug AddW800Unit Existing Device at 2A1D_286_F on DC 2A1D_286_F
                                12/30/2006 7:19:10 PM 69550.91 | xapmcsW800 Debug AddW800Unit at 2A1D_286_L
                                12/30/2006 7:19:10 PM 69550.91 | xapmcsW800 Debug AddW800Unit Existing Device at 2A1D_286_L on DC 2A1D_286_L
                                12/30/2006 7:19:10 PM 69550.93 | xapmcsW800 Debug Data Received and Procesed: 40, 42, 12

                                I don't see any output in the debug, only input.

                                Right now the temperature is showing as 82, which is correct, just a few minutes ago it was -18.

                                Yes, I am OK with the html and icons in the display text.

                                Bill
                                Attached Files

                                Comment

                                Working...
                                X