Simple and ugly OH client for Enigma2 boxes

enigma2
Tags: #<Tag:0x00007f51e003d098>

(druciak) #1

Hey,
I thought having OH client on my sat box might be useful, so I created very simple plugin to control OH directly on TV.
It is text only, no icons at all, very simple interface using widgets available on E2 platform, but it works - at least on my OH configuration ;-).

Anybody is invited to test it, here is the repo: https://github.com/druciak/enigma2-plugin-openhab.

Any suggestions are welcome, although I don’t want to make it a real OH client (unless somebody convinces me).
Enjoy!


Enigma2 Binding
(Daniel) #2

Hi, i would like to test this, how can I install it on my box?


(druciak) #3

Download ipk file from this page: https://github.com/druciak/enigma2-plugin-openhab/releases, upload it on the box and install from command line:

opkg install enigma2-plugin-extentions-openhab_0.1.git1.74fe9f3-r0_all.ipk


(Daniel) #4

Thank u.
I tested this add-on today.
A checkbox for my.openhab.org would be great. So u don’t need to typ in the full string.
The plugin doesn’t find my sitemap.
When I get this warning:


When I click on “Nein” (No), the box appears again. Also when I want to exit the plugin, so it is not possible so quite the plugin.

For Address is typed in http://
EDIT: IP only is working :wink:

For what I have to enter my username and password? Inside my network it is not necessary, isn’t it?


(Daniel) #5

This entering methods would make enter the address, email, password,… much easier:


(druciak) #6

Sorry for the inconvenience. I did not have time to create even simple manual, but I hope we figure this out here. BTW I updated main page on github: added installation instructions and some screenshots).

Regarding your problems with settings:

  • Host - put here either hostname or ip of OH server, but without http:// prefix or anything else, ie: 192.168.1.100 and nothing more (as on the second screenshot),
  • Port - OH port on the server, I guess you should leave default 8080 here,
  • User/Password - if you don’t have security enable on OH, leave it empty,
  • Sitemap - enter name of the sitemap you would like to present,
  • Enable debug - better switch it to “yes” as likely there will be problems with the plugin and this should help us solving them. :smile:

I keep fingers crossed.


(druciak) #7

That’s true, I will try to implement this in next revision. I focused mainly on sitemap parsing and controls. This is my first E2 plugin, so it took me much time to reveal even simple things.


(druciak) #8

When you are in settings screen you can exit by choosing “red”. Please confirm if this works for you, also I will try to test it on my box again.


(Daniel) #9

Red button is working.

But when I’m in a 3rd level and won’t to get back to chose another room (in my case), the plugin closes.


(druciak) #10

So now I am confused. Did you get the plugin working? Does it show your sitemap and you are able to control your devices? It seems so, since you’re talking (I guess) about navigation on your sitemap, but please confirm.
In case it is working for you, here you have list of keys on sitemap screen:

  • OK: go into sitemap element (another page), for switches and sliders toggle state (sliders switch between 0% and 100%), stop for rollershutters
  • right (cursors): switches, selections - next state, sliders - increase level by 5%, rollershutters - DOWN
  • left (cursors): switches, selections - previous state, sliders - decrease level by 5%, rollershutters - UP
  • exit, red: go level up or exit on top level page
  • yellow: settings screen

(druciak) #11

New version available. It adds OH2 compatibility and should work with both OH1 and OH2.

Enjoy :slight_smile:


(Grzegorz) #12

Hi,

If U use more as 19 items in your demo.mapsite then plugin return error.

Wed Jan 24 13:57:12 2018: Loading sitemap: iDom
Wed Jan 24 13:57:12 2018: Item changed: None
Wed Jan 24 13:57:12 2018: Item changed: None
Wed Jan 24 13:57:12 2018: Error while loading sitemap iDom: [Failure instance: Traceback: <class ‘twisted.web.http.PotentialDataLoss’>:
/usr/lib/python2.7/site-packages/twisted/internet/endpoints.py:129:connectionLost
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:916:dispatcher
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:1600:_connectionLost_WAITING
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:1522:_disconnectParser
— —
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:529:connectionLost
/usr/lib/python2.7/site-packages/twisted/web/http.py:1460:noMoreData
]
Wed Jan 24 13:57:15 2018: Loading sitemap: iDom
Wed Jan 24 13:57:15 2018: Error while loading sitemap iDom: [Failure instance: Traceback: <class ‘twisted.web.http.PotentialDataLoss’>:
/usr/lib/python2.7/site-packages/twisted/internet/endpoints.py:129:connectionLost
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:916:dispatcher
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:1600:_connectionLost_WAITING
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:1522:_disconnectParser
— —
/usr/lib/python2.7/site-packages/twisted/web/_newclient.py:529:connectionLost
/usr/lib/python2.7/site-packages/twisted/web/http.py:1460:noMoreData


(druciak) #13

Hi Grzegorz,
are you sure the number of items does matter? Maybe there is some specific item that causes troubles?

Anyway good to know that somebody found this plugin worth trying :slight_smile:


(Grzegorz) #14

Yes, over 19 items plugin returns error.
I have create 19 switch and all was working OK, if make 20 or more dos not load sitemap.
Plugin is very nice to quick manage light and other items in my home.

Regards


(druciak) #15

Ok, I will try to reproduce the issue on my box.
Can you tell me what the sitemap contains? Are there only items or group/frames also?


(Grzegorz) #16

Here my test site:

sitemap iDom label="iDom" {
          
                                    Switch item=PLC_PrzedpokojMalyTaster icon="switch" label="Przedpokój mały taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_PrzedpokojMalySwiatlo icon="light" label="Przedpokój mały światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_PrzedpokojDuzyTaster icon="switch" label="Przedpokój duży taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_PrzedpokojDuzySwiatlo icon="light" label="Przedpokój duży" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_KotlowniaTaster icon="switch" label= "Kotłownia taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_KotlowniaSwiatlo icon="light" label="Kotłownia światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                   Switch item=PLC_PrzedsionekKotlowniTaster icon="switch" label= "Przedsionek kotłowni taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                   Switch item=PLC_PrzedsionekKotlowniSwiatlo icon="light" label="Przedsionek kotłowni światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_PokojSufit1Taster icon="switch" label="Pokój sufit 1 taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_PokojSufit1Swiatlo icon="light" label="Pokój sufit 1 światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_PokojSufit2Taster icon="switch" label= "Pokój sufit 2 taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_PokojSufit2Swiatlo icon="light" label="Pokój sufit 2 światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_SpizarniaTaster icon="switch" label="Spiżarnia taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_SpizarniaSwiatlo icon="light" label="Spiżarnia światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                  Switch item=PLC_KlatkaSchodowaTaster icon="switch" label= "Klatka schodowa taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_KlatkaSchodowaSwiatlo icon="light" label="Klatka schodowa światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_SalonKinkietyTaster icon="switch" label="Salon kinkiety taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_SalonKinkietySwiatlo icon="light" label="Salon kinkiety światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                   Switch item=PLC_SalonSufitTaster icon="switch" label= "Salon sufit taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                 Switch item=PLC_SalonSufitSwiatlo icon="light" label="Salon sufit światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                 Switch item=PLC_JadalniaKinkietyTaster icon="switch" label="Jadalnia kinkiety taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_JadalniaKinkietySwiatlo icon="light" label="Jadalnia kinkiety światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_KuchniaBlatTaster icon="switch" label= "Kuchnia blat taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_KuchniaBlatSwiatlo icon="light" label="Kuchnia blat światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                    Switch item=PLC_KuchniaSufitTaster icon="switch" label="Kuchnia sufit taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                                    Switch item=PLC_KuchniaSufitSwiatlo icon="light" label="Kuchnia sufit światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                 Switch item=PLC_LazienkaParterSufitTaster icon="switch" label="Łazienka parter sufit taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                               Switch item=PLC_LazienkaParterSufitSwiatlo icon="light" label="Łazienka parter sufit światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                              Switch item=PLC_LazienkaParterLustroTaster icon="switch" label="Łazienka parter lustro taster" mappings=[OFF="Wyłączony", ON="Załączony"]
                             Switch item=PLC_LazienkaParterLustroSwiatlo icon="light" label="Łazienka parter lustro światło" mappings=[OFF="Wyłączone", ON="Załączone"]
                                 

                                   
                                   
  }

(druciak) #17

One more thing: what OH version do you have?


(Grzegorz) #18

I use OH 2.2 and 2.3


(druciak) #19

Issue link: https://github.com/druciak/enigma2-plugin-openhab/issues/1


(druciak) #20

New version available. It includes fixes for the above issue as well as some other changes.
You can download it from releases page.
Enjoy :slight_smile: