MystromEcoPower binding in openhab 2.2 -> I got lost

Dear community

I (beginner) tried to research and read how to implement mystromecopower devices into my openhab system (v.2.2, running on a raspi 3 with openhabian installed).

I enabled legacy bindings and see some v.1 bindings in PaperUI but not the mystromecopower binding. However, I tried it manually but did not find a step by step guide clear enough for me to follow.Therefore, I have the following questions:

  1. Is it correct to manually create the folder etc/openhab2/addons?

  2. Is it correct to download the org.openhab.binding.mystromecopower-1.12.0-SNAPSHOT.jar file and

  3. to copy this file (as it is) into the etc/openhab2/addons? (I also found org.openhab.binding.mystromecopower-1.8.1.jar but think this is an older version)

  4. I created a file mystromecopower.cfg as follows

      ```   
     #Konfiguration für mystromecopower binding
      mystromecopower:userName=myaddress@mydomain.com
      mystromecopower:password=mypassword
      ```
    

    Is this all?

  5. I copied the file mystromecopower.cfg into etc/openhab2/services. Correct?

  6. I assume that I do not need a file opehab.cfg (with the same content as in mystromecopower.cfg).

  7. Will the mystromecpower binding show up in PaperUI and will things be discovered automatically via PaperUI Inbox?

  8. Does anyone have a running example of a mystromecopower.thing file? How has it to look like (my three switches are named “Stern”, “Home” and “Kugeln”?

  9. Does anyone have a running example of a mystromecopower.items file?

I assume that if all questions above are answered a “How-to” could be created.

Thx a lot in advance.
Daniel

https://docs.openhab.org/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution

and

https://docs.openhab.org/tutorials/migration.html#installing-unofficially-supported-openhab-1x-add-ons

Are the relevant docs.

Make sure to enable the OH 1.x compatibility layer as documented in both of the links above.

  1. Not the correct location. See https://docs.openhab.org/installation/linux.html#file-locations

  2. Yes, if it isn’t yet part of the officially supported addons it is right to download the jar. See the two links above.

  3. Not the correct location, but yes, you copy it to the proper addons folder, /usr/share/openhab2/addons

  4. You will need to create an openhab.cfg file with the mystromecopower parameters in it. Once you get it working and come back to tell us, we will be able to move it to one of the officially supported bindings and it will become listed in PaperUI. There are some changes necessary to the binding for it to pick up the separate cfg file. But once it supports the separate mystromecopower.cfg file, you would remove the leading mystromecopower: from each parameter.

  5. That is the right location, though as indicated above, you need an openhab.cfg file for now.

  6. See above

  7. No. Since this is not added through PaperUI I’m not sure it will show up in PaperUI. Since this is a 1.x binding, it will never support automatic discovery or Things. Follow the README for the binding for details about how to define Items bound to this binding.

  8. There will be no .thing file. 1.x version bindings do not support Things. See the README for how to define Items bound to it.

Thanks a lot @rlkoshak

I think I managed it somehow, see the extracts from the log:

2018-01-31 23:16:21.277 [INFO ] [b.core.service.AbstractActiveService] - MyStromEcoPower Refresh Service has been started

2018-01-31 23:16:21.277 [INFO ] [ower.internal.MyStromEcoPowerBinding] - Do mystrom discovery

2018-01-31 23:16:22.016 [INFO ] [ower.internal.MyStromEcoPowerBinding] - Mystrom device name: 'Kugeln', mystrom device id:'64002D049BE5'

2018-01-31 23:16:22.017 [INFO ] [ower.internal.MyStromEcoPowerBinding] - Mystrom device name: 'Home', mystrom device id:'64002D04FB56'

2018-01-31 23:16:22.020 [INFO ] [ower.internal.MyStromEcoPowerBinding] - Mystrom device name: 'Stern', mystrom device id:'64002D0505E0'

and

2018-01-31 23:43:27.801 [vent.ItemStateChangedEvent] - Fiona_Kugeln_IO changed from NULL to OFF

2018-01-31 23:43:27.815 [vent.ItemStateChangedEvent] - Fiona_Stern_Status changed from NULL to off

2018-01-31 23:43:27.820 [vent.ItemStateChangedEvent] - Fiona_Kugeln_Status changed from NULL to off

2018-01-31 23:43:27.824 [vent.ItemStateChangedEvent] - Fiona_Home_watt changed from NULL to 0.0

2018-01-31 23:43:27.828 [vent.ItemStateChangedEvent] - Fiona_Stern_watt changed from NULL to 0.0

2018-01-31 23:43:27.835 [vent.ItemStateChangedEvent] - Fiona_Home_IO changed from NULL to OFF

2018-01-31 23:43:27.839 [vent.ItemStateChangedEvent] - Fiona_Stern_IO changed from NULL to OFF

2018-01-31 23:43:27.843 [vent.ItemStateChangedEvent] - Fiona_Home_Status changed from NULL to off

2018-01-31 23:43:27.848 [vent.ItemStateChangedEvent] - Fiona_Kugeln_watt changed from NULL to 0.0


and

2018-01-31 23:47:52.002 [ome.event.ItemCommandEvent] - Item 'Fiona_Home_IO' received command ON

2018-01-31 23:47:52.616 [vent.ItemStateChangedEvent] - Fiona_Home_IO changed from OFF to ON

2018-01-31 23:47:52.920 [ome.event.ItemCommandEvent] - Item 'Fiona_Home_IO' received command OFF

2018-01-31 23:47:52.951 [vent.ItemStateChangedEvent] - Fiona_Home_IO changed from ON to OFF

2018-01-31 23:48:28.971 [vent.ItemStateChangedEvent] - Fiona_Home_watt changed from 0.0 to 0.000198

I struggle with the sitemap (because I do not really have one) and had to improvise in order to be able to send a command.

It would be great, if the binding is integrated in Openhab2…

Again, tanks and regards
Daniel

I opened the issue.

1 Like