I‘m a beginner on Openhab 2 and would like to control mystrom switches with openhab 2.
When i search the binding, i find the mystrom eco power binding that matched with my devices. But this binding is marked with „manual/legacy“.
Can I use this binding for openhab 2 and how i can
install it?
The meaning of legacy is, there should be a native OH2 binding for that (no, there is none…) so, the other option is manual, which is, the binding was not marked as compatible to OH2 yet and also was not optimized to enable automatic install through openHAB2 Administration.
But there is a good chance, that the binding works anyway.
After that, you have to manually copy the .jar to /usr/share/openhab2/addons/ (I refer to the GNU/Linux path, feel free to ask if you are using another OS).
I don’t no what i should do with the openhab.cfg, i haven’t found this file. Also i don’t find the file
mystromecopower.cfg. Are this to files probably my problem?
As you are using openHAB2, you will have to use services/mystromecopower.cfg to configure the binding.
As this is an openHAB1 Binding, you have to define items in an .items file (see the last Link on my previous posting, readme for mystrom binding).
If that doesn’t work, you may need to create an openhab.cfg file and put the mystromecopower config items in that with mystromecopower: prepended to each entry. When using the compat layer I don’t know if it lets you split out the configs or not.
Thanks for your answers. Now the switches works fine (command, state & power consumption). The only not comfortable thing is the long refresh time of the state, when i change the state of the switch by pressing the button on the switch … there are more then a half minute for refresh.
I there a possibility to make the refresh time shorter?
Did you consider all steps in the installation of the binding?
However, please find below my personal walk trough guide" to get mystromecopower binding work in openhab 2.2:
The Mystromecopwer Devices have to be installed through App and Internet. The friendly names (naming of the devices e.g. “Printer” as used in App) have to be known.
The Legacy 1 Binding support has to be installed (trough PaperUI)
Download the …jar file for binding and copy it into the correct folder: /usr/share/openhab2/addons/
Set permissions on …jar file: sudo chown openhab:openhab org.openhab.binding.mystromecopower-1.12.0-SNAPSHOT.jar
Create an openhab.cfg file with the content: mystromecopower:userName=xyz@abc.com // username for mystrom acconut
mystromecopower:password=pwd // password for mystrom account
Copy the file openhab.cfg to the folder: /etc/openhab2/services
Create a mystromeccopower.items file (as you did) and copy to folder: /etc/openhab2/items
Thanks for your guide. I’ve followed it but I got the same Error as @Chrysokomas. Is there any possibility to check the Connection of the Binding or to check if it’s installed correctly?
If you need some Logs or more infos, please let me know
It finally works at my place. I initially was not aware that i have to name the config file “openhab.cfg” and use it the “old way”. So my approach having a “mystromecopower.cfg” was completely wrong. Once I changed the config file to the way @dandil described it was fine.
Yes. I’ve followed each step of your guide. I’ve installed the Legacy Support, I’ve downloaded the and copied the *.jar File, set the Permission and created the openhab.cfg file with my credentials.
The only difference I can see, i’ve created the files directly in the paths with the Visual Code tool.
In the Logfiles, I got the same message. Maybe I’can send you some files? Or some code from my System?
Try it with the Code from Daniel. To test it change the Username an Password in the cfg file and the “Friendliy Names” in the Items.
Then test it. That worked for me.