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.
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.
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.
@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:
Thank you all for the great suggestions ! 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…)
@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!
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!
@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!