Announcement

Collapse
No announcement yet.

What's the story on conversion from string to decimal?

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

    What's the story on conversion from string to decimal?

    I still get this alot in the log when controlling my 3808 with the Denon plugin:

    1.06.2010 18:30:03 Event Running script statement immediately: &hs.plugin("DenonAVR").PwrOnAVR()
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.
    01.06.2010 18:30:03 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.

    01.06.2010 18:30:04 Event Waiting 0 minute(s) 12 second(s) 0 millisecond(s)
    01.06.2010 18:30:16 Event Running script statement immediately: &hs.plugin("DenonAVR").SetInputAVR("SAT")
    01.06.2010 18:30:16 DenonAVR Error Exception error in Parse_TFAN_Status(): Conversion from string "087.50" to type 'Decimal' is not valid.

    What can we do about this?


    The problem is that here we use a comma ( "," ) as a decimal separator so the casting from the string "87.5" doesn't give a value of 87,5...
    HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
    Running on Windows 10 (64) virtualized
    on ESXi (Fujitsu Primergy TX150 S8).
    WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

    Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

    #2
    I will try and look at it this weekend...most of the Radio stuff is still under R&D as the documentation states...but the routines that I've already coded, I will see if I can modify to except a comma as well.
    -Larry

    A member of "The HA Pioneer Group", MyWebSite

    Plugins:
    VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

    Hardware:
    Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

    Comment


      #3
      That would have been great, thanks!
      I don't like error messages in the log, especially since I don't think there's anything wrong.

      ... and I don't even use the radio.
      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
      Running on Windows 10 (64) virtualized
      on ESXi (Fujitsu Primergy TX150 S8).
      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

      Comment


        #4
        *BUMP* It's been two months...
        HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
        Running on Windows 10 (64) virtualized
        on ESXi (Fujitsu Primergy TX150 S8).
        WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

        Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

        Comment


          #5
          I have not had time to look at it yet...maybe this weekend.
          -Larry

          A member of "The HA Pioneer Group", MyWebSite

          Plugins:
          VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

          Hardware:
          Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

          Comment


            #6
            I wanted to let you know, that I've started work on a new version of the plug-in...the changes might be be pretty significant, as it looks more like a total re-write of the basic engine. Some of the choices I made before are limiting my capabilities now, so I started a new foundation to build on, hopefully this will make things a little easier.
            -Larry

            A member of "The HA Pioneer Group", MyWebSite

            Plugins:
            VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

            Hardware:
            Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

            Comment


              #7
              Wow, hope it is as promising as it sounds.
              HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
              Running on Windows 10 (64) virtualized
              on ESXi (Fujitsu Primergy TX150 S8).
              WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

              Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

              Comment


                #8
                Almost finished with new version...will need a few more days to re-work some scripting commands, and test new features...thanks for being patient.
                -Larry

                A member of "The HA Pioneer Group", MyWebSite

                Plugins:
                VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                Hardware:
                Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                Comment


                  #9
                  Woho!

                  If you haven't seen it already, here's some inspiration:
                  http://forums.homeseer.com/showthread.php?t=144172

                  HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                  Running on Windows 10 (64) virtualized
                  on ESXi (Fujitsu Primergy TX150 S8).
                  WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                  Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                  Comment


                    #10
                    I did add quite a few devices to the a status page, but not anything that elaborate as far as controls...wow...it does inspire me to research that capability though.
                    -Larry

                    A member of "The HA Pioneer Group", MyWebSite

                    Plugins:
                    VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                    Hardware:
                    Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                    Comment


                      #11
                      See Sticky...New version sent to updater.
                      -Larry

                      A member of "The HA Pioneer Group", MyWebSite

                      Plugins:
                      VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                      Hardware:
                      Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                      Comment


                        #12
                        Great! Looking forward to test it!
                        HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                        Running on Windows 10 (64) virtualized
                        on ESXi (Fujitsu Primergy TX150 S8).
                        WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                        Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                        Comment


                          #13
                          OK, I've updated. But I don't see any changes. Excpet that the page /denonavr_control does not load any more, and now I even get the this error when I'm trying to open the page: "Error Calling GenPage for plugin, link: /denonavr_control Error: Conversion from string "0087.50" to type 'Decimal' is not valid".



                          Version number is 2.2.1.17.
                          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                          Running on Windows 10 (64) virtualized
                          on ESXi (Fujitsu Primergy TX150 S8).
                          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                          Comment


                            #14
                            OK, this plugin seriously needs help!

                            11.10.2010 19:51:18 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "39.5" to type 'Double' is not valid.
                            11.10.2010 19:51:19 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "38.5" to type 'Double' is not valid.
                            11.10.2010 19:51:20 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "37.5" to type 'Double' is not valid.
                            11.10.2010 19:51:21 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "36.5" to type 'Double' is not valid.
                            11.10.2010 19:51:22 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "35.5" to type 'Double' is not valid.
                            11.10.2010 19:51:23 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "34.5" to type 'Double' is not valid.
                            11.10.2010 19:51:25 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "33.5" to type 'Double' is not valid.
                            11.10.2010 19:51:26 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "32.5" to type 'Double' is not valid.
                            11.10.2010 19:51:27 DenonAVR Error Exception error in Parse_MV_Status(): Conversion from string "31.5" to type 'Double' is not valid.


                            Seems to happen when I adjust the volume.(?)


                            Period is still not a decimal separator here in Europe!


                            Here's my new proposal:
                            Code:
                                Private Sub Test()
                                    Dim str As String = "70.5"
                                    Debug.WriteLine(str)
                            
                                    str = str.Replace(".", System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator)
                                    Debug.WriteLine(str)
                            
                                    Dim d As Double = str.ToString
                                    Debug.WriteLine(str)
                                End Sub
                            HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                            Running on Windows 10 (64) virtualized
                            on ESXi (Fujitsu Primergy TX150 S8).
                            WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                            Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                            Comment


                              #15
                              I will see what I can do.
                              -Larry

                              A member of "The HA Pioneer Group", MyWebSite

                              Plugins:
                              VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                              Hardware:
                              Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                              Comment

                              Working...
                              X