I’m trying to get coinmotion to share my wallet ballance to home assistant via API integration, but due to my very limited knowledge on these things (trying to learn for the first time) I am strugling even though I’ve read instructions for rest api configuration (just too stupid to understand most likely).
Does your config load without errors?
If yes, go to Developer Tools -> States and search for sensor.coinmotion - you’ll see what’s available.
Then read some docs and try to figure out how to display it or ask here
Thanks, config loads without errors, but in states it gives error with authentication.
The part I am strugling now for hours is the below part. I know that the signature is to be created based of the two points mentioned below, but I am not able to understand how to set this up. I’ve tried to search the HA forums, and google but I do not find anything which would help me out.
X-COINMOTION-SIGNATURE - Request signature computed as detailed in the Authentication section
So basically you’re asking for help in configuring that coin motion API?
Maybe it’s better to use their website/forum?
Where did you get all the info above from?
So I am lacking the understanding to define in configuration.yaml two attributes (payload and x-coinmotion signature) built from two different data inputs.
From what I can see you cannot use templates in headers so no go for sensor.rest.
Don’t know what else you can try… maybe have another look at available integrations?
Yeah, I’m starting to think of actually moving my bitcoin wallet to one of the HA supported solutions, instead of trying to hit my head to the wall with this one. I’ve tried to search from the forums and from google other examples, even tried to reverse engineer the existing HA integrations, but still after multiple hours (days) of researching I am basically at the very start of setting this up.
And it does not help that the documentation by coinmotion is very poor (or at least hard for beginners to understand).
I want to have an easy way to view my bitcoin wallet ballance in a dashboard which show other information relevant for me.
Plus I would be able to create notifications of when bitcoin rates are below or above specific tresholds.
Currently I have bitcoin integration added, which shows the current bitcoin rates, but I need to manually do the conversion to euros. One option could be also to create a script in HA, which does convert the rate to euros, and then uses the known amount of bitcoins I have, and this way knowing my wallet state in euros. Not optimal, but I guess it would work well enough.
Check out the BitFetch custom component. You should be able to use the BTCEUR pair for what you want to do. Reach out if you have any feedback or need any help!
Not really directly answering the original question, but I Managed to get this working with bash. This is the way you need to create the signature with openssl. Just set APIKEY and APISECRET from coinmotion and you are good to go.
Works with bash (and Mac)