New Enigma2 Binding

@ggaljoen:
Do you plan the question input ‘getanswer’ ?

I tried to implement this, but it wont’t work. The getanswer-endpoint always return the last given answer, no matter if it was given yesterday or in the last few seconds. And if the answer is two times yes, it wouldn’t change. So I can’t check out if there is already a new answer given to the last question.
And if the box itselfs asks a question (eg. for updates) the channel would also be triggert and there is no way to assign the answer to the correct question.

Indeed not easy, but noticed the answer might not be your trigger; the state changes to False indicate the user not yet replied/timeout

<e2state>False</e2state>

Did you see this also?
Extra thing is the answer is user language dependent.

@ggaljoen:
Indeed not easy, but noticed the answer might not be your trigger; the state changes to False indicate the user not yet replied/timeout

<e2state>False</e2state>

Did you see this also?

Oh you are right, I don’t see this before. It would be tricky but it may work. I think, I’ll give it a second try. But this could take some time (weekend is over), so stay tuned :wink:
Because of the user language dependent answer Iguess it is the best way to provide the answer as a String-Channel, so everybody can handle it in his own language

2 Likes

We will hold on (as we do in corona times) . Maybe stripdown down to the last word?

I had to switch back, because my vu+Solo2 couldnt be controlled with the newer 2.5.5 snapshot

@Ambo
I had to switch back, because my vu+Solo2 couldnt be controlled with the newer 2.5.5 snapshot

I’m sorry. Can you please give me some details? What is the timestamp of the “newer 2.5.5 snapshot”?What problem do you have? And do you get an error or a logging?

Hard for me to give you details. It was your last change from last weekend 3.5.2020
I changed the .jar file and did a reboot of openHAB afterwards it was not possible to control anything in the sitemap. (I used your sitemap example all the time) - nothing in log

Make sure you have the timeout set:

@Ambo
Hard for me to give you details. It was your last change from last weekend 3.5.2020
I changed the .jar file and did a reboot of openHAB afterwards it was not possible to control anything in the sitemap. (I used your sitemap example all the time) - nothing in log

I fixed some problems this week. So please try the following steps:

  1. delete your thing in paper-ui
  2. delete the old jar in add-ons folder (wait until the binding disapears in paper-ui bindings view)
  3. download the current jar and place it in the add-ons folder
  4. do auto discovery in paper-ui and add the thing check that the timeout parameter is set
  5. reboot your open-hab instance

After these steps evreything should run fine. If there are problems left, please go to karaf-console and perform

  1. log:set DEBUG org.openhab.binding.enigma2
  2. log:tail
1 Like

@ggaljoen: I addded support for question.

1 Like

Great!
Small suggestion; after question SEND and before user reply received change answer to an awaiting state

found the new version here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.enigma2/2.5.5-SNAPSHOT/

what is the difference between the 2 files?
org.openhab.binding.enigma2-2.5.5-SNAPSHOT-sources.jar
org.openhab.binding.enigma2-2.5.5-SNAPSHOT.jar

@gdolfen:
I took the 2nd file and it works fine

Attention to everyone for reinstallation:
to use your old item, your new thing needs to have the same name and Thing ID !!!
I decided to take the name “enigma2” and the Thing ID “vuSolo2”

1 Like

@Ambo:
Great. You choose the right file. The *-sources.jar contains the source-code of the binding. It is only for developers

1 Like

@ggaljoen:
Small suggestion; after question SEND and before user reply received change answer to an awaiting state

I just got my first review approval, so I hope my PR will be able to be merged soon. In case of this, I don’t want to endanger the merge with new changes. I possible will provide this in a second version. Thank you for your suggestion and I hope you wouldn’t be disappointed.

2 Likes

Unfortunately with the newest version my VU Duo2 does not have all channels available anymore :joy:

207 │ Active │ 80 │ 2.5.5.202005091733 │ openHAB Add-ons :: Bundles :: Enigma2 Binding

Pushing the buttons for the missing channels does of course not showing anything in the logs:

https://gist.github.com/sihui62/375113c8cae999a6a0e8c83019801a5b

I removed the old jar, cleared cache and tmp, added the new jar, restarted openHAB, autodiscovered the Thing (which did not work either, I had to manually add the Thing).

@sihui:
I checked your logs and everything seemed to be ok. There is no error and I found log entries for refreshing the missing channels:

2020-05-10 19:47:16.662 [DEBUG] [nding.enigma2.handler.Enigma2Handler] - handleCommand(enigma2:device:vuduo2:channel,REFRESH)
2020-05-10 19:47:16.663 [DEBUG] [nding.enigma2.internal.Enigma2Client] - Transmitting http://192.168.2.25/web/subservices
2020-05-10 19:47:16.669 [DEBUG] [nding.enigma2.handler.Enigma2Handler] - handleCommand(enigma2:device:vuduo2:title,REFRESH)
2020-05-10 19:47:16.683 [DEBUG] [nding.enigma2.handler.Enigma2Handler] - handleCommand(enigma2:device:vuduo2:description,REFRESH)

So the channels must be there, otherwise OpenHAB might not be able to request a refresh.

There ist also a log where you send a command to the mediaStop-channel:
2020-05-10 19:47:48.126 [DEBUG] [nding.enigma2.handler.Enigma2Handler] - handleCommand(enigma2:device:vuduo2:mediaStop,ON)
2020-05-10 19:47:48.133 [DEBUG] [nding.enigma2.internal.Enigma2Client] - Transmitting http://192.168.2.25/web/remotecontrol?command=128

I tried it out with a full clean install and everything looks fine.
I have no idea what could cause your problems. Can you please download the latest OpenHAB-Snapshot and check if the binding works with a clean installation?

These channels are available, I was looking for the “rcbutton”, “warning”, “error” and “info” channels, but realized after another look in your readme that the channels changed to actions now.

Sorry for the confusion and thanks for looking into this.

Hi Guido!

great work with this binding, works well on my zgemma h7s
i have one question, do you have any idea how to add to sitemap buttons with predefined channels?
i would like to have a few favorite channels and switch them using zap method
like on this exampel https://dream.reichholf.net/wiki/Enigma2:WebInterface#Zap
maybe you can add this functionality to your binding?

thanks in advance,
Paweł

Hi Pawel,
it is already supported:

enigma2.items:
String Enigma2_Channel “Channel: [%s]” { channel=“enigma2:device:192_168_0_3:channel” }
String Enigma2_Favorite “Favorite” { autoupdate=“false” }

enigma2.rules:
rule “Enigma2_Favorite”
when Item Enigma2_Favorite received command
then
logInfo(“actions”, “ProSieben”)
Enigma2_Channel.sendCommand(“ProSieben”)
end

default.sitemap
Switch item=Enigma2_Favorite mappings=[ON=“ProSieben”]

2 Likes

In my logfile I have every 2 minute an enigma2 entry:
[INFO ] [iscovery.Enigma2DiscoveryParticipant] - Enigma2 device NAS reports multiple addresses - using the first one! [/10.10.1.2, /10.10.1.3]
My VU+Solo 2 is working fine in openhab an has the ip 10.10.1.211

  1. Why is Enigma discovering my NAS again and again
  2. how can I stop the autodetections?
  3. how can I suppress this log entries?

Thank you very much