Announcement

Collapse
No announcement yet.

I think I am close but it's just not quite there.....

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

    I think I am close but it's just not quite there.....

    Installed the plug-in today from the HS3 updater. Got my HS code and token and believe I created two Withings authorization codes. (I got as far as a HS window with the address of "https://connected2.homeseer.com/WithingsWebHook?token=XXXXXXXXXXXXXXXXXX&code=YYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYY&state=HSPI_Withings" but I believe that is alright because Withings-users file was updated with these codes......)

    So now all that happens every hour on the hour is the creation of two (more) devices. Battery and Scale. For most of the day it did not update the device. Starting at 7pm tonight, the new Battery device was created with and updated with what I think is the battery status? Additionally, in the log there is an error. I can't make heads or tails of it. How close am I? How do I get past this?
    Mar-08 20:00:23 Starting Plug-In Plugin Withings started successfully in 2973 milliseconds
    Mar-08 20:00:23 Withings ERROR Exception CheckAndCreateDevices(): Newtonsoft.Json.JsonReaderException: JSON integer 2557521700 is too large or small for an Int32. Path 'body.measuregrps[0].grpid', line 1, position 108. at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition) at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType) at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType) at Newtonsoft.Json.JsonTextReader.ReadAsInt32() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.P opulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.P opulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.S etPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.P opulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.S etPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.P opulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.C reateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.D eserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReade r reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) at HSPI_Withings.Plugin.CheckAndCreateDevices()
    Mar-08 20:00:22 Withings Debug Created: 2173 Battery
    Mar-08 20:00:22 Withings Debug Created: 2172 Body+ Scale
    Mar-08 20:00:22 Withings Debug Refreshing Token for User:
    Mar-08 20:00:21 Withings Debug Refreshing Token for User: e25913ea066c570b6bed8c1a42c639eee3460daf
    Mar-08 20:00:21 Withings Debug Refreshing Token for User: 758bb773ebcae7b480d7897596513fd60df6fdbc
    Mar-08 20:00:20 Starting Plug-In Initializing plugin Withings ...
    Mar-08 20:00:20 Starting Plug-In Withings loaded in 15094 milliseconds
    Mar-08 20:00:05 Info Plugin Withings has connected. IP:127.0.0.1:61677
    Mar-08 20:00:04 Warning I/O interface Withings is down, executable is not running, restarting ...
    Mar-08 20:00:03 Info Plugin Withings with instance: has disconnected
    Mar-08 20:00:03 Withings Debug Refreshing Token for User: 5cc6cff30fe613b0ebc35d9d890f0bfa25f28f92
    Mar-08 19:49:49 Z-Wave 2 out of 2 Child devices of node 184 were created successfully.
    Click image for larger version  Name:	Withings1.jpg Views:	0 Size:	98.1 KB ID:	1461786
    .

    #2
    Ok, there is a value that is bigger than I expected (their documentation doesn't list value type, so it was a guess). I'll track it down and adjust it. That said, it should be recreating new devices every hour. I'll release a fix this week.

    Comment


      #3
      Originally posted by sirmeili View Post
      Ok, there is a value that is bigger than I expected .....
      TELL ME ABOUT IT! This scale is more accurate than the last one.... :-)

      Much appreciated! THANK YOU for the help!

      .

      Comment


        #4
        Just wanted to let you know, I installed the HS3 BETA version and I was able to create devices (only once!) and populate some of them. I am tweaking what I share between Apple Health and Withings to get some of the other devices to populate. The only MINOR issue I see is that I can not create the devices where I pointed them. It only goes to Withings Withings.
        .

        Comment


          #5
          Ok, so in the beta the group id is already set to long, so you shouldn't have that bug anymore. I'll look into the locations and see why it's not working.

          Note that I only look for changes going back 24 hours (due to who withings has their api set up), so if you have a device that has not had any readings in the last 24 hours they won't populate. Again this is because they force you to enter a time span and they don't offer any kind of "Give me all the last valid values you have" kind of end point.

          Comment


            #6
            Originally posted by sirmeili View Post
            Note that I only look for changes going back 24 hours (due to who withings has their api set up), so if you have a device that has not had any readings in the last 24 hours they won't populate. Again this is because they force you to enter a time span and they don't offer any kind of "Give me all the last valid values you have" kind of end point.
            That is VERY helpful info! Thanks!

            .

            Comment

            Working...
            X