xsherlock Geschrieben December 28, 2015 at 22:28 Geschrieben December 28, 2015 at 22:28 Hi, I'm using io16 to drive inexpensive relay board to do light switching in home. I'd love to see a way to reverse the logic of the switch in openhab. When the output is defined as true in the example. tinkerforge:io16outb0.defaultState=true The relay is disengaged, does not take power, but the switch in the site map is ON. I'd love see it OFF in that state at that moment Of course it is possible to start the output in the defaultstate=false. But that implies some annoyances that are hard to accept. First the setup starts with applying about 0.4W of power per relay. that will end up with unnessesary 20-30W residual load on the whole house during the day when the light are off. Second in case openhab crashes/reboots i end up with all ligths on !! all the time. So the most elegant way would be to revese the logic on the sitemap only, is there a way to do it? regards Maciej Zitieren
theo Geschrieben January 8, 2016 at 20:08 Geschrieben January 8, 2016 at 20:08 May be a mapping could help you out: https://github.com/openhab/openhab/wiki/Explanation-of-Sitemaps#mappings Zitieren
xsherlock Geschrieben January 8, 2016 at 21:47 Autor Geschrieben January 8, 2016 at 21:47 My openhab skills still wait to get improved in order to be sure if I can make it with the mapping. In the meantime I ordered other relay board that has jumpers to do set the low/high logic. Unfortunately it is 12V so it will require additional power. It looks that all 5v 8x relay boards on the internet are the clones of the same design and take low signal to energize the relay. For some reason. Zitieren
theo Geschrieben January 8, 2016 at 21:59 Geschrieben January 8, 2016 at 21:59 For the mapping thing you can try this: Switch item=<itemname> mappings=["OFF"="ON", "ON"="OFF"] Zitieren
xsherlock Geschrieben January 9, 2016 at 20:50 Autor Geschrieben January 9, 2016 at 20:50 Thanks for the hint. I did check this solution, but unfortunately it come with hell lot of compromises. First the switch is no longer a switch in a gui but a set of two buttons. Second the bulb icon is still reversed Third the group master switch works on the original state and not mapped one. -switches the relays on when master_off is pressed So it is a dead end. Maciej Zitieren
theo Geschrieben January 9, 2016 at 21:07 Geschrieben January 9, 2016 at 21:07 That's bad. Another way solving this problem could be using "virtual" switch items which are connected to the ui and rules which map the events from the "virtual" switches to the io-16 devices. Theo Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.