openHAB zmote binding

restapi
remotecontrol
httpbinding
Tags: #<Tag:0x00007fadf89f9bd0> #<Tag:0x00007fadf89f9a90> #<Tag:0x00007fadf89f98d8>

(Alex) #58

Isn’t that possible already by just defining a map? I’ll give it a try these days.

I’ll ask him. I could also just send a web service request to his server. That was planned anyway when implementing support for reading IR codes.

Basically I wanted to implement support for reading IR codes and the IR code cleanup. Maybe also support for sending one key multiple times. However I’m quite busy atm, as I’m doing my sailing license. This pretty much takes up all my weekends for the next month.

I can send a pull request these days. I just wanted to wait a little while to see if there are any bugs left. So far I didn’t find any, so maybe it’s indeed a good time to send a PR for this version.


(Al) #59

I just received my two zmote devices and managed to connect them to my WIFI.
Using the examples I was able to turn on/off a TV and change channels up/down.

My question is: How can openHAB2 determine what the current state of the TV power is? If openHAB is the exclusive control, you can keep track of it, but if somebody is still using the original remote, the state can change without openHAB knowing.

Here is an example I see where this would be a problem:
I have a “vacation” setting, where the TV should be turned ON at a certain time and turned OFF again after some time. That will work fine if the initial state of the TV is OFF. But if for some reason I forgot to turn the TV off before leaving (and after enabling the “vacation” rules), the openHAB rule would invert the desired behavior, that is the TV would turn OFF at my intended ON time and would turn back ON after the rules programmed delay time. In a way, the TV should be able to be queried or alternatively, there should be a dedicated ON IR code and a dedicated OFF IR code. I have not seen that in my short time of investigating IR codes, the only thing I see in most definitions is POWER rather than POWER_ON and POWER_OFF.

Does anybody have some insight on this?


(Mark) #60

Classic problem with power IR codes that toggle the power on-off-on-off-etc… The only way you can reliably do what you want is if the device being operated has discrete on and off IR codes. Some devices have discrete on and off codes, and some do not.


(Urmil Parikh) #61

As @mhilbush said, many devices have discrete codes for ON and OFF. These buttons are not present in plastic remotes, so difficult to find their codes.

But, there are few ways to find them:

  1. Check if you they are listed here, in which case, you can convert them to use with zmote.
  2. Many TVs I have seen, turn ON when you press CH+ or CH- keys. Find out if your TV turns ON using any other keys.
  3. If you have a little patience, you can find out if your TV has discrete codes (well, some hidden features as well :wink:) using zmote. But that would be a separate guide…

(Ari Hagman) #62

If you have a smart TV (device is in network), you can use network binding to identify if TV is on. Of course there is a small delay and you need a smart TV.

What I would like, is that zmote could raise an event when ever it can identify remote control pressed. So when I open TV with remote, I could change the room lightning.


( ) #63

@sl92656 I had the same problem and solved it by adding a power consumption measurement module in front of the device (speaker system in my case). You’ll be able to decide if the device is off (e.g. P < 5W) or on (P > 30W). See:


(Al) #64

Thank you all for the great suggestions :grinning:! I was afraid that there was not an “easy” solution available.

@Ari_Hagman unfortunately my TVs are “dumb” otherwise the WIFI route would have been the way to go (maybe it’s time to convince the boss to go for the new 60", naah…:grin:)

@urmilparikh your suggestion to “work” the original remote to find any other key that will trigger the ON action sounds good, and I’ll check that with my TV. To your 3. suggestion, that sounds interesting; I will have to investigate if writing a “code scanner” to find any hidden codes to trigger TV ON would be feasible (the downside will be, that in order to automate it, I’ll have to find a way to detect the ON state, which makes
@ThomDietrich suggestion to use switch&power meter appealing. It would make the power analysis part a little bit challenging, having a number of different devices connected in my entertainment system to one meter (DVD,Receiver,TV,…); If all breaks I could do a “cold boot” i.e. turn main power off and then on, which should initialize all devices to OFF.

Thanks again for the suggestions and I’ll report back once I figured it out!


(Mr Dix) #65

Hi Urmil,

can help me to

@urmilparikh: how can I convert remotecentral codes to zmote, so that a new button in a zmote sends this code?
Thanks for your help!

Best,
~Thomas


(Urmil Parikh) #66

Please use online converter tool from here: http://www.zmote.io/irtool

It supports conversion from Pronto HEX format used by remotecentral.


(Mr Dix) #67

Great your linked page can convert it!
I can send the code from withing openhab2 zmote plugin with a sendcode command or with a modified json file with sendkey command as well, but how do I configure one button of the zmote web app to send this new code?
Thank you for your support!


(Urmil Parikh) #68

That feature is not available right now, but it is there in our TODO list and should be available very soon.


(Mr Dix) #69

OK, great thank you for you fast reply! I can wait because it’s not an urgent requirement as long as it works from withing openhab2 and I can control the devices via Alexa.


(Adtwomey) #70

hi this looking like what I need :smiley:

I want to put my epson projector on/off and
my sony HIFI on/off and move from DVD and TV from my soney HIFI. by openhab
and my projector screen and stop at certain measurement

next will be…
when google home working with openhab… I can just say TV on. and then I get sound and my projector screen down.


( ) #71

@urmilparikh it’s been a while since this thread was active. I’m since using the binding by @Temar daily and it’s doing an excellent job. Today I wanted to add a new remote and had to find out, that nothing has changed in the Web App. Are you still actively developing it? There is for sure some room for improvement and it would be great to see an update soon!


(Urmil Parikh) #72

Yes, we haven’t opened up web app since long.

Send in your comments and we will try to accommodate…


(Patrik Patrik) #73

I got a new remote that I wanted to be integrated into openhab. I built a simple arduion IR reader (using the IRremote libary). Then I got the following readings
ON:
4CB340BF
FFFFFFFF

OFF:
4CB3748B
FFFFFFFF

How do I convert this such that Zmote can use it?


(Patrik Patrik) #74

I use rules like:
ZMote_SendIRCode.sendCommand(“38000,2,1,343,171,21,22BBBBBBBBBBB21,65CBBBCCCBBCBCBBBCCBC21,1672”)


(Urmil Parikh) #75

We don’t have a converter from IRremote library, but you can learn IR codes using zmote itself and use them with openHAB.

Visit zmote.io/irtool, enter the local IP of your zmote (yes) and hit convert button. Now press a button on your physical remote and you should see a code for that button on results area.


(Patrik Patrik) #76

It worked perfectly! Thanks!!!


(Omar) #77

hello I’m a beginner, I’m reading your post on ZMote

I installed OpenHab version 1.8 on raspberry, do you think 2 Infrared Transitter ZMote can work well?

Being a beginner, I ask you a few questions:
Where can I find the link?
Are there any examples?
Is there a database of remote controls?

Hi Garzie