No announcement yet.

Can't connect to local API, getting Newtonsoft.Json related error

  • Filter
  • Time
  • Show
Clear All
new posts

    Can't connect to local API, getting Newtonsoft.Json related error

    I am new to Homeseer, another ex Vera user who got frustrated at the stability. Having Imperihome available helped sway my decision as the main interface will stay the same.

    Having frustrating issues with the initial connection and getting
    Error Invalid response from API

    Can connect to URL from device, and get blank screen.

    My Environment:
    HomeSeer Version: HS3 Standard Edition (Linux) (on Ubuntu 16.04)
    ImperiHome plugin version
    ImperiHome v4.0.7

    Setup "log to file" at Trace level, and getting the following error, when I try to do initial connection:

    Apr-11 17:00:40 INFO ImperiHome version
    Apr-11 17:00:41 DEBUG Start building cache
    Apr-11 17:00:41 DEBUG HS ISS server started:
    Apr-11 17:00:42 DEBUG End building cache
    Apr-11 17:01:33 TRACE ISSServer Request: /issapi/system
    Apr-11 17:01:33 ERROR System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
    File name: 'System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    at Newtonsoft.Json.JsonSerializer.GetMatchingConverter (IList`1 converters, System.Type objectType) <0x40322910 + 0x00054> in <filename unknown>:0
    at Newtonsoft.Json.Serialization.DefaultContractResolver.Initia lizeContract (Newtonsoft.Json.Serialization.JsonContract contract) <0x40321c80 + 0x00157> in <filename unknown>:0
    at Newtonsoft.Json.Serialization.DefaultContractResolver.Create ObjectContract (System.Type objectType) <0x40320fc0 + 0x0006b> in <filename unknown>:0
    at Newtonsoft.Json.Serialization.DefaultContractResolver.Create Contract (System.Type objectType) <0x4031b370 + 0x0028f> in <filename unknown>:0
    at Newtonsoft.Json.Serialization.DefaultContractResolver.Resolv eContract (System.Type type) <0x4031b000 + 0x00144> in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.G etContractSafe (System.Object value) <0x4031aec0 + 0x00042> in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.S erialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) <0x4031ac00 + 0x000e7> in <filename unknown>:0
    at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) <0x4031a150 + 0x005df> in <filename unknown>:0
    at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) <0x4031a120 + 0x00020> in <filename unknown>:0
    at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) <0x40315a40 + 0x00113> in <filename unknown>:0
    at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) <0x40314430 + 0x0002f> in <filename unknown>:0
    at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value) <0x40314350 + 0x00013> in <filename unknown>:0
    at HSPI_ImperiHome.ISSServer.HandleRequest (System.String absolutePath) <0x40313d30 + 0x000cb> in <filename unknown>:0
    Apr-11 17:02:41 DEBUG Device 772 value changed from 11.068 to 11.093

    When I ssh onto server, I find the following Newtonsoft.Json.dll files.

    root@homeseer1:/opt/HomeSeer# find . | grep -i Newtonsoft.Json

    Any thing I should try here ? Have reinstalled plugin multiple times. Tried custom http server, disabled firewalls, multiple iOS and Android devices.
    I had this working on the hs3-pi version with no issue while I was evaluating, but moved to HS3 Full, when I setup permanently.


    try to install mono-complete
    sudo apt-get install mono-complete


      Problem fixed

      Thanks that fixed the problem for me, and can now connect locally and remotely.

      When I installed HS3 on Linux, I was following the guide here:

      It includes info about installing some mono modules but not mono-complete.
      You might want to add it to the ImperiHome plugin install info.