How can I write a handler for the event when a new camera is added, how to fetch the GUID of this new camera and the GUID of the site hosting this camera?Thanks very much.

You can unfortunately not get a specific event telling that a camera has been added. Instead you have to keep a list of current cameras, listen for the System.SystemConfigurationChangedIndication message and then compare the updated configuration with your current list.

Please see my explanation on your other post on how to listen for events: https://developer.milestonesys.com/s/question/0D53X00007OJWpGSAX/i-just-started-with-milestone-plugin-development-and-would-like-to-know-how-to-listen-forwrite-handler-when-a-motion-is-found-on-any-camera-how-to-get-the-videoimages-of-this-event-the-cameras-guid-and-the-sites-guid-thank-you

Also, if your plugin is running in the Smart Client be aware that Smart Client does not reload configuration except when you logout and login again. In that case you can instead use configuration API to read the configuration directly from the server.