Announcement

Collapse
No announcement yet.

Problem with input

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

    Problem with input

    I have done a setup with a SR501 PIR on a NodeMCU. It all connects fine, but it doesn't recognize any changes.

    I know that the setup do work, since I have tested it with another sketch outside of HS.

    Anyone have a clue ?

    #2
    Originally posted by Xian View Post
    I have done a setup with a SR501 PIR on a NodeMCU. It all connects fine, but it doesn't recognize any changes.

    I know that the setup do work, since I have tested it with another sketch outside of HS.

    Anyone have a clue ?
    Are you using the API or normal sketch?
    what pin is it connected to?
    Have you seen THIS
    The more info you give us the easier it will be to find the fault.

    Greig.
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


      #3
      I have used the D1 for the input of the sensor and D7 for the output to LED. I use the normal sketch.

      I saw that post with the inputs. I have used the drop down menu in the config to set the pins.

      This is the wiring I have. http://www.instructables.com/id/IoT-...MCU-and-BLYNK/

      I have also tested the sketch, which works


      Sent from my iPhone using Tapatalk

      Comment


        #4
        is it the input, output or both that is not working?

        what is in the log?

        Greig.
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


          #5
          It's the input


          Sent from my iPhone using Tapatalk

          Comment


            #6
            There are only some keep alive messages in the log


            Sent from my iPhone using Tapatalk

            Comment


              #7
              Have you tried a different pin?

              Send me a debug log of you triggering the input and output as this might help track it down.

              Greig.
              Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
              X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
              Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
              Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
              Scripts =
              Various

              Comment


                #8
                Where di I find the debug log...

                Comment


                  #9
                  Originally posted by Xian View Post
                  Where di I find the debug log...
                  on the plugin config page there is a tick box to enable the debug log. Then try and trigger the input and output. Then go back und uncheck the debug tick box and this will generate a download link on the page. Click on it to get the file and send it to me.

                  Greig.
                  Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                  X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                  Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                  Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                  Scripts =
                  Various

                  Comment


                    #10
                    It's Attached....

                    If I go the API way, is it possible to Write all the codes myself ?
                    Attached Files

                    Comment


                      #11
                      Originally posted by Xian View Post
                      It's Attached....

                      If I go the API way, is it possible to Write all the codes myself ?
                      Yes. As a matter of fact, you have to.

                      I'm assuming you are familiar with an arduino sketch format. With the API version, imagine you have an empty setup (HSSetup) and loop (HSLoop) and you have to fill in the appropriate things for what you are wanting to do. That might involve including some libraries depending on what you need.

                      In your loop, you now have two new commands which allow you to read or write to the HS3 devices.

                      Actually pretty straight forward when you get your head around it.

                      Here is my explaination as simple as I can think of.

                      Code:
                      //  Start of API sketch. This is just to illustrate the API sketch structure.
                      
                      // Add any libraries you might need here
                      
                      void HSSetup() {
                        
                        //************************
                        //Add YOUR SETUP HERE;
                        //************************
                      }
                      
                      void HSloop() {
                          //************************
                          //Add YOUR CODE HERE;
                          //************************
                          /* To Send Data to Homeseer use SendToHS(Device,Value)
                           Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send
                           To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
                           Eg.. FromHS[5] would be the data from API Output device 5
                           All code that is located just below this block will execute regardless of connection status!
                           You can include SendToHS() calls, however when there isn't an active connection, it will just return and continue.
                           If you only want code to execute when HomeSeer is connected, put it inside the if statement below.
                           */
                      }
                      
                      void setup() {
                      
                      HSSetup();
                      
                      }
                      
                      void loop() {
                      
                      HSLoop();
                      
                      }
                      
                      // End of API sketch

                      Comment


                        #12
                        I have tested a little bit more, it works when I use an Uno Board, but not when I use a NodeMCU. Tried both version 0.9 and version 1.0
                        Last edited by Xian; June 11, 2017, 06:39 AM.

                        Comment


                          #13
                          Originally posted by logbuilder View Post
                          Yes. As a matter of fact, you have to.

                          I'm assuming you are familiar with an arduino sketch format. With the API version, imagine you have an empty setup (HSSetup) and loop (HSLoop) and you have to fill in the appropriate things for what you are wanting to do. That might involve including some libraries depending on what you need.

                          In your loop, you now have two new commands which allow you to read or write to the HS3 devices.

                          Actually pretty straight forward when you get your head around it.

                          Here is my explaination as simple as I can think of.

                          Code:
                          //  Start of API sketch. This is just to illustrate the API sketch structure.
                          
                          // Add any libraries you might need here
                          
                          void HSSetup() {
                            
                            //************************
                            //Add YOUR SETUP HERE;
                            //************************
                          }
                          
                          void HSloop() {
                              //************************
                              //Add YOUR CODE HERE;
                              //************************
                              /* To Send Data to Homeseer use SendToHS(Device,Value)
                               Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send
                               To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
                               Eg.. FromHS[5] would be the data from API Output device 5
                               All code that is located just below this block will execute regardless of connection status!
                               You can include SendToHS() calls, however when there isn't an active connection, it will just return and continue.
                               If you only want code to execute when HomeSeer is connected, put it inside the if statement below.
                               */
                          }
                          
                          void setup() {
                          
                          HSSetup();
                          
                          }
                          
                          void loop() {
                          
                          HSLoop();
                          
                          }
                          
                          // End of API sketch
                          I tried the API too, but still no reaction
                          Last edited by Xian; June 11, 2017, 09:09 AM. Reason: dd

                          Comment


                            #14
                            OK looking at your log you have the device set to be an Arduino and not a NodeMCU and I am a little confused as V139 which you are running has no support for the NodeMCU API as this was added in V140.
                            You also have this connection with serial which I also dont understand as this is a wifi based board and is to connect to your network.

                            Greig.
                            Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                            X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                            Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                            Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                            Scripts =
                            Various

                            Comment


                              #15
                              I did have the .139 and tried the NodeMCU (not API), without luck, upgraded to .140 which have the API version to.

                              AFter a little bit of troubling with this to, I manage to get it work.

                              Comment

                              Working...
                              X