Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limitation config #122

Closed
theo-69 opened this issue Jun 13, 2018 · 9 comments
Closed

limitation config #122

theo-69 opened this issue Jun 13, 2018 · 9 comments

Comments

@theo-69
Copy link
Contributor

theo-69 commented Jun 13, 2018

I trieb to set uo a real long config file, however the plugin always removed part of it while saving it.

The config does have over 220 lines.

@oznu
Copy link
Member

oznu commented Jun 13, 2018

What does the log say?

I tested a huge amount of config and got this:

[6/14/2018, 7:26:09 AM] [Config] PayloadTooLargeError: request entity too large

Do you get the same?

@theo-69
Copy link
Contributor Author

theo-69 commented Jun 13, 2018

Only thing I see [Config] Invalid token sent by admin: invalid signature

@oznu
Copy link
Member

oznu commented Jun 13, 2018

Can you share the config?

@theo-69
Copy link
Contributor Author

theo-69 commented Jun 13, 2018

its this one

    "bridge": {
        "name": "Aqara Gateway Oben",
        "username": "xx:xx:xx:xx:xx:xx",
        "port": xxxxx,
        "pin": "xxx-xx-xxx"
    },
    "plugins": [
        "homebridge-config-ui-x",
        "homebridge-mi-aqara-mod"
    ],
    "accessories": [],
    "platforms": [
        {
            "platform": "config",
            "name": "Config",
            "port": 8095,
            "sudo": false,
            "restart": "sudo -n systemctl restart homebridge-aqara-oben",
            "log": {
                "method": "systemd",
                "service": "homebridge-aqara-oben"
            }
        },
        {
            "platform": "MiAqaraPlatform",
            "gateways": {
                "xxxxxxxxxx": "xxxxxxxxxx"
            },
            "defaultValue": {
                "34ce0088dac2": {
                    "Gateway_Lightbulb": {
                        "name": "Flur Gateway Licht"
                    },
                    "Gateway_LightSensor": {
                        "name": "Flur Lux Sensor"
                    },
                    "Gateway_Switch_JoinPermission": {
                        "name": "Flur Gateway join permission switch",
                        "disable": true
                    }
                },
                "158d00010d022b": {
                    "SingleWallButton_StatelessProgrammableSwitch": {
                        "name": "Flur Lichtschalter"
                    }
                },
                "158d000128ec57": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Test Button"
                    }
                },
                "158d0001832db0": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Büro Schreibtischlampen Eingang"
                    }
                },
                "158d0001831c98": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Wohnzimmer Stehlampen"
                    }
                },
                "158d00012a7f54": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Wohnzimmer Küchenlicht"
                    }
                },
                "158d0001831cd1": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Wohnzimmer Verandalampen"
                    }
                },
                "158d000128ccd9": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Schlafzimmer Eingang Nachttischlampen"
                    }
                },
                "158d0001831be5": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Schlafzimmer Kleiderschrank"
                    }
                },
                "158d0001831bf5": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Schlafzimmer Nachttisch Kai"
                    }
                },
                "158d00012a7dc3": {
                    "DuplexWallButton_StatelessProgrammableSwitch": {
                        "name": "Schlafzimmer Nachttisch Anja"
                    }
                },
                "158d0001a66841": {
                    "Button2_StatelessProgrammableSwitch": {
                        "name": "Schlafzimmer Paniklicht"
                    }
                },
                "158d0001a3f835": {
                    "Button_StatelessProgrammableSwitch": {
                        "name": "Schreibtisch Anja"
                    }
                },
                "158d000186f56d": {
                    "Button_StatelessProgrammableSwitch": {
                        "name": "Schreibtisch Kai"
                    }
                },
                "158d0001309b60": {
                    "Global": {
                        "serviceType": "Lightbulb"
                    },
                    "DuplexSwitch_Switch_Left": {
                        "name": "Büro Deckenventilator"
                    },
                    "DuplexSwitch_Switch_Right": {
                        "name": "Büro Deckenlicht"
                    }
                },
                "158d0001309b50": {
                    "Global": {
                        "serviceType": "Lightbulb"
                    },
                    "DuplexSwitch_Switch_Left": {
                        "name": "Schlafzimmer Wandlampen"
                    },
                    "DuplexSwitch_Switch_Right": {
                        "name": "Schlafzimmer Kleiderschrank"
                    }
                },
                "158d00012a7718": {
                    "Global": {
                        "serviceType": "Lightbulb"
                    },
                    "DuplexSwitch_Switch_Left": {
                        "name": "Bad Wandlampe"
                    },
                    "DuplexSwitch_Switch_Right": {
                        "name": "Bad Spiegellampe"
                    }
                },
                "158d0001309c13": {
                    "Global": {
                        "serviceType": "Lightbulb"
                    },
                    "DuplexSwitch_Switch_Left": {
                        "name": "Küche Deckenlampe"
                    },
                    "DuplexSwitch_Switch_Right": {
                        "name": "Küche Oberschränke"
                    }
                },
                "158d00012f79b3": {
                    "Global": {
                        "serviceType": "Lightbulb"
                    },
                    "DuplexSwitch_Switch_Left": {
                        "name": "Flur Aussenlicht"
                    },
                    "DuplexSwitch_Switch_Right": {
                        "name": "Flur Aussenlicht unten",
                        "disable": true
                    }
                },
                "158d00012f7942": {
                    "Global": {
                        "serviceType": "Lightbulb"
                    },
                    "DuplexSwitch_Switch_Left": {
                        "name": "Flur Deckenlicht Küche",
			"disable": true
                    },
                    "DuplexSwitch_Switch_Right": {
                        "name": "Flur Wandlampen"
                    }
                },
                "158d00021304a7": {
                    "WaterDetector_LeakSensor": {
                        "name": "Waschküche Wasser Leak"
                    }
                },
                "158d000155f14f": {
                    "ContactSensor_ContactSensor": {
                        "name": "Wohnzimmer Verandatür rechts"
                    }
                },
                "158d0001835425": {
                    "ContactSensor_ContactSensor": {
                        "name": "Wohnzimmer Verandatür links"
                    }
                },
                "158d00018355fa": {
                    "ContactSensor_ContactSensor": {
                        "name": "Flur Eingangstür"
                    }
                },
                "158d000152fbdf": {
                    "MotionSensor_MotionSensor": {
                        "name": "Außen Bewegungsmelder"
                    }
                },
                "158d00014ab157": {
                    "SingleSwitchLN_Switch": {
                        "name": "Abstellraum",
                        "disable": true
                    }
                },
                "158d00012a3699": {
                    "SingleSwitchLN_Switch": {
                        "name": "Waschküche"
                    }
                },
                "158d00013e2497": {
                    "PlugBase_Outlet": {
                        "name": "Alarmauslösung"
                    }
                }
            }
        }
    ]
    }

@oznu
Copy link
Member

oznu commented Jun 13, 2018

Is it cutting off the config resulting in invalid json or refusing to save?

@theo-69
Copy link
Contributor Author

theo-69 commented Jun 13, 2018

It is pretending to safe if I add one item like

,
                "158d00013e2497": {
                    "PlugBase_Outlet": {
                        "name": "Alarmauslösung"
                    }
                }

but then its returning and the item is not there anymore, thats kind of annoying if you have to add several of them. It started after 20 items or so. If I add them manually via VNC its working fine. Config is working 100%

@oznu
Copy link
Member

oznu commented Jun 13, 2018

I've pushed up a change to make the whole config saving process more robust.

sudo npm install -g --unsafe-perm homebridge-config-ui-x@next
  • Sync config.json file saves, rather than async
  • UI will not allow save to be hit multiple times
  • Editor will go into read only mode while save is in progress

You can also use CTRL+S / CMD+S while focused on the config editor for quick saving.

@theo-69
Copy link
Contributor Author

theo-69 commented Jun 14, 2018

Just tried it, still the same. If I have a long config and hit save even without changing anything it will be shortened. :-(

@theo-69
Copy link
Contributor Author

theo-69 commented Jun 14, 2018

my mistake used one ID twice (copy&paste)

@theo-69 theo-69 closed this as completed Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants