Joel1
(Joel)
July 14, 2019, 11:43am
1
Hi,
I try to setup my HA system. I’m a beginner and i can’t set up my MyStrom switch. I follow the instructions but nothing works.
I added this to my config file:
switch:
- platform: mystrom
host: myip
Now i don’t know where i write this in:
$ curl -X GET -H "Content-Type: application/json" http://myip/report
{
"power": 0,
"relay": false
}
or
curl -G -X GET http://myip/relay -d 'state=1'
(myip is the IP from my Switch)
I already try it in states, in the config file or in the services but nothing work. I enabled REST API too.
I hope someone can help me.
Thanks
(sorry for my English i come from Switzerland)
tom_l
July 14, 2019, 12:56pm
2
Open a linux terminal, paste in this command:
$ curl -X GET -H "Content-Type: application/json" http://myip/report
And see if you get this response:
{
"power": 0,
"relay": false
}
1 Like
Joel1
(Joel)
July 14, 2019, 1:47pm
3
Yes that works. Thanks! But can I add a button or something to the Home-Site in HA to Controll it?
tom_l
July 14, 2019, 2:09pm
4
By including this configuration
switch:
- platform: mystrom
host: myip
you already have.
Check the developer tools states menu . Your switch entity id will be listed there.
Add it to a Lovelace entities card.
With Home Assistant v. 0.86, Lovelace became the default user interface, bringing a new way to set up entities with different card styles. In this article, we're going to explore the new UI editor and some of the available Lovelace cards.
1 Like
Joel1
(Joel)
July 14, 2019, 2:20pm
5
Oh I see there is the Problem. I only see my hue devices or the weather but no switch. I have already tried to create one there but that didn’t work too.
tom_l
July 14, 2019, 2:26pm
6
You can’t create one there. That is just a menu for looking at the entity ids, states and attributes of your devices.
You’ve added the configuration.
You’ve enabled the rest api.
You’ve tested the that the switch can be reached.
I’m not sure why you are not seeing the switch. Did you restart home assistant after adding the configuration?
1 Like
Joel1
(Joel)
July 14, 2019, 2:41pm
7
Yes I have restarted several times.
I have installed the HA on a Raspberry PI 3 B+
I tried the HA software in 32 or 64 bit. Both did not work.
Now I try to restart my Router
Joel1
(Joel)
July 14, 2019, 3:06pm
8
Oh, I restarted the Router and reconnect the Switch in the App and on the Website from myStrom. Now it shows it in the Home-Site.
Many thanks for your help!
Pad
February 5, 2021, 10:59am
9
Was very helpful and worked for me as well!
Any hint how I can setup two myStrom Switches in Home Assistant (Current Version). It did not work with this
switch:
platform: mystrom
host: myip-Switch1
host: myip-Switch2
thanks for any help
Duese
May 15, 2021, 9:39am
10
Hi,
I got the same Problem. If i add one myStrom Switch its all ok but with the second line the code will not validated.
Think there ist an Issue with the correct yaml structure and we have to learn it;)
(found nothing in Www so it could took longer)