Announcement

Collapse
No announcement yet.

Licensed Plugin without internet

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Licensed Plugin without internet


    #2

    I don't believe there is an internet requirement for any Homeseer plugin. I suspect the issue lies with the hub. What do the logs say when it tries to connect to the hub?

    Comment


      #3

      Comment


        #4
        Welcome to the Homeseer forum pappitufo.

        Homeseer 3 by default using a dynamic DNS "call home" script whether you enable it or not.

        Thinking when you register a plugin it does touch the mothership at least once maybe?

        I never checked here.

        Thinking the ZNet device is configured for DHCP with DNS coming from the router / firewall. You can manually insert DNS servers in the ip configuration.

        For the plugin configuration use the IP of the device instead of the name (if you can) and see if that works for you. (just a guesstimate). You can also manually put in a dns entry / IP on your Linux mothership if you want.

        Note that the IP can change if it is configured for DHCP. (that is where you would statically assign a DHCP address to the device in question).

        Here mostly utilize static addressing for devices on the network and some static DHCP addressing and customized mac (spoofing or direct NIC firmware changes) addressing for monitoring Homeseer touch screens (and control). IE: shrank down the bit mask here to /25, arrange the static addressing accordingly (routers, switches, servers, appliances, touchscreens, et al) with a small DHCP scope on the top of the subnet. Keep a spreadsheet here of host addressing on my network.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

        HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

        Comment


          #5
          please use the local ip address of the hub in the plugin config page

          something like 192.168.1.12:25105

          the plugin will not do a dns lookup

          the plugin does not interact with the smarthome website or the internet or the insteon app
          Mark

          HS3 Pro 4.2.19.5
          Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
          Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
          Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

          Comment


            #6
            Hi Mark,

            That is exactly what I am using:

            172.29.49.50:25105

            I am not using any names to make any DNS resolutions. Just plain IP with the port number.

            However the plugin tries to resolve something, I dont know what. When it finds internet it resolves and the plugin communicates with the interface. When it does not, it says it can not communicate withe the interface.

            Comment


              #7
              can you enabled detailed logging on the plugin config page, and restart and then post the hs log snippet of the startup
              Mark

              HS3 Pro 4.2.19.5
              Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
              Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
              Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

              Comment


                #8
                I am not home now. But I will post when I get there. Meanwhile, here is part of the report I got today morning:

                Insteon Plug-in Error Log Generated 5/2/2017 7:33:27 AM
                -----------*Error Message*----------------
                Error: Error in Hub.GetResponseCallback: Error: NameResolutionFailure -- Details System.Net.WebException: Error: NameResolutionFailure
                at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) <0x72c3d718 + 0x00164> in <filename unknown>:0
                at Insteon.Support.Hub.SocketPortClass.GetResponseCallback (System.IAsyncResult AsynchronousResult) <0x72c40a90 + 0x00127> in <filename unknown>:0 -- 5/2/2017 7:33:27 AM
                --------*Initialization Log*--------------
                5/2/2017 7:33:17 AM - Host System: 172.29.49.51 (HomeTrollerZeeS2V2) 3.0.0.318
                5/2/2017 7:33:17 AM - Plugin HSPI_Insteon.exe version: 3.0.6.0
                5/2/2017 7:33:17 AM - Insteon Support library (Insteon.dll) version: 1.0.6.0
                5/2/2017 7:33:17 AM - RegisterCallback Completed
                5/2/2017 7:33:17 AM - Enter InitIO
                5/2/2017 7:33:17 AM - Enter InitPlugin
                5/2/2017 7:33:17 AM - Global initialization of plug-in required, starting up.
                5/2/2017 7:33:17 AM - Initializing Insteon hardware interface...
                5/2/2017 7:33:17 AM - In ProcessRawReceiveThread
                5/2/2017 7:33:17 AM - Initializing Interface...
                5/2/2017 7:33:17 AM - In PLMBuffer_ProcessBufferThread
                5/2/2017 7:33:17 AM - Sending http://172.29.49.50:25105/1?XB=M=1
                5/2/2017 7:33:17 AM - Sending command 02 60 to Interface, (Expecting 6 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                5/2/2017 7:33:17 AM - Sending http://172.29.49.50:25105/3?0260=I=3

                Comment


                  #9
                  I wonder if this has to do with mono implementation of the HttpWebRequest and HttpWebResponse classes that I use.

                  is there any way you can delay the startup of hs until you know Linux has internet access?
                  Mark

                  HS3 Pro 4.2.19.5
                  Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
                  Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
                  Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

                  Comment


                    #10
                    Googling it appears to be a mono bug (maybe relating to a wireless connection?)

                    System.Net.WebException Error: NameResolutionFailure

                    There seems to be a bug in Xamarin Cycle 7.


                    From forum posts....

                    My problem solved by this code:

                    Code:
                    var client = new HxxpClient {
                    BaseAddress = new Uri("hxxp://1.2.3.4"),
                    DefaultRequestHeaders = { Host = "example.com" }
                    };
                    The error seems to be occurring when I create multiple instance of HttpClient. What worked for me was to use HttpClient in a singleton pattern. And then called it wherever I needed throughout my application....and finally solved by this........

                    Code:
                    public sealed class HttpClientInstance
                    {
                    private static readonly HttpClient HttpClient;
                    static HttpClientInstance() { HttpClient = new HttpClient(); }
                    public static HttpClient Instance
                    {
                    get
                    {
                    return HttpClient;
                    }
                    }
                    }
                    This is how I called it throughout my application.
                    ...
                    HttpClient client = HttpClientInstance.Instance;
                    - Pete

                    Auto mator
                    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                    Comment


                      #11
                      Ok Mark, yes, delaying the start of HS until linux has internet would solve the problem meanwhile. Maybe delaying the start of the plugin? Any ideas how to do this?

                      Pete, the box is connected using ethernet cable. But I remember that using Wi-Fi I had the same problem.

                      Comment


                        #12
                        does anyone know what mono is trying to resolve via dns? maybe a local host file would resolve this issue
                        Mark

                        HS3 Pro 4.2.19.5
                        Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
                        Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
                        Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

                        Comment


                          #13
                          I have done local (another computer) host dns resolution for another issue non mono related on a RPi2 / Arm CPU; similar error.

                          Jessie and Ubuntu 16.04 do DNS resolution way different than earlier and tie it back to the loopback address.
                          I have HS3 running today on two boxes (arm and intel) and using only Ubuntu 16.04 64 bit (similiar a bit to Jessie).

                          I did put a pointer to the stunnel proxy name in the below files also pointing to the loopback address.

                          so here my /etc/hosts file looks like:

                          127.0.0.1 localhost
                          127.0.1.1 ICS-HS3Pro

                          /etc/resolve.conf looks like:

                          nameserver 127.0.1.1
                          search lan

                          under /etc/resolvconf there are multiple DNS resolution files and subdirectories.

                          One is interface order

                          under the resolv.conf.d there are three files: base, head and tail.

                          I have sometimes changed the head file stuff. It is typically blank.

                          Here also utilize PFSense and dns only comes from there (such that local and out of lan is cached any how).


                          Reading the above mono thread stuff (OP and following posts) indicate it to be a new glitch (bug) in mono and basically documented a bandaid.

                          Currently two HS3 based (arm and intel) boxes are at Mono....

                          # mono -V
                          Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
                          Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
                          TLS: __thread
                          SIGSEGV: altstack
                          Notifications: epoll
                          Architecture: amd64
                          Disabled: none
                          Misc: softdebug
                          LLVM: supported, not enabled.
                          GC: sgen

                          Jessie box is at:

                          # mono -V
                          Mono JIT compiler version 4.8.1 (Stable 4.8.1.0/22a39d7 Wed Apr 12 12:47:01 UTC 2017)
                          Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
                          TLS: __thread
                          SIGSEGV: normal
                          Notifications: epoll
                          Architecture: armel,vfp+hard
                          Disabled: none
                          Misc: softdebug
                          LLVM: supported, not enabled.
                          GC: sgen

                          Personally maybe just updating Mono might work?

                          BTW the Zee HS3 OS IP stuff for static IPs (ip, mask et al) is wrong and doesn't work if you touch it. I have touched it and it changed the OS subnet mask et al such that I only make network changes in the core OS and not the HS3 GUI anymore (from way long time ago). The network stuff is not in the HS3 Pro gui. Maybe this is me? I did open a bugzilla ticket on this way long time ago (when Zee version one was introduced and I ran HS3 on the RPi).

                          [ATTACH]60968[/ATTACH]

                          eth1
                          Link encap:Ethernet HWaddr sh:ri:mp:to:fe:ee
                          inet addr:192.168.244.164
                          Bcast:192.168.244.255
                          Mask:255.255.255.128
                          Last edited by Pete; May 2, 2017, 04:21 PM.
                          - Pete

                          Auto mator
                          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                          Comment


                            #14
                            Regarding the static IP, it is right, the GUI does not work. HS should update the software, it is trying to write de IP data to the file /etc/network/Interfaces but it should write to the file /etc/dhcpcd.conf

                            I tried to manually edit the /etc/dhcpcd.conf file and it worked. Added:

                            interface eth0
                            static ip_address=172.29.49.51/24
                            static routers=172.29.49.1
                            static domain_name_servers=172.29.49.1
                            Last edited by papapitufo; May 2, 2017, 10:03 PM.

                            Comment


                              #15
                              Ok, I found the solution. What the plugin is trying to resolve is the reverse IP of the interface. For example, my hub has an IP of 172.29.49.50 so the plugin sends a request to the DNS server using the name 50.49.29.172.in-addr.arpa and expects to get in return the IP of the interface (172.29.49.50). I do not know why it does this but it does, maybe Mark has some thoughts.

                              So, if the plugin does not have access to the internet, it can not contact the DNS server, then it can not resolve the reverse IP, then it can not get the actual IP, so it says that it can not communicate with the interface.

                              The trick is to add the resolution for the reverse IP in the hosts table. In my example I add the following line to /etc/hosts

                              172.29.49.50 50.49.29.172.in-addr.arpa

                              Another thing is that the IP of the HomeTroller and the Hub MUST be statically assigned as I described in the previous post.

                              Comment

                              Working...
                              X