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. Announcements
  3. 💬 Temperature Sensor

💬 Temperature Sensor

Scheduled Pinned Locked Moved Announcements
171 Posts 40 Posters 54.7k Views 36 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.
  • mfalkviddM mfalkvidd

    @toddsantoro see post 2 and 3 in this thread or read the instructions on the build page, just under the "Example" heading.

    toddsantoroT Offline
    toddsantoroT Offline
    toddsantoro
    wrote on last edited by toddsantoro
    #16

    @mfalkvidd OK. I have it compiling and uploaded to the nano. My config file looks like this now:

    sensor 6:
      -platform: onewire
        names:
          some_id: outside
          mount_dir: "/mnt/1wire"
    

    I get an error when I restart HASS on the Pi.

    ERROR (Thread-6) [homeassistant.components.sensor.onewire] No onewire sensor found. Check if dtoverlay=w1-gpio is in your /boot/config.txt. Check the mount_dir parameter if it's defined.
    

    I guess my question is do I need to define the mount_dir variable and if so is the one I have correct? And if it is correct do I need to create that directory on my Pi?

    I also do not get any output in the Arduino Serial Monitor window. Not sure if I even should...

    Thanks in advance for any help...

    mfalkviddM 1 Reply Last reply
    0
    • toddsantoroT toddsantoro

      @mfalkvidd OK. I have it compiling and uploaded to the nano. My config file looks like this now:

      sensor 6:
        -platform: onewire
          names:
            some_id: outside
            mount_dir: "/mnt/1wire"
      

      I get an error when I restart HASS on the Pi.

      ERROR (Thread-6) [homeassistant.components.sensor.onewire] No onewire sensor found. Check if dtoverlay=w1-gpio is in your /boot/config.txt. Check the mount_dir parameter if it's defined.
      

      I guess my question is do I need to define the mount_dir variable and if so is the one I have correct? And if it is correct do I need to create that directory on my Pi?

      I also do not get any output in the Arduino Serial Monitor window. Not sure if I even should...

      Thanks in advance for any help...

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

      @toddsantoro I am not familiar with homeassistant so I have no clue unfortunately.

      About debug output on the serial monitor: Debug needs to be enabled first. See instructions at https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help and https://www.mysensors.org/build/debug

      Debug output is often essential when troubleshooting.

      toddsantoroT 1 Reply Last reply
      1
      • mfalkviddM mfalkvidd

        @toddsantoro I am not familiar with homeassistant so I have no clue unfortunately.

        About debug output on the serial monitor: Debug needs to be enabled first. See instructions at https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help and https://www.mysensors.org/build/debug

        Debug output is often essential when troubleshooting.

        toddsantoroT Offline
        toddsantoroT Offline
        toddsantoro
        wrote on last edited by
        #18

        @mfalkvidd Thank you!!! I get this output in the serial monitor

        TSM:INIT
        TSM:RADIO:OK
        TSP:ASSIGNID:OK (ID=2)
        TSM:FPAR
        TSP:MSG:SEND 2-2-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
        TSM:FPAR
        TSP:MSG:SEND 2-2-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
        TSP:MSG:READ 0-0-2 s=255,c=3,t=8,pt=1,l=1,sg=0:0
        TSP:MSG:FPAR RES (ID=0, dist=0)
        TSP:MSG:PAR OK (ID=0, dist=1)
        TSM:FPAR:OK
        TSM:ID
        TSM:CHKID:OK (ID=2)
        TSM:UPL
        TSP:PING:SEND (dest=0)
        TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
        TSP:MSG:READ 0-0-2 s=255,c=3,t=25,pt=1,l=1,sg=0:1
        TSP:MSG:PONG RECV (hops=1)
        TSP:CHKUPL:OK
        TSM:UPL:OK
        TSM:READY
        TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
        TSP:MSG:SEND 2-2-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
        TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
        TSP:MSG:READ 0-0-2 s=255,c=3,t=6,pt=0,l=1,sg=0:I
        TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=ok:Temperature Sensor
        TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.1
        Request registration...
        TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
        TSP:MSG:READ 0-0-2 s=255,c=3,t=27,pt=1,l=1,sg=0:1
        Node registration=1
        Init complete, id=2, parent=0, distance=1, registration=1
        

        Does this look OK? If so I will ask my previous question on the Home Assistant forum. You have been a great help and once I get one of these things down I will be able to help others:)

        mfalkviddM 1 Reply Last reply
        1
        • toddsantoroT toddsantoro

          @mfalkvidd Thank you!!! I get this output in the serial monitor

          TSM:INIT
          TSM:RADIO:OK
          TSP:ASSIGNID:OK (ID=2)
          TSM:FPAR
          TSP:MSG:SEND 2-2-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
          TSM:FPAR
          TSP:MSG:SEND 2-2-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
          TSP:MSG:READ 0-0-2 s=255,c=3,t=8,pt=1,l=1,sg=0:0
          TSP:MSG:FPAR RES (ID=0, dist=0)
          TSP:MSG:PAR OK (ID=0, dist=1)
          TSM:FPAR:OK
          TSM:ID
          TSM:CHKID:OK (ID=2)
          TSM:UPL
          TSP:PING:SEND (dest=0)
          TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
          TSP:MSG:READ 0-0-2 s=255,c=3,t=25,pt=1,l=1,sg=0:1
          TSP:MSG:PONG RECV (hops=1)
          TSP:CHKUPL:OK
          TSM:UPL:OK
          TSM:READY
          TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
          TSP:MSG:SEND 2-2-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
          TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
          TSP:MSG:READ 0-0-2 s=255,c=3,t=6,pt=0,l=1,sg=0:I
          TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=ok:Temperature Sensor
          TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.1
          Request registration...
          TSP:MSG:SEND 2-2-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
          TSP:MSG:READ 0-0-2 s=255,c=3,t=27,pt=1,l=1,sg=0:1
          Node registration=1
          Init complete, id=2, parent=0, distance=1, registration=1
          

          Does this look OK? If so I will ask my previous question on the Home Assistant forum. You have been a great help and once I get one of these things down I will be able to help others:)

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

          @toddsantoro yes that looks good.

          The "st=ok:xyz" means message xyz was acknowledged by the destination node (in your case by the gateway)

          1 Reply Last reply
          1
          • S Offline
            S Offline
            stingone
            wrote on last edited by
            #20

            No compile error but i cant see anything on the serial monitor. also the temp sensor burend out with a 4k7 resistor :S

            remisR 1 Reply Last reply
            0
            • S stingone

              No compile error but i cant see anything on the serial monitor. also the temp sensor burend out with a 4k7 resistor :S

              remisR Offline
              remisR Offline
              remis
              wrote on last edited by
              #21

              @stingone
              Hi. The same issue for me . I solve it with : 38400 bauds configuration serial port ( instead of 115200 default value)
              and i lowering the RF power output with low_pa enable: it confirms that I have some issues with power suppply.

              good luck

              1 Reply Last reply
              1
              • bentrikB Offline
                bentrikB Offline
                bentrik
                wrote on last edited by bentrik
                #22

                It seems the DallasTempereture library is not a part of the default Library setup from Mysensors as of version 2.0? I tried to compile the above code, but I had to manually download DallasTemperature from GitHub first. Then OneWire was also missing. Adding these two libraries brought me a bit further, but I get a long list of errors connected to OneWire. What libraries should be used?

                mfalkviddM 1 Reply Last reply
                0
                • bentrikB bentrik

                  It seems the DallasTempereture library is not a part of the default Library setup from Mysensors as of version 2.0? I tried to compile the above code, but I had to manually download DallasTemperature from GitHub first. Then OneWire was also missing. Adding these two libraries brought me a bit further, but I get a long list of errors connected to OneWire. What libraries should be used?

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

                  @bentrik the library is part of the MySensorsArduinoExamples, which can be downloaded at https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip

                  bentrikB 1 Reply Last reply
                  1
                  • SealanderS Offline
                    SealanderS Offline
                    Sealander
                    wrote on last edited by Sealander
                    #24

                    Hi All, i'm also new here and into this. Like others i also ran into problems compiling this sketch, i tried al libraries mentioned in the posts in this thread, but no go. keep getting this error message:

                    In file included from C:\Users\Gebruiker\Desktop\My Sensors\MySensors-master\MySensorsArduinoExamples-master\examples\DallasTemperatureSensor\DallasTemperatureSensor.ino:37:0:

                    C:\Users\Gebruiker\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h: In function 'void loop()':

                    C:\Users\Gebruiker\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:252:13: error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private

                     int16_t millisToWaitForConversion(uint8_t);
                             ^
                    

                    DallasTemperatureSensor:85: error: within this context

                    int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());

                          exit status 1
                    

                    within this context

                    Can someone help me with this problem? i have no clue at all and woud really like to build me a working sensor so i can hook it up to my Domoticz setup. thanks

                    hin this context

                    S 1 Reply Last reply
                    0
                    • SealanderS Sealander

                      Hi All, i'm also new here and into this. Like others i also ran into problems compiling this sketch, i tried al libraries mentioned in the posts in this thread, but no go. keep getting this error message:

                      In file included from C:\Users\Gebruiker\Desktop\My Sensors\MySensors-master\MySensorsArduinoExamples-master\examples\DallasTemperatureSensor\DallasTemperatureSensor.ino:37:0:

                      C:\Users\Gebruiker\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h: In function 'void loop()':

                      C:\Users\Gebruiker\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:252:13: error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private

                       int16_t millisToWaitForConversion(uint8_t);
                               ^
                      

                      DallasTemperatureSensor:85: error: within this context

                      int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());

                            exit status 1
                      

                      within this context

                      Can someone help me with this problem? i have no clue at all and woud really like to build me a working sensor so i can hook it up to my Domoticz setup. thanks

                      hin this context

                      S Offline
                      S Offline
                      stingone
                      wrote on last edited by
                      #25

                      @Sealander

                      see solution above. Delete your dallas library and replace with the one above in the master zip file. That was the solution for me.

                      1 Reply Last reply
                      1
                      • mfalkviddM mfalkvidd

                        @bentrik the library is part of the MySensorsArduinoExamples, which can be downloaded at https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip

                        bentrikB Offline
                        bentrikB Offline
                        bentrik
                        wrote on last edited by bentrik
                        #26

                        @mfalkvidd Thanks for the feedback, It got me a bit further.
                        I have a fresh Windows Arduino 1.6.12 install, and I have download the MySensors Library 2.0 through the Library manager, and I've found MySensors.h and MyConfig.h under \Documents\Arduino\libraries\MySensors

                        I'm able to compile and upload the RelayActuator but quite a few of the library files seem to be missing in 2.0. DallasTemperature seem to be one of them.-But I struggled with DallasTemperature and some others.

                        I copied all the whole MySensors-1.5.4.zip library files to to C:\Program Files (x86)\Arduino\libraries, and I managed to compile, but I got an error message saying Invalid version found: 1.04
                        Then I tried to only copy the DallasTemperature and OneWire folder, and I had no errors.

                        -So I assume all library files the entire MySensors Examples catalouge are not ready in Libraries 2.0.

                        Anyways: The solution to get this sensor to work with Arduino 1.6.12, following the Download and API guide, adding MySensors 2.0 through the Library Manager, is to manually add:
                        \Arduino\libraries\DallasTemperature
                        \Arduino\libraries\OneWire\

                        -from https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip
                        -And not adding the whole structure.

                        Now I just have to find out how to make it speak to my serial gateway :satisfied:

                        1 Reply Last reply
                        0
                        • wendanW Offline
                          wendanW Offline
                          wendan
                          wrote on last edited by
                          #27

                          I get the feeling it is possible to use more then one sensor parallel on port 3. I wonder if each sensor is being monitored? Am I right and do I need to alter or change something?

                          1 Reply Last reply
                          0
                          • wendanW Offline
                            wendanW Offline
                            wendan
                            wrote on last edited by
                            #28

                            my feeling was right.... i just connected 5 temp censors it is working great

                            1 Reply Last reply
                            2
                            • J Offline
                              J Offline
                              Joseph Absher
                              wrote on last edited by Joseph Absher
                              #29

                              I am getting the error:

                              DallasTemperatureSensor.ino: In function 'void loop()':
                              DallasTemperatureSensor:93: error: 'getConfig' was not declared in this scope
                                   float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
                              

                              Does anyone have any suggestions?

                              mfalkviddM 1 Reply Last reply
                              0
                              • J Joseph Absher

                                I am getting the error:

                                DallasTemperatureSensor.ino: In function 'void loop()':
                                DallasTemperatureSensor:93: error: 'getConfig' was not declared in this scope
                                     float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
                                

                                Does anyone have any suggestions?

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

                                @Joseph-Absher https://forum.mysensors.org/topic/5841/getconfig-was-not-declared-in-this-scope-v2-1-1-fixed

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  Joseph Absher
                                  wrote on last edited by
                                  #31

                                  @mfalkvidd That worked. Thanks.

                                  1 Reply Last reply
                                  1
                                  • Vincent LgrdV Offline
                                    Vincent LgrdV Offline
                                    Vincent Lgrd
                                    wrote on last edited by
                                    #32

                                    Hello,
                                    I'm a beginner in home automation and I'm trying MySensor for the first time. My acctual configaration is a Domoticz on a Raspberry Pi 2B and a RFLink GW with a NRF24L01 module to try to measure with a MySensor probe.
                                    I've building a temperature sensor with a DS18B20 sensor on a Official Arduino nano board and I can not run the sensor correctly.
                                    The arduino serial monitor show these:

                                    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
                                    3 TSM:INIT
                                    4 TSF:WUR:MS=0
                                    11 TSM:INIT:TSP OK
                                    12 TSM:FPAR
                                    15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                    2022 !TSM:FPAR:NO REPLY
                                    2024 TSM:FPAR
                                    2026 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                    4034 !TSM:FPAR:NO REPLY
                                    4036 TSM:FPAR
                                    4038 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                    6046 !TSM:FPAR:NO REPLY
                                    6048 TSM:FPAR
                                    6050 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                    8058 !TSM:FPAR:FAIL
                                    8059 TSM:FAIL:CNT=1
                                    8061 TSM:FAIL:PDT

                                    Someone could help me?

                                    1 Reply Last reply
                                    0
                                    • gohanG Offline
                                      gohanG Offline
                                      gohan
                                      Mod
                                      wrote on last edited by
                                      #33

                                      Did you set node ID?

                                      1 Reply Last reply
                                      0
                                      • Vincent LgrdV Offline
                                        Vincent LgrdV Offline
                                        Vincent Lgrd
                                        wrote on last edited by
                                        #34

                                        Where should I put it? In arduino sensor code?

                                        1 Reply Last reply
                                        0
                                        • gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #35

                                          Yes, it's like #define MY_NODE_ID 2 and put it at beginning of the code

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


                                          10

                                          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