Apagg: Looks like we'll have to do some further testing of the php-image-graph package, I see the sqlCVS changes were actually put in place, but I did do a sqlCVS update prior to starting on this last week and it did not work for me, I had to run pear install image_graph-0.7.1 to get the package before it would graph properly because the include was not there from the package.
Why did you decide to use the state changed event and a separate energy graph outside the generic graphing? I have not tested your source at all, but with the way the datalogger works for graphing generically with labels for the x and y axis from the unit table of the database, I'd think that wouldn't really work out so well for this type of device since the state changed event is really targetted for generic data. Can you post a screenshot of your work here?