Check out the developer and docs site. Documentation is getting better, and a lot of community members are here to help.
Regarding the HEM, search is your friend. There are a lot of discussions regarding this device, including custom device types that calculate cost:
https://community.smartthings.com/search?q=Home%20Energy%20Monitor%20order%3Alatest
More specifically: