Moving to Openhab because of Mountain's v6.05 Firmware


#1

Ok, go easy on me, I’ve been a HassIO user so that’s what I’m familair with, but i decided to switch to Open Hab since that seems like what everyone’s doing and what @Mountain is using to dev new firmware builds.

I got Openhab all loaded and working great and can control my Shelly devices that it auto discovered fine. So I know openhab is working. Then I updated blinds to Mountains v6.05 and did the physical switch mod… that works awesome btw. I can browse to their ip address and finish the setup. I can even use MQTT Explorer to manually send commands and get the blinds to respond.

BUT…

I have such a Hass brain at the moment, I’m doing something wrong in open hab.

Can anyone post the code/steps to the files i need to create and how to get a working thing in open hab.

I tried following MK’s setup guide, but it’s so old and the new MQTT appears to work different than the way he did the setup. Any help would be amazing!!!


#2

How far have you got with openhab, ? Did you follow the install guide from openhab site or Matt’s Guide.
I installed as per openhab site. Then I installed a demo site. Which creates all the things, items and sitemaps. Includind habpanel examples etc.
This was a great starting point to learn how it fits together.
There are things and items you link them together . via channels.
I then modified the example to suit my own install untill I was ok to redesign my own.
very easy after you know how.
There are 2 ways to create things, channels, items etc and to link them .
You can do it via GUI. PAPER UI or by text files
eg
demo.items, demo.things, demo.sitemap , demo.rules etc

I use the text method as I can bulk edit and add things quickly and see if any errors etc, also keeps formats the same when adding new things, items etc.

Also you need to install mosquitto , not use the imbedded broker as this is being fased out.

Let me know were you are upto and I’ll try to guide you through.

I can put up my sample files for you. just for blinds. items, things, sitemap


#3

I followed Matts guide. I figured that’s where I went wrong. I’ll go back and install a demo site and dig thru that.

I installed the MQTT Binding “binding-mqtt-2.5.10” under add-ons, bindings in paperUI. Is that correct? If not please shoot me a link to the correct one.

That would be awesome if you could post your files or a sample set that works with a new build of OpenHab for a blind.


#4

MQTT binding 2.5 under add-ons is correct.

To add demo site
navigate to etc/openhab2/services and edit the addons.cfg file

you should see # package =
edit and put package = demo
and remove the #
save and restart this will install demo site etc

I have used text files to configure things, items and sitemaps.
I use the GUI to link items to things

Matts guide is great but there were a lot of changes in openhab 2.5

here is my basic files to help you get started. You will need to add them into your existing files that is demo.items demo.things etc. I have kept things file seperate as openhap will load all files in the corresponding directories.

You can create all you things, items etc through the GUI, you can have a combo of both but if you forget which one you created from and you go to edit you will get conflict errors.

With the sample files i will post you need to edit the things file to reflect you MQTT details.

Also I have rem some devices with the “//”
Edit file to name you devices and edit items file to name your devices as well to suite your site.
You can put the mk-blindcontrol.things file into the things directory and the mk-blindcontrol.items into the items directory and it loads up and you will see these devices in things in GUI.
Items file save to etc/openhab2/items


things file save to etc/openhab2/things

sitemap sample add to existing this is not complete sitemap only blind items
sitemap located in etc/openhab2/sitemap

New outlay


#5

This is great info. Thanks so much for posting it. I’ll dig in this weekend and let you know how I make out!


#6

ugh… I installed the demo as you suggested. took a look thru them, added your mk-blind files to same directories, got overwhelmed with all the demo stuff and the mk stuff, so I deleted the demo.items,things, sitemap files and now cant get them back to study. It appears if i would have read the whole think that it only installs them once on first boot. Any idea how to get them back?


#7

I found this on web. may help.

before you do this make a copy of the config directory onto your pc. just incase

  1. Clean install [You should use this]

    Stop OH (sudo service openhab2 stop) via Putty
    Delete the contents of the userdata folder (\openhabianpi\openHAB-share\openhab2-userdata) and your conf folder (\openhabianpi\openHAB-share\openhab2-conf)
    Start OH (sudo service openhab2 start)

Also look at Matt’s backup process onto usb stick. i use this alot and can recover openhab setup veryquickly. This backup is auto