Announcement

Collapse
No announcement yet.

xapmcsWebControl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    i'm slowly getting there. and the chart software did finally install. i have no idea why it decided to work...at any rate, i appreciate your help, i'll likely go this route and add temp plug-in to my collection.

    Comment


      #47
      hey, one more hurdle to clear i think. i am trying to calibrate a voltage from webcontrol using slope/offset. didn't see a way to do that using bias/filter in xapmcswebcontrol. if there's something i'm missing any help would be appreciated. to try and get around this i've created virtual device instead in HS and a script to take the voltage and apply slope and offset using setdevicevalue function. trying to test using the devicevalue from a temp sensor, 1-wire, from webcontrol. it's "sort of" working but converts the device to integer immediately when retreiving using devicevalue function. i assume it's converting to a long integer. is there any way to retrieve the temperature (or voltage ultimately) as a variable (float, double, etc...) rather than integer?

      Comment


        #48
        No slope calibration function in xapmcsWebControl

        If you want to do math with fractional values you will need to use hs.DeviceString and extract the number from the HTML formatting. There are some scripts that have been published on the board that do some of this. There is a function in mcsTemperature that can be called via script that return the number. Windows scripting math is always Double. When using .vb scripting then I think the numbers are typed so you need to declare what you want.

        Comment


          #49
          cool. i bought mcsTemp so i'll look into that. thanks. future feature for xapmcsWebControl assuming it's worth keeping up. not sure how many people out there are using webcontrol board but i love it. i've got all 4 pool pumps hooked up now and freeze protection logic using the 1-wire temp sensor, but i'd like to use the existing water temp sensor because it's already installed. it gets read as voltage, hence the need for slope/offset.

          Comment


            #50
            The following should provide what you want. Different versions of HS have different plugin references so hs.GetPlugin may not be the correct one, but should be.

            YourNumber = hs.GetPlugin("mcsTemperature").GetNumber(hs.DeviceString("DC "))

            where DC is the device code that contains the item you want and YourNumber is just the numeric part of the contents of the formatted item.

            Comment


              #51
              awesome, this works, it's just hs.Plugin("mscTemperature"), etc. for me. thanks again.

              Comment


                #52
                ok, last question (i'm sure you've heard that before). getting this number into a homeseer device has proven more difficult than i would have imagined. i don't understand why homeseer doesn't just allow you to create real variables as calculated devices, that would make life so much easier and not even require scripting. but anyway when i assign Yournumber to a device (using setdevicevalue) it of course truncates it to an integer. perhaps i should just live with that but i'm so close...i've got the closed loop control all setup using a virtual device, but just would like it to be a real number if possible.

                Comment


                  #53
                  Homeseer provides the general case of DeviceString that can handle text objects for whatever manipulation you want. It provides DeviceValue that is an enumeration and in its early days was used like a percentage for lighting brightness levels. You are trying to use DeviceValue when you should be using DeviceString. It also provides DeviceStatus which also is an enumeration but generally treated more like an ON/OFF boolean.

                  There are many applications, including mcsTempeature, that use both DeviceString and DeviceValue for numeric data. A common convention is to scale the DeviceValue by the precision that you want to maintain. This is usually by 100 or by 1000. It means that when the data is used later in math operations the equation needs to be aware of the scaling. The database storage is more efficient with Integer data than text strings and that is why mcsTemperature stores scaled integer data rather than fractional data. There is no Access datatype for Float/Single/Double.

                  DeviceString is not limited to numbers only so that is where the mcsTemperature function comes into play to get the part of the text string that is the number which can then be used for the math operations.

                  If you want to do math and maintain fractional precision and want to retain the value between iterations then you will want to use virtual devices and the DeviceString property or GetVar/SaveVar/CreateVar functions. These functional values will give you global data, but will not persist between Homeseer restarts while DeviceString will persist.

                  When doing scripting every entity is treated as a variant object with math handled as Double. With the new .vb (.NET) scripting methods there are more data typing options, but the roots of Homeseer are in Windows Scripting.

                  Comment


                    #54
                    thanks much, i really do appreciate the help. turns out after further investigation, i have to use the 1-wire anyway, so it appears if i can get that one "installed" i'm set from programming perspective. probably for the best, i'll just get a longer probe and use compression fitting for installing inline one of the pipes.

                    Comment


                      #55
                      problem with my webcontrol board and xapmcswebcontrol

                      Hello

                      I've installed xapmcswebcontrol software to work with my PLC webcontrol board (Version: v03.00.07).

                      I can manage without problem webcontrol via its web interace. I've 5 DS18B30 and one HIH4000. Readings are working fine via original web interface.

                      Then I configure Xapmcsplugin: IP@, pooltime 300000ms.

                      the problem is that I found the system very unstable: it detects correctly all my sensors, start capturing the values. But disconnect (red bullet) often.

                      in the table, very often, the values are not refreshed. Even if I force a pooling by pressing the button at the bottom.



                      Any idea ?

                      Thank you

                      Comment


                        #56
                        I have multiple (5) DS18B20 connected on my webcontrol since 36h.

                        I have very special measurements logged with xapmcswebcontrol: Temperature jumps i.e. from value to high value... I don't see that when I watch the web interface of webcontrol.

                        Here is the log:

                        Code:
                        	SampleDate 	a1921680_120___01T	a1921680_120___02T	a1921680_120___03T
                        			2011-12-20 18:27:07	17000	1050	12000
                        			2011-12-20 18:22:07	17000	1050	12000
                        			2011-12-20 18:17:07	1710	1050	1190
                        			2011-12-20 18:12:07	1710	1050	1190
                        			2011-12-20 18:07:07	1730	1050	12000
                        			2011-12-20 18:02:07	1730	1050	12000
                        			2011-12-20 17:57:07	1740	1050	12000
                        			2011-12-20 17:52:07	1740	1050	12000
                        			2011-12-20 17:47:06	1740	1050	12000
                        			2011-12-20 17:42:06	1740	1050	12000
                        			2011-12-20 17:37:06	1730	1050	1190
                        			2011-12-20 17:32:06	1730	1050	1190
                        			2011-12-20 17:27:06	1710	1060	12000
                        			2011-12-20 17:22:06	1710	1060	12000
                        			2011-12-20 17:17:06	1710	1060	1190
                        graphic also available here http://ophain.dyndns.org/domo/index.php?page=vmc

                        any idea ?

                        Thank you

                        Comment


                          #57
                          There is a debug option that writes data to a text file that is typically in the \Data folder. Enable that and more diagnostics may be available.

                          Comment


                            #58
                            Originally posted by Michael McSharry View Post
                            There is a debug option that writes data to a text file that is typically in the \Data folder. Enable that and more diagnostics may be available.
                            Code:
                            Temp1	Temp2
                            1690	1020
                            1710	10000
                            1710	10000
                            17000	1010
                            17000	1010
                            1710	10000
                            17000	1010

                            Comment


                              #59
                              HTML Code:
                              21/12/2011 13:37:06	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.1 C</ts4><ts5>17.0 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8
                               21/12/2011 13:38:06	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.2 C</ts4><ts5>17.0 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8
                               21/12/2011 13:39:06	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.2 C</ts4><ts5>17.0 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8
                               21/12/2011 13:40:06	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.1 C</ts4><ts5>17.1 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8
                               21/12/2011 13:41:06	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.2 C</ts4><ts5>17.1 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8
                               21/12/2011 13:42:06	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.2 C</ts4><ts5>17.1 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8
                               21/12/2011 13:43:07	<ts1>16.5 C</ts1><ts2>10.5 C</ts2><ts3>11.8 C</ts3><ts4>10.2 C</ts4><ts5>17.1 C</ts5><ts6>unbound</ts6><ts7>unbound</ts7><ts8>

                              in xapmcsDatabase debug, we have the following:
                              Code:
                               21/12/2011 13:35:06 |	 xapmcsDatabase Debug ReadMessage Update sValue=21/12/2011 13:24:08; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=16,5; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=16,5 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=11,8; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=11,8 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=10,5; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=10,5 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=10,1; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=10,1 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=17.0; sDisplay=Unknown; Stip=Unknown; Make=0 
                               [B]21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=17.0[/B] 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=47; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:36:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=47 
                               21/12/2011 13:36:06 |	 xapmcsDatabase Debug ReadMessage Update sValue=21/12/2011 13:36:07; sDisplay=Unknown; Stip=Unknown; Make=0 
                              [B] 21/12/2011 13:40:53 |	 xapmcsDatabase Debug Log Analog INSERT INTO tblPeriodic (SampleDate,a1921680_120___01T,a1921680_120___02T,a1921680_120___03T,a1921680_120___04T,a1921680_120___05T,a1921680_120___11H)  SELECT '2011-12-21 13:40:53',1650,1050,1180,1010,17000,4700 [/B]
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=16,5; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=16,5 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=10,5; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=10,5 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=11,8; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=11,8 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=10,1; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=10,1 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=17,1; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=17,1 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update sValue=48; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:46:05 |	 xapmcsDatabase Debug ReadMessage Update2 sValue=48 
                               21/12/2011 13:47:07 |	 xapmcsDatabase Debug ReadMessage Update sValue=21/12/2011 13:36:07; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:48:07 |	 xapmcsDatabase Debug ReadMessage Update sValue=21/12/2011 13:48:08; sDisplay=Unknown; Stip=Unknown; Make=0 
                               21/12/2011 13:50:53 |	 xapmcsDatabase Debug Log Analog INSERT INTO tblPeriodic (SampleDate,a1921680_120___01T,a1921680_120___02T,a1921680_120___03T,a1921680_120___04T,a1921680_120___05T,a1921680_120___11H)  SELECT '2011-12-21 13:50:53',1650,1050,1180,1010,1710,4800
                              what is written in mysql DB:

                              Code:
                              "6";"2011-12-21 13:30:53";"1650";"1050";"1180";"1010";"17000";"4700"
                              "7";"2011-12-21 13:40:53";"1650";"1050";"1180";"1010";"1710";"4800"
                              "8";"2011-12-21 13:50:53";"1650";"1050";"1180";"1020";"17000";"4800"
                              Seems data xapmcsdatabase is not writing correctly the value ?

                              All the debug files and cleaned ones are in zip attached.

                              Any help will be much appreciated !

                              Thomas
                              Attached Files

                              Comment


                                #60
                                With the xAP Message Viewer determine if 17,0 or 17.0 is being sent by xapmcsWebControl in the xapbsc messages. I suspect xapmcsWebControl is not converting the .0 correctly. I believe I found the issue and updated xapmcsWebControl 1.0.2.4. I also updated xapmcs1Wire to handle the 24 hour clock for Today/Tomorrow time formatting.
                                Last edited by Michael McSharry; December 21, 2011, 01:42 PM.

                                Comment

                                Working...
                                X