Announcement

Collapse
No announcement yet.

Remote RaspberryIO not working

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

    Remote RaspberryIO not working

    I installed RaspberryIO plugin on my RasPi3, following all instructions. It does show up in 'Remote Plug-Ins' section in my HS3, saying ok and showing correct IP address.

    I configure all pins to 'output', but when I change the state in HS - the pin states don't become 'hi' on Raspi.

    I tested GPIO with RPi.GPIO - all works.

    I also noticed that 'Toggle' option works only when output is 'on' - so it goes 'off'. But when it's 'off' - toggle doesn't do anything.

    So, what's wrong? Please help...
    Last edited by alexbk66; July 11, 2017, 09:25 AM.

    #2
    I can't offer any help but to say the plugin developer is on vacation until tomorrow. So you may not receive a response today. I'm sure he will respond quickly once he can.

    Sent from my Pixel XL using Tapatalk

    Comment


      #3
      Originally posted by alexbk66 View Post
      I installed RaspberryIO plugin on my RasPi3, following all instructions. It does show up in 'Remote Plug-Ins' section in my HS3, saying ok and showing correct IP address.

      I configure all pins to 'output', but when I change the state in HS - the pin states don't become 'hi' on Raspi.

      I tested GPIO with RPi.GPIO - all works.

      I also noticed that 'Toggle' option works only when output is 'on' - so it goes 'off'. But when it's 'off' - toggle doesn't do anything.

      So, what's wrong? Please help...
      how do you test the pin state?
      do you run the plug-in using "sudo"
      when you say "'Toggle' option works only when output is 'on'" does the pin actually become lo when you do that?

      please set the log level to Debug, restart the plug-in, and post the debug logs of your tests.

      Comment


        #4
        Originally posted by spud View Post
        how do you test the pin state?
        With multimeter
        Originally posted by spud View Post
        do you run the plug-in using "sudo"
        Not sure, it's starting automatically using run.sh
        Originally posted by spud View Post
        when you say "'Toggle' option works only when output is 'on'" does the pin actually become lo when you do that?
        No, only in GUI, the pins are always '0'
        Originally posted by spud View Post
        please set the log level to Debug, restart the plug-in, and post the debug logs of your tests.
        How do I set log level to Debug? In HS server the plugin isn't enabled, do I set Debug mode on RasPi?

        I filtered the current HS log, file attached. I noticed there are some errors sometimes, but after rebooting RasPi they go away and it seems like there's no errors.
        Attached Files
        Last edited by alexbk66; July 13, 2017, 03:35 AM.

        Comment


          #5
          you need to start the run.sh script as root, as shown in the user guide:

          Code:
          sudo ./run.sh
          I think this is the cause of the error you see in the logs and the cause of your problem.

          To set the log level to debug, go to the config page for your remote instance, there is a dropdown list at the bottom of it.

          Comment


            #6
            Thank you @spud
            I do run as su (in /etc/rc.local):
            Code:
            sudo /home/pi/RaspberryIO/run.sh &
            I set event toggling all outputs every 5 seconds, after enabling debug I get (on RasPi side):
            Code:
            Jul-13 18:40:46 DEBUG Pin17 value changed to Off
            Jul-13 18:40:46 DEBUG Toggling Pin18
            Jul-13 18:40:46 DEBUG Pin18 value changed to On
            Jul-13 18:40:46 DEBUG Setting Pin18 to Off
            Jul-13 18:40:46 DEBUG Pin18 value changed to Off
            Jul-13 18:40:46 DEBUG Toggling Pin22
            First suggestion would be that RasPi is faulty, but from Python it does work.
            Two other possibilities:
            1. I have RaZberry hut installed, could be interfering somehow, I'll test removing the card
            2. The plugin was installed on RasPi more then 30 days ago, but I had to rebuild my Windows machine, so now in plugin management page it says "26 days left", not sure if on RasPi side it has its own check? Wouldn't want to pay for plugin until it's working...

            Comment


              #7
              I tried another Jessie image (without ZWay) I get:
              Code:
              Plugin: RaspberryIO Instance: MyRasperry starting...
              Connecting to server at 192.168.0.15...
              Connection attempt #1
              Connected (HomeSeer API 3). Waiting to be initialized...
              Jul-13 19:30:20 INFO RaspberryIO version 3.0.0.8
              Jul-13 19:30:25 INFO Raspberry Pi running on Bcm2835 processor
              Jul-13 19:30:25 INFO Firmware rev10625154, board model B3 (Raspberry Pi 3 Model B)
              Jul-13 19:30:25 INFO Serial number: 000000008c00bd0f
              Jul-13 19:30:25 ERROR Raspberry.IO.Interop.MemoryMapFailedException: Exception of type 'Raspberry.IO.Interop.MemoryMapFailedException' was thrown.
                at Raspberry.IO.Interop.MemoryMap.ThrowOnError[TException] (IntPtr result) <0x72436360 + 0x0003c> in <filename unknown>:0 
                at Raspberry.IO.Interop.MemoryMap.Create (IntPtr address, UInt32 size, MemoryProtection protection, MemoryFlags memoryflags, Int32 fileDescriptor, UInt32 offset) <0x72436100 + 0x000a3> in <filename unknown>:0 
                at Raspberry.IO.GeneralPurpose.GpioConnectionDriver..ctor () <0x724357c0 + 0x0010f> in <filename unknown>:0 
                at Raspberry.IO.GeneralPurpose.GpioConnectionSettings.GetBestDriver (GpioConnectionDriverCapabilities capabilities) <0x724353e8 + 0x00037> in <filename unknown>:0 
                at Raspberry.IO.GeneralPurpose.GpioConnectionSettings.get_DefaultDriver () <0x72435140 + 0x000c7> in <filename unknown>:0 
                at Raspberry.IO.GeneralPurpose.GpioConnectionSettings..ctor () <0x72435018 + 0x0000f> in <filename unknown>:0 
                at Raspberry.IO.GeneralPurpose.GpioConnection..ctor (Raspberry.IO.GeneralPurpose.GpioConnectionSettings settings, IEnumerable`1 pins) <0x724345a0 + 0x000b7> in <filename unknown>:0 
                at Raspberry.IO.GeneralPurpose.GpioConnection..ctor (IEnumerable`1 pins) <0x72434460 + 0x0001f> in <filename unknown>:0 
                at HSPI_RaspberryIO.RaspberryPiApp.<Init>b__49_0 () <0x72ff2b48 + 0x002eb> in <filename unknown>:0

              Comment


                #8
                I think this is a bug introduced in version 3.0.0.8, I fixed it in version 3.0.0.9.
                Please test this version and let me know. Thanks!

                Comment


                  #9
                  Originally posted by spud View Post
                  I think this is a bug introduced in version 3.0.0.8, I fixed it in version 3.0.0.9.
                  Please test this version and let me know. Thanks!
                  Thank you, I'll try. I'm installing new Jessie image now just in case.

                  [EDIT] - Where do I install it - Windows HS or RasPi?

                  Comment


                    #10
                    Flashed new Raspbian image, installed 3.0.0.9 on both Windows HS and RasPi, same result - all looks good:
                    Code:
                    ul-14 02:26:46 DEBUG Pin8 value changed to On
                    Jul-14 02:26:46 DEBUG Setting Pin8 to Off
                    Jul-14 02:26:46 DEBUG Pin8 value changed to Off
                    Jul-14 02:26:46 DEBUG Toggling Pin9
                    Jul-14 02:26:46 DEBUG Pin9 value changed to On
                    Jul-14 02:26:46 DEBUG Setting Pin9 to Off
                    Jul-14 02:26:46 DEBUG Pin9 value changed to Off
                    But pins don't change

                    Comment


                      #11
                      Actually, looking at log - looks like pins are always set to OFF when toggling:
                      pi@pi:~/RaspberryIO $ cat log.txt | grep Pin9
                      Code:
                      Jul-14 02:21:05 DEBUG Setting direction to Output for Pin9
                      Jul-14 02:21:05 DEBUG Setting Reversed flag to False for Pin9
                      Jul-14 02:21:05 DEBUG Pin9 value changed to Off
                      Jul-14 02:21:05 DEBUG Setting pulse duration to 1000ms for Pin9
                      Jul-14 02:21:07 DEBUG Toggling Pin9
                      Jul-14 02:21:07 DEBUG Pin9 value changed to On
                      Jul-14 02:21:07 DEBUG Setting Pin9 to Off
                      Jul-14 02:21:07 DEBUG Pin9 value changed to Off
                      Jul-14 02:21:11 DEBUG Toggling Pin9
                      Jul-14 02:21:11 DEBUG Pin9 value changed to On
                      Jul-14 02:21:11 DEBUG Setting Pin9 to Off
                      Jul-14 02:21:11 DEBUG Pin9 value changed to Off
                      Jul-14 02:21:16 DEBUG Toggling Pin9
                      Jul-14 02:21:16 DEBUG Pin9 value changed to On
                      Jul-14 02:21:16 DEBUG Setting Pin9 to Off
                      Jul-14 02:21:16 DEBUG Pin9 value changed to Off
                      Jul-14 02:21:22 DEBUG Toggling Pin9
                      Jul-14 02:21:22 DEBUG Pin9 value changed to On
                      Jul-14 02:21:22 DEBUG Setting Pin9 to Off
                      Jul-14 02:21:22 DEBUG Pin9 value changed to Off

                      Comment


                        #12
                        do you still get an error at startup?
                        please provide full logs from the startup of the plug-in, and test only with On/Off controls. Thanks

                        Comment


                          #13
                          Originally posted by spud View Post
                          do you still get an error at startup?
                          please provide full logs from the startup of the plug-in, and test only with On/Off controls. Thanks
                          No, the MemoryMapFailedException was caused by not using sudo, as you said before.
                          I'll do a clean test without using 'toggle' and report.
                          From my previous message it looks like when toggling - it reads current state first, which returns 'on', but in fact it is 'off'?

                          Comment


                            #14
                            Originally posted by spud View Post
                            please provide full logs from the startup of the plug-in, and test only with On/Off controls. Thanks
                            [EDIT]

                            Big update - it works! Not sure what's changed, may be using on/off instead of toggle. Not sure but it works.

                            Thank you everybody, especially @spud.

                            Buying the plugin now.
                            Last edited by alexbk66; July 14, 2017, 06:55 AM.

                            Comment


                              #15
                              Hi, I have the same exact issue, where can I find the update? I'm still showing version .8 as most up to date!

                              Comment

                              Working...
                              X