Announcement

Collapse
No announcement yet.

Json parsing errors

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

    Json parsing errors

    I am getting the following Json parsing and many times in the log. I am using version 2.0.2.4 and HS3 version 3.0.0.451. I used to not get these

    PHP Code:
    Jul-09 19:25:22           JowiHue     Error: (GetJsonCommand)::Error converting value "1" to type 'HSPI_JowiHue.State'Path 'scenes.4379442bb-on-0.lights[0]'line 1position 3319. 
    Also lately upon startup of the plugin I am getting and "Root element is missing" error and could not figure out which device or file might be out of sync or other root reason.

    PHP Code:
    7/9/2018 7:22:41 PM ~!~JowiHue~!~Importing lampTypes
    7
    /9/2018 7:22:41 PM ~!~JowiHue~!~ErrorRoot element is missing
    What could be causing these and how to resolve them? Thanks

    #2
    FYI, I noticed since that 2.0.2.5 is available. I upgraded to this version and no errors since though have not restarted the whole server and HS3 at this point.

    Comment


      #3
      Actually this one still popups up

      PHP Code:
      Jul-09 21:24:40           JowiHue     ErrorRoot element is missing.
      Jul-09 21:24:40           JowiHue     Importing lampTypes 

      Comment


        #4
        pcp,

        The error you are looking at is the plugin trying to read the JowiHueImports.xml, located in the config directory. Important especially when using the deCONZ gateway. Somehow it cannot read the root element. Checked here, but in the installation the file is complete.

        Any chance the file is damaged in your installation? Is it protected, do you have special language settings maybe, could it be an Linux issue maybe?

        Wim
        -- Wim

        Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

        1210 devices/features ---- 392 events ----- 40 scripts

        Comment


          #5
          There was a JowiHueImports.xml (all lowercase) and it was empty! There was and other file with the extension old at the end with correct XML. Copying this file with the old extension to JowiHueImports.xml resolve the issue when I restarted the plugin. Thanks.

          Comment


            #6
            The problem is still occuring but could not figure out why. On multiple occasions, the JowiHueImports.xml in the Config folder is overwritten with an empty file with the filename all in lower case. When I rename my backup file JowiHueImports.xml to the active one, all is fine, but then as said at some point it gets overwritten. I am not sure what and when this file is overwritten.

            Is there something else that should be refreshed or updated?

            Comment


              #7
              pcp,

              Normally the xml file is read by the plugin (you can find that moment in the HS3 log, it should happen between 0 and 30 minutes after placing the file) and renamed to *.old by the plugin. So once it has been imported it should just 'disappear' as xml file. I wonder why in your case an empty file is created? Checked here another time, but I do not get the empty file. Wonder what could be happening...

              Wim
              -- Wim

              Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

              1210 devices/features ---- 392 events ----- 40 scripts

              Comment


                #8
                Was this issue ever resolved and if so how? I'm getting the same messages in the log and see both files in the config folder with the current one being empty and the ".old" holding the xml.

                Comment


                  #9
                  Still the same issue for me. Each time I restart - if i don’t forget - I rename a xml back to not run itno this issue.

                  Comment


                    #10
                    pcp,

                    I have no clue what is making this happen for you. I received no other complaints on the issue. Maybe you can send me a trace including the start? Then maybe I can see what might be blocking this for you. From the plugin the file just gets deleted. In your case it seems to be emptied instead. Why this happens beats me. As your file systems does not allow files to be deleted....

                    For a correct trace, with running plugin set detailed trace and trace to log to on at the confitration page/trace options tab.
                    Then restart the plugin (after the rename for the xml file). Then let it run until the file is imported (let it run for 5 minutes more).
                    Save the file JowiHue.log from the logs directory, name it like firstrun.log
                    Then restart the plugin again (without renaming the XML file) and after you see the error occur, save the log again.

                    Please send both log files to w dot vuyk at upcmail dot nl?

                    Thanks,

                    Wim
                    -- Wim

                    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                    1210 devices/features ---- 392 events ----- 40 scripts

                    Comment


                      #11
                      Oops missed this update and looks like i still don’t get emAil updtates from forum. Yes of course i can collect a trace / debug later this week.

                      Comment


                        #12
                        Actually I just noticed I'm getting the same json error.

                        Code:
                        Error: (GetJsonCommand)::Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'HSPI_JowiHue.Hue+BridgeConfig' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path '', line 1, position 1.
                        I'm not using the Hue bridge (no devices) and everything is in deCONZ curently. I have not looked at the contents of the file yet.

                        Comment


                          #13
                          Originally posted by pcp View Post
                          Oops missed this update and looks like i still don’t get emAil updtates from forum. Yes of course i can collect a trace / debug later this week.
                          I had to replace my mail address with a gmail address (with filtering and forwarding in gmail to my standard mail address) to get notifications again. Somehow using my standard mail address is not working with this new forum software....

                          Originally posted by Simplex Technology View Post
                          Actually I just noticed I'm getting the same json error.

                          I'm not using the Hue bridge (no devices) and everything is in deCONZ curently. I have not looked at the contents of the file yet.
                          I doubt if this is the same issue as this topic is about the JowiHueImports.xml that gets emptied instead of deleted? The first error in this post has been resolved in version 2.0.2.5. I think what you see is different? If your Philips Hue bridge is empty, it might be causing unexpected issues. You could try running the plugin and delete the bridge in the bridge maintanance page and then switching the bridge off to see if the error persists?

                          Wim


                          -- Wim

                          Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                          1210 devices/features ---- 392 events ----- 40 scripts

                          Comment


                            #14
                            Bridge is empty, removed, powered off. I still see the errors but it doesn't cause any problems that I've noticed. If I see a problem I'll start a new thread.

                            Comment


                              #15
                              Originally posted by Simplex Technology View Post
                              Bridge is empty, removed, powered off. I still see the errors but it doesn't cause any problems that I've noticed. If I see a problem I'll start a new thread.
                              You can also send me a trace, as I am curious on what is happening. If you enable the detailed trace and trace to file a trace file (JowiHue.log) is logged in the Logs subdirectory. Best is to restart the plugin after setting the options, so I can see how things run from the start. then let the plugin run until the error shows up. Then disable logging to file and detailed trace. I think the json string is logged when the error occurs. Send me the file then (w dot vuyk at upcmail dot nl)?

                              Thanks,

                              Wim
                              -- Wim

                              Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                              1210 devices/features ---- 392 events ----- 40 scripts

                              Comment

                              Working...
                              X