Announcement

Collapse
No announcement yet.

Plugin keeps stopping...

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

    Plugin keeps stopping...

    Michael, thanks for creating and fixing the plugin. I was able to get it installed but when I enable it I get the same status error "Critical, plugin has disconnected" after a few minutes.

    Code:
     [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:04:04[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Starting Plug-In[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Initializing plugin mcsShelly ...[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:04:04[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Starting Plug-In[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]mcsShelly loaded in 15007 milliseconds[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:49[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Info[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Plugin mcsShelly has connected. IP:127.0.0.1:50074[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#D58000]Feb-10 19:03:49[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#D58000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#D58000]Warning[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#D58000]I/O interface mcsShelly is down, executable is not running, restarting ...[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:30[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Z-Wave[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Device: [COLOR=#000080]All Z-Wave kW Hours 2[/COLOR] Set to [COLOR=#008000]622.256 (622.256 kW Hours)[/COLOR][/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:30[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Z-Wave[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Device: [COLOR=#000080]All Z-Wave kW Hours 1[/COLOR] Set to [COLOR=#008000]335.271 (335.271 kW Hours)[/COLOR][/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:25[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Info[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Plugin mcsShelly with instance: has disconnected[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:20[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]mcsShelly[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]MQTTClient is Connected to broker at 127.0.0.1[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:19[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]mcsShelly[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Spawning Internal MQTT Broker[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:19[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Plug-In[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Finished initializing plug-in mcsShelly[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:19[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Starting Plug-In[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]mcsShelly loaded in 771 milliseconds[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:19[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Starting Plug-In[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Plugin mcsShelly started successfully in 451 milliseconds[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:19[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]mcsShelly[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Version 5.1.1.4 Registered with Homeseer[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    [TABLE="cellspacing: 0"]
    [TR]
    [TD="colspan: 1, align: left"][COLOR=#000000]Feb-10 19:03:19[/COLOR][/TD]
     			[TD="colspan: 1, align: left"][COLOR=#000000] [/COLOR][/TD]
     			[TD="colspan: 3, align: left"][COLOR=#000000]Starting Plug-In[/COLOR][/TD]
     			[TD="colspan: 8, align: left"][COLOR=#000000]Initializing plugin mcsShelly ...[/COLOR][/TD]
     		[/TR]
    [/TABLE]
    This cycle continues over and over until I disable the plugin. Any help would be greatly appreciated.

    #2
    Do you have a MQTT broker installed on the same computer as HS? It was an oversight I discovered with mcsMQTT. I put a check in for this as some other things in 5.1.1.5 which is available at http://mcsSprinklers.com/mcsShelly_5_1_1_5.zip. You will want HSPI_MCSSHELLY.exe into the HS folder and mcsMQTT_2020.dll into the \bin\mcsMQTT folder.

    I am bouncing around between HS3 and HS4 for my plugins now and finding things I want to change in the HS3 one as I am trying to keep things as close as possible between HS3 and HS4.

    If you enable the Developer mode checkbox on the Plugin page then there may be more information of failure in the console that is a popup. The error for multiple brokers showed in the console window.

    Comment


      #3
      I didn't have any MQTT brokers installed.

      I just installed mcsMQTT and got the same result.

      I'll try 5.1.1.5 when I get home.

      Just to confirm, mcsShelly does net require an external MQTT broker? Meaning I shouldn't have any other MQTT brokers plugged into Homeseer.

      Comment


        #4
        Confirming that no external broker is needed. Just need the plugin and Shelly device.

        If you are using mcsMQTT then you will not want to use mcsShelly. mcsMQTT will recognize all the Shelly devices. The only difference is the default configuration that is tailored to only Shelly devices in mcsShelly.

        There was another user who had issue with Linux install. I thought that was due to broker, but may be something else. Are you running Linux or Windows?

        I am traveling today and ran out of time to pursue matter related to triggers and actions. The most current version of mcsShelly and mcsMQTT are at http://mcsSprinklers.com/mcsShelly_5_1_1_6.zip and http://mcsSprinklers.com/mcsMQTT_5_1_1_6.zip. They share the same \bin\mcsMQTT\mcsMQTT_2020.dll from the zip. The HSPI_MCSSHELLY.exe goes in the HS folder. I will resume tomorrow.

        Comment


          #5
          Ok, I installed 5.1.1.6. It still didn't work. I'm going to wait till HS4 comes out and rebuild everything from a clean start.

          If I run into any problems at that point I'll post again.

          Thanks for the help.

          Comment


            #6
            I worked quite a-bit with this plugin and mcsMQTT plugin with Linux the last two days and found some thing at the startup that were different than Windows and failed in Mono. I put a version that worked well for me at http://mcsSprinklers.com/mcsShelly_5_1_1_7.zip. It would be nice if you can give it try to as a minimum confirm that the problems you were seeing are no longer present. Same two file and locations as prior post.

            Comment


              #7
              Looks like 5.1.1.7 is available via updater now.

              Comment


                #8
                Michael,

                I'm getting the same issue, the plugin starts and runs for a few minutes and then windows chucks the "HSPI_MCSSHELLY has stopped working" error. I am running mcsShelly 5.3.0.4 and HS3 Pro Edition 3.0.0.548.

                The HSLog shows:

                Calling HSEvent in plugin mcsShelly, Instance :Object reference not set to an instance of an object.

                Other than that, I can't find any other meaningful error messages to help me troubleshoot. Any help would be appreciated.

                Comment


                  #9
                  I understand what it happening. When using an internal broker a heartbeat message is used, but I forgot to include the heartbeat topic in the list of topics mcsShelly client is subscribing so after three minutes an abort/restart attempt is occurring. The restart is having an issue of port 1883 being released by the original internal broker so I am improving this logic. I will get an update today that addresses the primary and secondary issue.

                  Another way to deal with the issue is on the General Tab, Inbound Management section, Topic Discovery radio. Set it to the top option of discovering all MQTT topics. This will allow the heartbeat through.

                  Comment


                    #10
                    The update is at http://mcsSprinklers.com/mcsShelly_5_3_3_5.zip
                    Unzip HSPI_MCSSHELLY.exe into HS folder and mcsMQTT_2020.dll into \bin\mcsShelly folder

                    The silver lining is that the heartbeat failure recovery was a hidden issue and it got fixed at the same time.

                    Comment


                      #11
                      Michael,

                      Thank you for the quick response! I have the files updated and it appears stable. I'll report back if I encounter any other issues in the future.

                      Comment


                        #12
                        I am having this problem... plugin "down" and restarting every 3 minutes.
                        I am running HS3 but posting here since this topic is not in HS3 thread.
                        Just installed the plugin from the HS3 plugin installer for the first time today... it is successfully controlling a Shelly 1 relay.
                        Version 5.3.0.4 Registered with Homeseer
                        HomeSeer Version: HS3 Pro Edition 3.0.0.548
                        Operating System: Microsoft Windows 7 Home Premium - Work Station

                        I did the work-around you indicated above and this did stop the problem (10 minutes and still running): "Another way to deal with the issue is on the General Tab, Inbound Management section, Topic Discovery radio. Set it to the top option of discovering all MQTT topics. This will allow the heartbeat through."

                        However I suspect would be best to have more limited MQTT Inbound... This is the only MQTT device I have at present. Does ver 5.3.0.4 for HS3 have the fix you indicate above?

                        Comment


                          #13
                          The current version of mcsShelly is at http://mcsSprinklers.com/mcsShelly_5_5_1_4.zip. HSPI_MCSSHELLY.exe goes in HS3 folder. MCSMQTT_2020.dll goes in \bin\mcsShelly folder. The heartbeat issue has been resolved in all versions since 5.3.3.5.

                          I would not be concerned about inbound MQTT traffic. It is generally event based so does not put much load on the system.

                          Comment


                            #14
                            Thanks, Michael.
                            And thanks so much for this plugin!

                            Comment


                              #15
                              If you think you will have other devices that use MQTT protocol then I suggest you use mcsMQTT rather than mcsShelly. Both can accomplish the same thing with the Shelly devices but mcsMQTT can do more.

                              Comment

                              Working...
                              X