it’s really interesting. thanks for sharing
i have one Rm2 and 4 mini. is there to instantiate easy this code for each device?
G
it’s really interesting. thanks for sharing
i have one Rm2 and 4 mini. is there to instantiate easy this code for each device?
G
Wow, you really have many of them!
I guess it’s doable.
If the command names contain a first part which tells you their destination room (and so the target rm_ you need to transmit the command from), you can declare and name the number of concurrent queues you need at the beginning as global vars and then feed the right queue for the corresponding device, maybe within a single rule.
I don’t have any time to tinker with it until the end of the week(if I’m lucky, else after the 16th Aug)… If you wish to move it forward, look into the DRY DP
Thanks Dario. i will go to vacation and i will have a look
Thanks for sharing !!! and contributing
@themillhousegroup, this could be self explanatory as the binding is called 2.4, but does it only work with openhab 2.4?
I’m using latest 2.5 at the moment (snapshot) and it throws errors when searching for things.
2019-08-07 10:51:23.251 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/C:/openHAB2/addons/org.openhab.binding.broadlink-2.4.0-BETA-17.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.broadlink [298]
Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.2.0.201707060032"; osgi.identity="org.openhab.binding.broadlink"; singleton:="true"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
2019-08-07 10:51:29.707 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /rest/discovery/bindings/broadlink/scan
javax.servlet.ServletException: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.broadlink.internal.discovery.BroadlinkDiscoveryService.scheduler
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) ~[?:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[90:org.eclipse.jetty.server:9.4.18.v20190429]
at org.eclipse.jetty.server.Server.handle(Server.java:505) ~[90:org.eclipse.jetty.server:9.4.18.v20190429]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) [90:org.eclipse.jetty.server:9.4.18.v20190429]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) [90:org.eclipse.jetty.server:9.4.18.v20190429]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) [80:org.eclipse.jetty.io:9.4.18.v20190429]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [80:org.eclipse.jetty.io:9.4.18.v20190429]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [80:org.eclipse.jetty.io:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804) [93:org.eclipse.jetty.util:9.4.18.v20190429]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.broadlink.internal.discovery.BroadlinkDiscoveryService.scheduler
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) ~[?:?]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[?:?]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
... 15 more
Caused by: org.glassfish.jersey.server.ContainerException: java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.broadlink.internal.discovery.BroadlinkDiscoveryService.scheduler
at org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:278) ~[?:?]
at org.glassfish.jersey.servlet.internal.ResponseWriter.failure(ResponseWriter.java:260) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:509) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:334) ~[?:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[?:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[?:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) ~[?:?]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) ~[?:?]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[?:?]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
... 15 more
Caused by: java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.broadlink.internal.discovery.BroadlinkDiscoveryService.scheduler
at org.openhab.binding.broadlink.internal.discovery.BroadlinkDiscoveryService.waitUntilEnded(BroadlinkDiscoveryService.java:56) ~[?:?]
at org.openhab.binding.broadlink.internal.discovery.BroadlinkDiscoveryService.startScan(BroadlinkDiscoveryService.java:44) ~[?:?]
at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.startScan(AbstractDiscoveryService.java:211) ~[?:?]
at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:382) ~[?:?]
at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScans(DiscoveryServiceRegistryImpl.java:367) ~[?:?]
at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:216) ~[?:?]
at org.eclipse.smarthome.io.rest.core.internal.discovery.DiscoveryResource.scan(DiscoveryResource.java:97) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[?:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[?:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[?:?]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) ~[?:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[?:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[?:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[?:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) ~[?:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[?:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[?:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) ~[?:?]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) ~[?:?]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[?:?]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
... 15 more
cheers!
Well, it seemed there was a couple of things that I remedied to get it working.
1, Openhab had cached an older version (2.2) of the binding and had that active instead of the new one.
I stopped it and uninstalled it via karaff.
Started the new binding and didn’t have any logged errors.
But I could not get the RM3 to be discovered, but manually it worked like a charm.
I think somehow my network is probably blocking multicast (?).
Great binding and thank you!
Hello, i’m sorry but I filled the fields as indicated and I have a warning that appears at the top of the page which mentions in red that the MAC address does not correspond to a RM2
I experienced same error and reason was that RM bridge was running on phone not connected on same wifi ssid as RM3. Could you check if both android device with RM bridge and your broad link are on same network. RM bridge must be running (green circle with word Started)
Yes the RM bridge is well started with the green circle and it is on the same network because I run http://rm-bridge.fun2code.de/rm_manage/code_learning.html with chrome on the same phone!
I also tested by connecting my tablet (which is also on the same SSID as the phone) on http://rm-bridge.fun2code.de/rm_manage/code_learning.html and I have the same error
if I insist several times I then have an error HTTP/404
Hi, I have a RM3 mini and I downloaded the latest bingind (rev.17) but can’t find the RM3 ?
Is there any way to add it manually?
Thanks Lorenzo
I was not probably clear - could you confirm your broadlink device is on same wifi SSID as your phone where you run RM bridge please
Hi, yes you can add it manually:
097628343fe99e23765c1513accf8b02
in Authentication Key field562e17996d093d28ddb3ba695a2e6f58
in IV fieldif you have static IP - keep on Static IP switch,
if your RM3 get address randomly by DHCP - switch Static IP to OFF
now click on add (blue circle on top) and it’s done
I confirm that RM bridge and the RM3 mini box are of course the same SSID wifi … by cons I entered the keys you gave in the post following your answer to know:
097628343fe99e23765c1513accf8b02 for the authentication key
562e17996d093d28ddb3ba695a2e6f58 for the key IV
and my thing has become active
Now it has evolved: I manage to enter without error manually …
Thank you
now how do I insert these codes?
In my item
Codes are stored in file broadlink.map located in transform folder (in case of openhabian it is /etc/openhab2/transform )
these codes you need to obtain by one of available method, easiest is the one where you have issue - by recording them in RM bridge but unfortunately I can not help you more with it, all my knowledge of this was already shared…
Each line contain command name = code
example of my file with codes for hatari fan:
HATARI_FAN_ON = 260058000001299313121337131213121312131213111412133614121336143713361436143613371337131213361437131114121312131114111337141113131237133714361337120005200001294913000c560001294913000d05
HATARI_FAN_OFF = 2600500000012993141112381312121313111412121313111437131114371336133714361337123813371312131212131337121313111411131313361337143613121436133712381300051f0001294912000d050000000000000000
HATARI_FAN_SWING = 260058000001299412131139121311141213121311141213123812121338123810391338113811391238121312381213121311141213121310151238101511381139133811381139120005200001284a11000c580001284a11000d05
HATARI_FAN_TIMER = 260058000001289413111437121214121015121214111115123714111337133711391139133711391139131211131239101412131411111411141337113911141139113910391239110005210001264b12000c580001264c11000d05
HATARI_FAN_NATURAL = 260058000001269511141238111411141114111411141114113910151139103912391039113912381139111411141114111411141114101511141139113910391239103911391139110005220001264b11000c590001264b12000d05
Next step is to have command item, no codes are inserted here - your definition in screen in last post is OK (my item name is: RM3_LIVING_HATARI_FAN)
Finally add this item to sitemap with defined mappings between your buttons and broadlink command names defined in broadlink.map file:
Switch item=RM3_LIVING_HATARI_FAN label="Dinning room fan[]"mappings=[HATARI_FAN_ON="On", HATARI_FAN_OFF="Off",HATARI_FAN_SWING="Swing",HATARI_FAN_NATURAL="Natural",HATARI_FAN_TIMER="Timer"]
Pay attention to [] in label - this is here to avoid displaying command you choose before buttons.
Hope it help
Karel
I could use some advice, please. I’m getting in my log: Master_TV_Vol_UP predicted to become NULL
It never sends an IR code, also checked with a digital camera no flash of light.
I am not sure where I messed up.
Any help would greatly be appreciated.
IR code acquired from: Broadlink Manager
Running: openHAB 2.4.0-1
Binding:: org.openhab.binding.broadlink-2.4.0-BETA-17.jar
Log:
2019-08-11 13:43:53.552 [ome.event.ItemCommandEvent] - Item 'Master_TV_Vol_UP' received command TV_VOL_UP
2019-08-11 13:43:53.561 [nt.ItemStatePredictedEvent] - Master_TV_Vol_UP predicted to become NULL
Items:
String Master_TV_Vol_UP { channel="broadlink:rm3:c8:f7:42:**:**:**:command" }
Map:
TV_VOL_UP = 26005400491428131614281316142714151515142813161416141515150003364D1428131614271415152714181116142813161415151514160003354E142714151527141514281316141614271415151515151415000D0500000000
Sitemap:
Switch item=Master_TV_Vol_UP label="Volume" mappings=[TV_VOL_UP="UP"]
I think issue is in your item file - delimiter for mac in channel code can not be “:” in your screenshot of Thing name delimiter is “-”
tour item should look like this:
String Master_TV_Vol_UP { channel="broadlink:rm3:c8-f7-42-**-**-**:command" }
you can check in Paper UI in thing configuration if your item is linked to channel (my guess it is empty now)
Yup, that was it works like a champ
Thank you for pointing that out.
Thanks … it work as a charme
Lorenzo
Hey @nakh_Home ,
I have been researching a solution to your issue but so far haven’t been able to shrink the rules very much.
You would for sure need in the items,
Instead of RM_out
String RM_one {channel="broadlink:rm3:_____xyz______:command"}
String RM_two {channel="broadlink:rm3:_____xyz______:command"}
String RM_three {channel="broadlink:rm3:_____xyz______:command"}
String RM_four {channel="broadlink:rm3:_____xyz______:command"}
String RM_five {channel="broadlink:rm3:_____xyz______:command"}
instead of RM3_Busy_lock
Switch RM_Busy_one
Switch RM_Busy_two
Switch RM_Busy_three
Switch RM_Busy_four
Switch RM_Busy_five
In the vars
instead of rfqueue
var ConcurrentLinkedQueue<String> queue_one = new ConcurrentLinkedQueue()
var ConcurrentLinkedQueue<String> queue_two = new ConcurrentLinkedQueue()
var ConcurrentLinkedQueue<String> queue_three = new ConcurrentLinkedQueue()
var ConcurrentLinkedQueue<String> queue_four = new ConcurrentLinkedQueue()
var ConcurrentLinkedQueue<String> queue_five = new ConcurrentLinkedQueue()
and instead of rf433timer
var Timer rfTimer_one = null
var Timer rfTimer_two = null
var Timer rfTimer_three = null
var Timer rfTimer_four = null
var Timer rfTimer_five = null
i would suggest you call your comman d names in broadlink map somehting like
one_lightson = [hexcode here]
two_smartplugtoggle = [hexcodehere]
three_fanoff = [hexcodehere]
four_lightson = [hex]
five_commandname =...
where one, two, three, four , five are the rm device you want the command to be transmitted from
the beginning of the rule could look like:
rule "RF433 buffering in a single rule"
when Item RM3_in received command
then
var String lastCommand=receivedCommand.toString
if(lastCommand.contains ("one")){
Same rule block as before only swapping out the rf433timer
, RM3_out
, RM3_Busy_lock
and rfqueue
for the ones containing “one
”
Once you close this block than you shoud follow up with the same process for the ones containing, “two”, “three”,“four” and “five”
this way a single rule feeds 5 different queues and respective timers with their own commands.
I was hoping to be able to help you shrink the code more, but i’ve been facing an issue:
While it’s easy to compare item name/label to a string variable’s content, apprently the same isn’t true for variable names (like timer names and queue names). Searching the net i’ve seen most people suggest using hashmaps to achieve similar things, but ‘how to do it’ in this situation is above my skills. , so this is the best i can offer…
I am trying to send RF command to control my roller shutters, but I cannot get it to work:
.map file:
RS_LIVING1_UP=b200be0044090b4243094409430a0a424409440943090b424409430a43090b42430a0b4144090b00021144090b424309440944090b424309440943090c414409430a43090b42430a0b4243090b00021243090b424409430944090b42430a430944090b42430a430944090b4243090b4244090b00021144090b4144094409430a0b414409430a43090b424409430944090b4244090b4243090b00021243090b424408440944090b4243094409430a0a4244094409430a0a4244090b4244080b0005dc00000000000000000000
.items file:
String RS_LIVING1 "Wohnen 1" { channel="broadlink:rm2:**-**-**-**-**-**:command" }
.sitemap file:
Switch item=RS_LIVING1 icon="rollershutter" mappings=[RS_LIVING1_UP="Hoch", RS_LIVING1_STOP="Stop", RS_LIVING1_DOWN="Runter"]
But when I click on the switch, the log shows always this:
2019-08-16 23:05:32.570 [ome.event.ItemCommandEvent] - Item 'RS_LIVING1' received command RS_LIVING1_UP
2019-08-16 23:05:32.576 [nt.ItemStatePredictedEvent] - RS_LIVING1 predicted to become NULL
In PaperUI, in the control view, the item is listed under the thing “Broadlink RM2”…
Any help appreciated!
edit:
I rebootet my raspberry pi, now I get this error, when I click on the switch:
2019-08-17 08:47:15.162 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:**-**-**-**-**-**[^]: Failed to get MAP transformation service for thing Broadlink RM2; is bundle installed?
What does that mean?
edit2:
OK, someone should add "install add-on ‘Map Transformation’ " to the installation instructions…
How can I send multiple commands with one click?
I want to open/close all roller shutters in a click…