You raise a very good point and one of big personal concern. I recently put solar panels on my house, but I'm not free of the grid. Instead, my solar panels have become part of the overall grid system. When I generate more electricity than my house needs, the electric company feeds the extra electricity to my closest neighbors and gives me a credit. At night and in the winter, I can use those credits as my house draws electricity from the grid. (If all goes according to the projections, I won't have to pay for electricity in the future because it will all balance out.)
For this to work, I will be relying on the electric company having accurate numbers about how much I use, how much I generate, and when it all happens. It seems like this nice system contains just that much more that can go wrong - that much more which is controlled by software. If the software is not secure...