Announcement

Collapse
No announcement yet.

Temperature 1o times to high

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

    Temperature 1o times to high

    Hi Michael, I have several ESP8266 units with sensors mounted. They publish every minute the parameters. In the payload I can see the temperature presented correctly, if I look at the HS device this is 10 times higer in two cases, device 726 and 729. This only happens with the temperaure, the only parameter with a float value.
    Any idea how this is possible?
    ---
    Cor Click image for larger version  Name:	2020-04-18_123237.png Views:	0 Size:	86.5 KB ID:	1378793
    Attached Files

    #2
    In the logfile there are a number of these messages:

    Click image for larger version

Name:	2020-04-18_123956.png
Views:	63
Size:	8.7 KB
ID:	1378798
    ---
    Cor

    Comment


      #3
      I would further like to add that now all 4 temperatures are now 10 times to high. The device properties are the same now as shown below.

      Click image for larger version

Name:	2020-04-18_132019.png
Views:	61
Size:	26.6 KB
ID:	1378802
      ---
      Cor

      Comment


        #4
        You will notice that the data from the ESP8266 contains a period to separate the whole from the fractional part of the number. In your region the period does not serve this function but is only cosmetic for separation. What you want to do is replace the period with a comma. This can be done with either numeric expression or regular expression. The manual gives an example of using the regular expression explicitly for this purpose. I pasted a visual below that illustrates.

        Code:
         [h=3]4.1.8 Payload numbers contains periods for decimal.  I need them to be comma[/h] The Edit Tab has a section for Regular Expression processing of incoming Payloads prior to the Payload use within HS.  For this particular case the Regular Expression match pattern is escape period (i.e. “\.”) and the replace pattern is comma (i.e. “,”).
        Click image for larger version

Name:	Capture.PNG
Views:	67
Size:	13.1 KB
ID:	1378871

        Comment


          #5
          Thank you for the reply. Is it possible that it relates to version 5.2.4.9? I dit not have this issue before.
          It works fine now!
          ---
          Cor

          Comment


            #6
            I am not aware of anything that has changed in this area for a long time. It does seem reasonable to me that the expression is needed since the ESP8266 is reporting using a convention that is in variance with your local conventions.

            I also do not have visibility in HSTouch server to know why the log is being filled with warnings. I have never used HSTouch myself.

            Comment

            Working...
            X