Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Moisture reading inverse in Domoticz

Moisture reading inverse in Domoticz

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 3 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dzjrD dzjr

    Hello everyone here at MySensors,

    I have made a mysensors sketch to measure soil moisture in the garden, the sketch work properly, so it is not falling apart ;)

    Only the value in Domoticz is the opposite of what it really is.
    If I have the sensor loose on the desk I get 20cb as value (irrigation advise) and when I put the sensor in a glass of water I get 100cb (dangerously dry)

    is there a possibility to turn this into domoticz, or is the problem in the mysensors sketch?

    I read the value in this way:

     int moistureLevel11 = (1023 - analogRead(VOCHT_PUT_1_PIN))/ 10.23;
        if (moistureLevel11 != lastsoilValue11) {
        send (msg11.set(moistureLevel11));
        lastsoilValue11 = moistureLevel11;}
    
    

    And With: S_Moisture

    I Use Mysensors 2,3 and Domoticz Beta V4.10064

    thank you in advance

    dzjr

    mfalkviddM Offline
    mfalkviddM Offline
    mfalkvidd
    Mod
    wrote on last edited by
    #2

    @dzjr the debug log from the node would be useful to see which number is being sent.

    If the value needs to be inverted in the sketch, just remove this part:

    1023 - 
    
    dzjrD 1 Reply Last reply
    0
    • mfalkviddM mfalkvidd

      @dzjr the debug log from the node would be useful to see which number is being sent.

      If the value needs to be inverted in the sketch, just remove this part:

      1023 - 
      
      dzjrD Offline
      dzjrD Offline
      dzjr
      wrote on last edited by
      #3

      @mfalkvidd

      Thank Your for the reply,

      I removed the 1023 - And it looks bij now, i think that i have to tweak it to get te right value.

      The node i have combined in a gateway, do i get a good debug than with #my_debug ?

      mfalkviddM 1 Reply Last reply
      0
      • dzjrD dzjr

        @mfalkvidd

        Thank Your for the reply,

        I removed the 1023 - And it looks bij now, i think that i have to tweak it to get te right value.

        The node i have combined in a gateway, do i get a good debug than with #my_debug ?

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #4

        @dzjr MY_DEBUG should work fine

        dzjrD 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @dzjr MY_DEBUG should work fine

          dzjrD Offline
          dzjrD Offline
          dzjr
          wrote on last edited by
          #5

          @mfalkvidd

          This is the MyDebug output:

          0 MCO:BGN:INIT GW,CP=R-NGA---,VER=2.3.0
          3 MCO:BGN:BFR
          741 GWT:TIN:IP=192.168.0.145
          1744 MCO:BGN:STP
          1746 MCO:REG:NOT NEEDED
          1748 MCO:BGN:INIT OK,TSP=NA
          39316 GWT:TSA:ETH OK
          39375 GWT:RFC:MSG=0;0;3;0;2;
          39382 GWT:RFC:MSG=0;0;3;0;2;Get Version
          45932 GWT:RFC:MSG=0;0;3;0;18;PING
          55858 GWT:RFC:MSG=0;0;3;0;18;PING
          65783 GWT:RFC:MSG=0;0;3;0;18;PING
          75709 GWT:RFC:MSG=0;0;3;0;18;PING
          85635 GWT:RFC:MSG=0;0;3;0;18;PING
          95560 GWT:RFC:MSG=0;0;3;0;18;PING
          105486 GWT:RFC:MSG=0;0;3;0;18;PING
          115411 GWT:RFC:MSG=0;0;3;0;18;PING
          125337 GWT:RFC:MSG=0;0;3;0;18;PING
          

          i have edit the sketch to this:

          int moistureLevel11 = (analogRead(VOCHT_PUT_1_PIN)) / 5.8;
              if (moistureLevel11 != lastsoilValue11) {
              send (msg11.set(moistureLevel11));
              lastsoilValue11 = moistureLevel11;}
          
          

          i only have to adjust the " / 5.8 " for the right value in the ground.

          Thank you for helping!

          dzjr

          1 Reply Last reply
          1
          • gbuicoG Offline
            gbuicoG Offline
            gbuico
            wrote on last edited by
            #6

            @dzjr , glad you solved your problem .. but... can you please share which sensor are you using to measure the soil moisture?
            I found a lot of sensor suitable for in-house measuring but nothing for outside which is not becoming unusable very quickly.
            Whatever information is highly appreciated...

            Giacomo

            dzjrD 2 Replies Last reply
            0
            • dzjrD Offline
              dzjrD Offline
              dzjr
              wrote on last edited by
              #7

              @gbuico

              I use the soil humidity sensor with the external pcb.

              Only I find the measured range somewhat disappointing, I get when completely in water, not the measured value "saturated" it lingers on irrigation.

              so if you have a different solution, I am very much recommended.

              dzjr

              this sensor i use

              1 Reply Last reply
              0
              • gbuicoG gbuico

                @dzjr , glad you solved your problem .. but... can you please share which sensor are you using to measure the soil moisture?
                I found a lot of sensor suitable for in-house measuring but nothing for outside which is not becoming unusable very quickly.
                Whatever information is highly appreciated...

                Giacomo

                dzjrD Offline
                dzjrD Offline
                dzjr
                wrote on last edited by
                #8

                @gbuico

                the external pcb has been built in a housing together with the arduino and the relay board.
                I am controlling the sensor printing with a transistor circuit which I then make a measurement every 15 minutes.

                I have laid a cable between the PCB and the sensors.

                1 Reply Last reply
                0
                • gbuicoG Offline
                  gbuicoG Offline
                  gbuico
                  wrote on last edited by
                  #9

                  @dzjr this is what I also had in mind but... are you using a commercial sensor or you built one yourself?
                  When I say "sensor" I mean the device that is currently in the soil.
                  I checked different commercial sensor and all seem to become unusable in a very short time... this is why I'm really interested in your solution

                  dzjrD 1 Reply Last reply
                  0
                  • gbuicoG gbuico

                    @dzjr this is what I also had in mind but... are you using a commercial sensor or you built one yourself?
                    When I say "sensor" I mean the device that is currently in the soil.
                    I checked different commercial sensor and all seem to become unusable in a very short time... this is why I'm really interested in your solution

                    dzjrD Offline
                    dzjrD Offline
                    dzjr
                    wrote on last edited by
                    #10

                    @gbuico

                    I now use the commercial sensors from the above link.

                    Because the sketch I was still testing the sensors I only tried in a plant or loose on my desk with a glass of water.

                    For the control I make an output of the arduino high and use it to control the transistors.

                    I will try to post a photo tomorrow.

                    dzjr

                    1 Reply Last reply
                    0
                    • gbuicoG gbuico

                      @dzjr , glad you solved your problem .. but... can you please share which sensor are you using to measure the soil moisture?
                      I found a lot of sensor suitable for in-house measuring but nothing for outside which is not becoming unusable very quickly.
                      Whatever information is highly appreciated...

                      Giacomo

                      dzjrD Offline
                      dzjrD Offline
                      dzjr
                      wrote on last edited by
                      #11

                      @gbuico 2_1540402589263_IMG_20181023_103053.jpg 1_1540402589223_IMG_20181023_103032.jpg 0_1540402589194_IMG_20181023_103110.jpg

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      24

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular