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:
Check if you they are listed here, in which case, you can convert them to use with zmote.
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.
If you have a little patience, you can find out if your TV has discrete codes (well, some hidden features as well ) using zmote. But that would be a separate guideā¦
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.
@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!
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.
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.
@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!
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
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.
Well, it has been a while, but I do have a system running now that is fairly robust. I resulted to using a Sonoff POW device to monitor the current consumption of my entertainment system devices (Receiver, TV, cable box). Unfortunately the consumption of some of the devices is not distinctively different to determine which one is actually ON (TV ~ 0.65A, Receiver ~ 0.36A, cable box ~ 0.38A). I was lucky enough to find two different codes for the receiver, one for ON and one for OFF. This allows me to at least determine through some logic if the cable box is ON or OFF.
Another part of the logic is that the TV consumption is quite different with a dark picture (i.e. cable box off) vs. actually seeing something on TV. The Grafana screen shot below shows the current consumption signature for a 24h period.
What stands out is that the current signal is noisy, especially when the TV is running and light/dark scenes combined with loud dynamic sound is active. To overcome this I had to low-pass filter the current consumption signal. Additionally I had to implement some signal qualification to ignore current sensor signal drop outs (single 0A readings) and obvious false readings (>1.75A).
A second feature I implemented is to turn ON/OFF the receiver automatically when I use the regular TV remote to just turn the TV ON or OFF. This saves energy since turning OFF the Receiver gets forgotten often. For this feature I use the low pass filter value and calculate a high enough delta current consumption value to detect the switching event. A Grafana shot is shown below for a TV OFF switching event.
Note: I do reset the filter value to the actual value after the switching event and disallow further switching until the dI/dt of the filter falls below a threshold (0.1A) to make the detection more stable.
So in summary it has been quite a lengthy and fun code development project with some challenges to get everything working rightā¦
I just wanted to post briefly to thank @Temar for the brilliantly engineered plugin. I didnāt really know what to expect, but I figured it was worth getting a Zmote and giving it a try. Within an hour or so I had the zmote programmed with codes from my remotes, had downloaded the .json files, set up the zmote binding, and plugged it into the logic Iād already writtenā¦ and it appears to work flawlessly. Thanks for doing such an amazing job of the binding (and thanks also to the developers of the Zmote if youāre also following this thread). An absolutely perfect add-on to OH2.
ETA: I see @urmilparikh appears to be the person to thank for the excellent design and performance of the Zmote - so thank you!