Has anyone got CurrentCost energy data coming into HASS? Any pointers/link/scripts available?
Background: Have CurrentCost with VeraLite working (had) but it’s got an issue, so I want to get off Vera. HA looks very interesting/good, but ultimately one of key things I do is need realtime access to power data from CurrentCost, which I then act on within automation scripts. Being is Australia there seems to be no z-wave based energy clamp devices here, i.e. with Australian z-wave frequencies, so it seems like I need to keep using my CurrentCost. I would be looking at going down the Python with appdaemon path within Home Assistant I would imagine (looks most flexible).
doesn’t look like that exists. If you know how the API works, you could write one with python. There are plenty of examples you could emulate, you would just need to change the api calls. Just pick any web based component that use a username/password for log in and reuse as much code as possible:
Something like DarkSky or the like. Click on the component, in the upper right corner is a link to the source python file.
Create your own component and then you deal with the bugs instead of some 3rd party.
thanks - it seems to be Serial Port based - with this clarification would HA on a Raspberry Pi 3 be OK do you think? So I guess the questions are:
a) HA - can you from Python open a serial port up, set baud rate, and get data?
b) Raspberry Pi 3 - the current cost provides a USB output cable that would plug into the Vera, from which the Vera opens the serial port across it. So I guess as long as you can plug in a USB cable to the Pi then this should be ok? i.e. would just be up to question (a) regarding whether you can do serial port comms in HA/Python?
Any suggestions re an existing HA plugin/components that uses Serial Port that I could get access to the Python code to have a look at?
I’m a newbie and with the help of @lolouk44 (he did all the work!!!) we managed to make it working. Now the problem is to get this script autostart when HA starts.
Well I’m stumped because you should have a service named shell_command.getcurrentcost and your config looks correct.
To clarify, your shell_command section is inside your config, not inside an additional yaml file that is “included!” in your config? Only reason I ask is I want to make sure you don’t have this scenario:
config.yaml:
shell_command: inlude! shell_command.yaml
shell_command.yaml:
shell_command:
getcurrentcost:
This would be invalid and it would produce a shell_command named shell_command.shell_command