Navigation

    Discussion Forum to share and further the development of home control and automation, independent of platforms.

    SmartHome Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Unsolved
    (Last Updated: April 3, 2021)
    • Vera-openLuup Ecobee Plugin

      rafale77

      Latest Vera Ecobee Plugin:

      rafale77/vera-ecobee rafale77/vera-ecobee

      Vera Plugin for ecobee Thermostat. Contribute to rafale77/vera-ecobee development by creating an account on GitHub.

      Plugins
    • openLuup: Tasmota MQTT Bridge

      akbooer

      Feedback / solutions for openLuup's built-in Tasmota MQTT bridge.

      Plugins
    • openLuup: Shelly Bridge plugin

      akbooer

      Feedback / solutions with openLuup's built-in Shelly bridge.

      Plugins
    • Generic support for vacuums

      therealdb

      I've got myself a nice Ecovacs Deebot 950, because one of the Roombas is getting really old (12 years and still going strong). It's my first one connected to WiFi, since the others are legacy. I've found a nice mqtt library and it's already pushing to my broker in real time, but I'm wondering if there's a generic device template and/or service, otherwise I'll start building one and I'll try to keep it as much generic as possible.

      Plugins
    • BroadLink Mark II plugin

      A

      The plugin has been updated to ver 0.56 which improves the RF learning procedure. It also recognises some of the newer RM4 devices (thanks Bruce Lacey).

      Existing uses just need to upload the "L_BroadLink_Mk2_1.lua" file.

      RF learning has been improved but is never particularly reliable. You can invoke testing by executing this code in the Lua Test box:

      local DeviceID = the_id_of_the_IR_child_device luup.call_action('urn:a-lurker-com:serviceId:IrTransmitter1', 'LearnRFCode', {}, DeviceID) return true

      Running the code illuminates the LED on the BroadLink device. If you do nothing at this point, the learning times out after about 24 seconds and the result is "No RF code was learnt".

      While in the learning mode, tap the remote button to be learnt, every 2/3 of a second or so. If the LED goes out (typically after about say 5 seconds) some result was learnt.

      The result can be found in the parent device by looking at the variable "LearntRFCode". However, it is far easier to look at the log file, which logs the process as it proceeds and also the result. You need to learn a few results to try and determine if the results are at all consistent.

      Plugins
    • Homebridge to Openluup

      R

      Sharing what I believe is a great way to add support to devices that used to work but since existing plugin haven't been maintain by the original authors (or any other developer in the community) have stopped working as they've abandon or moved to other platform...

      Homebridge has a large and very active community and I think this type of plugin will a good way to benefit from it.

      It will bring any device that have been configured in homebridge into openluup.

      Currently it support, thermostat (Nest and others), Switches (Specially MyQ), Dimmers, Switches, Motion Sensors, Door Lock (Open/close) Support to other type of device can easily be added.

      Homebridge2Openluup
      Installation:

      upload the files to /you_openluup_directory/files/ create a new device with D_Homebridge2openluup1.xml

      Screen Shot 2021-03-14 at 12.55.29 PM.png

      Set your hombredige IP, username, password to the deivce's attributes

      Screen Shot 2021-03-14 at 12.57.00 PM.png

      Capture the uuid of the device you would like to bring from Homebridge into openluup by looking at your openluup logs when starting

      Screen Shot 2021-03-14 at 1.00.53 PM.png

      based on the device type, set DeviceList Variable

      Screen Shot 2021-03-14 at 1.02.51 PM.png

      T for thermostat
      D for dimmers
      S for switches
      G for garage doors
      L for Locks
      A for motion sensors

      and build a string device type are delimited by a ; (semicolong) and device's uui by a , (comma) like this:
      T:homebridge_thermostat1_uuid,homebridge_thermostat2_uuid;D:homebridge_dimmer1_uuid,homebridge_dimmer2_uuid etc

      This still in beta, would love to add async next and support to shades and other sensors.

      Plugins
    • upnp event proxy

      A

      I've made some mods to Futzle's upnp event proxy and placed it in the AltApp store (with her permission). ie it's here in GitHub.

      Now it seems some people say it works with openLuup already. However the version released by Futzle required two things in order to function:

      the file L_UPnPProxy1.lua was expected to be compressed, as it would be on a Vera eg: L_UPnPProxy1.lua.lzo

      the hardware needs to be running OpenWrt; ie as per Vera does.

      I modified the code to fix point 1) (see the script below) but I would like to see point 2) resolved, so a RasPi can be used. That is modify the script to allow a deamon to be run on a RasPi without fiddling around with say "/etc/rc.local".

      So has any one got the proxy going on any hardware that is NOT using OpenWrt ? I'm unsure how to do it.

      Basically this script and/or the script it includes needs to be modified or even merged to suit. You'll note that after the shebang, it requires the file "etc/rc.common" (reproduced further below). The latter appears to be some sort of template file that is overriden as required by the first script. It cites "$IPKG_INSTROOT", whatever that is. However it may be possible to make use of it somehow on a RasPi?

      #!/bin/sh /etc/rc.common # Copyright (C) 2007 OpenWrt.org START=80 PID_FILE=/var/run/upnp-event-proxy.pid PROXY_DAEMON=/tmp/upnp-event-proxy.lua start() { if [ -f "$PID_FILE" ]; then # May already be running. PID=$(cat "$PID_FILE") if [ -d "/proc/$PID" ]; then COMMAND=$(readlink "/proc/$PID/exe") if [ "$COMMAND" = "/usr/bin/lua" ]; then echo "Daemon is already running" return 1 fi fi fi # openLuup: Look for the uncompressed proxy daemon Lua source. if [ -f /etc/cmh-ludl/L_UPnPProxyDaemon.lua ]; then PROXY_DAEMON_UC=/etc/cmh-ludl/L_UPnPProxyDaemon.lua elif [ -f /etc/cmh-ludl/files/L_UPnPProxyDaemon.lua ]; then PROXY_DAEMON_UC=/etc/cmh-ludl/files/L_UPnPProxyDaemon.lua # Vera 3: Else look for the compressed proxy daemon Lua source. elif [ -f /etc/cmh-ludl/L_UPnPProxyDaemon.lua.lzo ]; then PROXY_DAEMON_LZO=/etc/cmh-ludl/L_UPnPProxyDaemon.lua.lzo elif [ -f /etc/cmh-lu/L_UPnPProxyDaemon.lua.lzo ]; then PROXY_DAEMON_LZO=/etc/cmh-lu/L_UPnPProxyDaemon.lua.lzo fi if [ -n "$PROXY_DAEMON_UC" ]; then cp "$PROXY_DAEMON_UC" "$PROXY_DAEMON" elif [ -n "$PROXY_DAEMON_LZO" ]; then /usr/bin/pluto-lzo d "$PROXY_DAEMON_LZO" "$PROXY_DAEMON" fi # Close file descriptors. for fd in /proc/self/fd/*; do fd=${fd##*/} case $fd in 0|1|2) ;; *) eval "exec $fd<&-" esac done # Run daemon. /usr/bin/lua "$PROXY_DAEMON" </dev/null >/dev/null 2>&1 & echo "$!" > "$PID_FILE" } stop() { if [ -f "$PID_FILE" ]; then PID=$(cat "$PID_FILE") if [ -d "/proc/$PID" ]; then COMMAND=$(readlink "/proc/$PID/exe") if [ "$COMMAND" = "/usr/bin/lua" ]; then /bin/kill -KILL "$PID" && /bin/rm "$PID_FILE" return 0 fi fi fi echo "Daemon is not running" return 1 }

      And here is "etc/rc.common" as found in OpenWrt initscripts. Note the command actions it implements - in particular disable & enable, which set up Sxxy (start) & Kxxy (stop) files in the directory "etc/rc.d", which is not found in the RasPi directory structure:

      #!/bin/sh # Copyright (C) 2006-2009 OpenWrt.org . $IPKG_INSTROOT/etc/functions.sh initscript=$1 action=${2:-help} shift 2 start() { return 0 } stop() { return 0 } reload() { return 1 } restart() { trap '' TERM stop "$@" start "$@" } boot() { start "$@" } shutdown() { stop } disable() { name="$(basename "${initscript}")" rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name } enable() { name="$(basename "${initscript}")" disable [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}" } enabled() { name="$(basename "${initscript}")" [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ] } depends() { return 0 } help() { cat <<EOF Syntax: $initscript [command] Available commands: start Start the service stop Stop the service restart Restart the service reload Reload configuration files (or restart if that fails) enable Enable service autostart disable Disable service autostart $EXTRA_HELP EOF } . "$initscript" ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}" list_contains ALL_COMMANDS "$action" || action=help [ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :' $action "$@"
      Plugins
    • openLuup: SmartSwitch plugin

      akbooer

      This plugin was updated by @vosmont to run under openLuup (and possibly UI7.)

      @DesT recently asked for a slight addition to its functionality, so I'm adding this thread to discuss the changes.

      Plugins
    • Barometer

      rafale77

      Not quite a plugin but just the addition of a barometer device to be used for various integrations (Domoticz or Home Assistant)

      Intructions:

      Drop the content of this zip file in a folder openLuup has access to (I put mine into the cmh-ludl/files to pretend these were downloaded from a vera)
      then create a device and use D_BarometerSensor1.xml as the device file and I_GenericSensor1.xml for the execution file or anything else actually depending on what your integration is.

      Barometer.zip

      Plugins
    • MQTT Plugin

      rafale77

      I am looking at making openLuup to act as an MQTT client for a variety of applications. I may write a plugin for it myself based on either of these two libraries:

      xHasKx/luamqtt xHasKx/luamqtt

      luamqtt - Pure-lua MQTT v3.1.1 and v5.0 client. Contribute to xHasKx/luamqtt development by creating an account on GitHub.

      Yongke/luamqttc Yongke/luamqttc

      A lua mqtt client which support MQTT version 3.1.1 - Yongke/luamqttc

      Still have to learn the details of how it would work. If people have ideas, feel free to post here!

      Plugins
    • Iphone locator - Grafana?

      PerH

      Anyone here that has visualized the location from iphone locator in grafana?

      found the "World Map" panel for grafana, but haven't figured out how to make it display yet..

      Plugins
    • Virtual Pronto Remote plugin

      A

      Well, I disappeared down a rabbit hole on a different mission and resurfaced with this monstrosity.

      What does it do?

      It translates button functions for various (certainly not all) IRP protocols to Pronto codes. These can then be sent by a plugin that sends Pronto Codes to IR transmitters - such as the BroadLink Plugin or the GC100 Plugin (or similar).

      The IRP protocol "Device", "Subdevice" and "Function" numbers are stored in a json file as buttons for "virtual remotes".

      So you could have say three physical IR transmitters and want to command different AV devices (ie TVs, AVR, Xmas tree, etc) in the vicinity of those various IR emitters.

      The button codes are far less cumbersome than heaps of pronto codes. You can set up a virtual remote for each AV device in the json file. Each physical emitter can be assigned to any virtual remote. And away you go!

      Well - you already have a pile of pronto codes already running just fine? However, as the plugin "manufacturers" pronto codes, you could also use it to scan/search for functions for any AV device you may have. GitHub has an example for Pioneer: SearchForButtonCodes.lua

      Read about the IRP protocol

      Find "Device", "Subdevice" and "Function" codes:

      IR database

      Plugin details in:

      GitHub

      Install via AltUI:

      Plugins available via AltUI

      Version 0.51
      Initial release.

      Version 0.52
      Add RC6 format: includes Windows Media Center based items eg Intel NUCs, Xboxes, Kodi, etc

      Panasonic plasma TV json.jpg

      Panasonic plasma TV web page.jpg

      Plugins
    • Alexa guard via Vera-Alexa and spoken command support

      therealdb

      So, Amazon recently released the ability to execute spoken commands.

      dbochicchio/VeraAlexa: Alexa plug-in for Vera and openLuup. (github.com)

      Using my plug-in, you could just do something like this:

      luup.call_action("urn:bochicchio-com:serviceId:VeraAlexa1", "RunCommand", {Command="-e textcommand:'Alexa, I’m leaving' -d 'Bedroom'"}, 666)

      Or any spoken command that's not directly accesible via routines. Something like

      "Play music everywhere"
      "TV volume to 32"
      "Pause TV"

      and much more 🙂

      Give it a try!

      Plugins
    • Telegram Plug-in to send text, images and video notifications

      therealdb

      As another one asked for it on the other forum, I finally created a new plug-in for Telegram notifications: https://github.com/dbochicchio/vera-Telegram/

      You can:

      send text messages send (still) images send videos (gif or mp4) send silent notifications

      I remember @CatmanV2 was searching for something similar (maybe?).

      I'm using it to send push notifications to me and my wife, using a group. I have my own code streaming my cameras and sending a video as gif based on certain events (ie motion sensors or door/entryways left open). While this part is not included into the plug-in, if you're able to get a video yourself (by pointing to a URL), you'd good to go. Still images from cams (or, let's say, your favorite weather map, or any video/gif/image on the Interner ot local) are supported as well.

      100% compatible with bot Vera and openLuup (where it was developed, anyway).

      Feel free to ask questions or suggest new features.

      Plugins
    • Setting up RFXCom Plugin in standalone OpenLuup

      PerH

      Currently there's no beginners guide to installing RFX plugin on OpenLuup without Vera that i could find, so i'd thought i'd make one.

      This is made on Debian 10.6 (Buster).

      First: Download the files. The thread on the Vera forum is the place to find the newest version (Currently 1.96), but i found it to have several issues in Openluup.
      Auto create makes multiple instances of sensors, and I had a couple of "all sensors disappeared" instances!

      I use 1.41, which works perfectly as long as you can use Type1/Type2/ext/ext2 FW.
      Download from this thread

      Once you got the files into /cmh-ludl/ you can proceed to create the device in OpenLuup. In devices - click "Create".

      2fd93a27-c760-49bd-b984-9443a905837e-image.png

      Sometimes its nessecary to move the RFX..Png file to /cmh-ludl/icons/ to get the correct icon in OpenLuup.

      Next is to get the RFX up and running, for that you need ser2net. Installation instructions

      Ser2net needs to find the USB, and to fint the address, do this:

      user@device:~$ cd /dev/serial/by-id/ user@device:/dev/serial/by-id$ ls usb-0658_0200-if00 usb-RFXCOM_RFXtrx433_A118TU8K-if00-port0 user@device:/dev/serial/by-id$

      this ID can be used in the /etc/ser2net.conf, at the end of the file:

      # found in /usr/share/doc/ser2net/examples BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n 2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner ... 3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner 3485:raw:0:/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A118TU8K-if00-port0:38400 8DATABITS NONE 1STOPBIT

      The port can be whatever you want (almost), the default in the RFX plugin is 10000
      Save and restart ser2net.

      Back in OpenLuup, go to the "Attributes" tab of the RFX Plugin,and ensure that the IP address is correct:
      6391e20b-6f4c-4101-8633-6ee1e01fb905-image.png I'm using a local USB, but this might as well be on a different device on your network.

      Now, go to the "Variables", and insert the correct port number in "IPPort" variable.

      If all goes well, the plugin should be good to go after a Luup Reload!

      Plugins
    • Virtual Devices Plug-in update (with async HTTP support)

      therealdb

      I just published an update to my Virtual Devices Plug-in.

      What's new in version 1.5:

      support for async HTTP (out of the box on openluup, just download https://github.com/akbooer/openLuup/blob/master/openLuup/http_async.lua and copy with the plug-in files on Vera) experimental support for setpoints management in Virtual Heaters (you know, the device will turn itself off if temperature is reached, and automatically on when temperature is not beyond the setpoint) external device for temperature in Virtual Heaters (just set urn:bochicchio-com:serviceId:VirtualHeater1/TemperatureDevice variable) small fixes, stabilization

      Grab your copy from https://github.com/dbochicchio/vera/tree/master/VirtualDevices

      As always, 100% local, 100% apps friendly, 100% supported by Alexa (and Google Home, I guess).

      Plugins
    • iPhone Locator force refresh error

      CatmanV2

      Anyone any idea what this might mean? We have two iPhones. Mrs C's and mine. Mine is totally fine. Mrs C's says 'forceRefresh error, check logs / 300 s' and refuses to tell me where she is 😉

      Same settings in both instances (in fact I have created a second instance for Mrs C and that does the same). I know the username / password are correct, and the iCloud list populates in the right manner.

      The log has this:

      2020-07-05 11:58:55.866 luup_log:25: IPhoneLocator: loop: an error occurred during execution of forceRefresh():[string "L_IPhone.lua"]:639: attempt to index local 'obj' (a nil value) 2020-07-05 11:58:55.866 luup.variable_set:: 25.urn:upnp-org:serviceId:IPhoneLocator1.MsgText was: 2020-07-05 11:58 now: forceRefresh error, check logs / 300 s #hooks:0

      Any ideas?

      Cheers

      C

      Plugins
    • iPhoneLocator: Alternate Map Servers

      rafale77

      Replacing Google Map with

      Bing Map
      rafale77/IPhoneLocator rafale77/IPhoneLocator

      IPhone Locator plugin for Micasaverde VERA and openLuup - rafale77/IPhoneLocator

      Here Map
      rafale77/IPhoneLocator rafale77/IPhoneLocator

      IPhone Locator plugin for Micasaverde VERA and openLuup - rafale77/IPhoneLocator

      Both tested on openLuup

      Plugins
    • More info about alarm devices/services

      therealdb

      So, I want to expand my Virtual Devices Plugin, and add support for alarms.

      I recently reverse engineered my own alarm panel (it exposes an HTTP server, so I just watched their app and rebuilt the login), so I want to expose its event better. Right now, I just added a new security sensor in order to understand when alarm is active, and a couple of notifications to send via Telegram who activated/deactivated the alarm.

      It will probably be cool to provide something representing an alarm panel, or an alarm partition, or a security key (to log/show who activated/deactivated the alarm, in which mode and when). Right now I'm tracking this thing via various zwave/wifi sensors, but I wanted to improve and maybe benefit others.

      I searched a bit and I founded S_AlarmPartition2.xml and a plethora of very old forum posts, very old plug-ins and I'm not sure where to start. Thanks!

      Plugins
    For those who registered but didn't received the confirmation email, please send an email to support@smarthome.community with the email you used

    BroadLink Mark II plugin

    Plugins
    3
    8
    107
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      a-lurker last edited by

      The plugin has been updated to ver 0.56 which improves the RF learning procedure. It also recognises some of the newer RM4 devices (thanks Bruce Lacey).

      Existing uses just need to upload the "L_BroadLink_Mk2_1.lua" file.

      RF learning has been improved but is never particularly reliable. You can invoke testing by executing this code in the Lua Test box:

      local DeviceID =  the_id_of_the_IR_child_device
      
      luup.call_action('urn:a-lurker-com:serviceId:IrTransmitter1', 'LearnRFCode', {}, DeviceID)
      
      return true
      

      Running the code illuminates the LED on the BroadLink device. If you do nothing at this point, the learning times out after about 24 seconds and the result is "No RF code was learnt".

      While in the learning mode, tap the remote button to be learnt, every 2/3 of a second or so. If the LED goes out (typically after about say 5 seconds) some result was learnt.

      The result can be found in the parent device by looking at the variable "LearntRFCode". However, it is far easier to look at the log file, which logs the process as it proceeds and also the result. You need to learn a few results to try and determine if the results are at all consistent.

      akbooer 1 Reply Last reply Reply Quote 0
      • akbooer
        akbooer @a-lurker last edited by

        @a-lurker said in BroadLink Mark II plugin:

        You can invoke testing by executing this code in the Lua Test box

        Presumably, you can also access this from either AltUI or the openLuup console Action page for the device, which would be even easier.

        1 Reply Last reply Reply Quote 0
        • A
          a-lurker last edited by

          Yep - many ways to skin a cat but you might only have a dog to work with.

          1 Reply Last reply Reply Quote 0
          • R
            ronluna last edited by ronluna

            I tested the latest changes to add support for the RM4 Pro and it created a "IR" Child although it did not list any of the devices that have been created inside the RM4 Pro itself (Probably because is an RF device and that child was not created?). Also the IP set in the plugin attributes is different than the IP This is what the logs are showing:

            2021-04-02 08:53:44.604   luup_log:82: BroadLink_Mk2 debug: The BroadLink device at IP address 10.1.11.126 and of type 0x4e2a is not known to this plugin
            
            

            I do have another Broadlink device in the network so I guess is trying to discover that one as well.

            2021-04-02 08:53:44.557   openLuup.scheduler:: [3] Alternate App Store device startup completed: status=true, msg=OK, name=AltAppStore
            2021-04-02 08:53:44.557   openLuup.scheduler:: [82] BroadLink-Mk2 device startup
            2021-04-02 08:53:44.557   luup_log:82: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2
            2021-04-02 08:53:44.557   luup_log:82: BroadLink_Mk2 debug: Using: Lua 5.1
            2021-04-02 08:53:44.557   luup_log:82: BroadLink_Mk2 debug: 0.57 --> PluginVersion
            2021-04-02 08:53:44.558   luup_log:82: BroadLink_Mk2 debug: Using: dkjson
            2021-04-02 08:53:44.559   luup_log:82: BroadLink_Mk2 debug: Broadcasting discovery message
            2021-04-02 08:53:44.559   luup_log:82: BroadLink_Mk2 debug: 10.1.11.22
            2021-04-02 08:53:44.603   luup_log:82: BroadLink_Mk2 debug: 10.1.11.126
            2021-04-02 08:53:44.604   luup_log:82: BroadLink_Mk2 debug: Rx'ed a discovery response: rxMsg length = 128
            
            5A A5 AA 55 5A A5 AA 55  00 00 00 00 00 00 00 00   Z..UZ..U........
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
            E5 D6 00 00 2A 4E 07 00  00 00 DD 8A EB A7 DF 24   ....*N.........$
            00 00 00 00 2A 4E 0A 01  0B 7E DD 8A EB A7 DF 24   ....*N...~.....$
            E5 A5 A5 E5 85 8B E6 96  AF E7 A9 BA E8 B0 83 00   ................
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 02 01   ................
            
            2021-04-02 08:53:44.604   luup_log:82: BroadLink_Mk2 debug: Looks like the Cloud bit is set - that's not good
            2021-04-02 08:53:44.604   luup_log:82: BroadLink_Mk2 debug: Friendly name: e5a5a5e5858be696afe7a9bae8b083
            2021-04-02 08:53:44.604   luup_log:82: BroadLink_Mk2 debug: The BroadLink device at IP address 10.1.11.126 and of type 0x4e2a is not known to this plugin
            2021-04-02 08:53:45.604   luup_log:82: BroadLink_Mk2 debug: Number of BroadLink devices found is 1
            2021-04-02 08:53:45.604   luup_log:82: BroadLink_Mk2 debug: Header to be sent follows (ex checksum):
            
            5A A5 AA 55 5A A5 AA 55  00 00 00 00 00 00 00 00   Z..UZ..U........
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
            00 00 00 00 9B 64 65 00  00 00 8D DE 18 B0 43 A0   .....de.......C.
            00 00 00 00 FB C8 00 00   ........
            
            2021-04-02 08:53:45.605   luup_log:82: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted):
            
            00 00 00 00 A7 C5 DF 0A  91 33 F1 88 C9 82 A5 6D   .........3.....m
            C8 BC F9 DF 00 00 00 00  00 00 00 00 00 00 00 00   ................
            00 00 00 00 00 00 00 00  00 00 00 00 00 01 00 00   ................
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
            00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
            
            2021-04-02 08:53:45.618   luup_log:82: BroadLink_Mk2 debug: Sending:  Authorisation: txMsg length = 136
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: Broadlink device: 649b replied with: 03e9
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: Error: errorMsg = fff9
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: This device is probably offline - mac address: a0:43:b0:18:de:8d
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: k = ir
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: a0:43:b0:18:de:8d_ir
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: a0:43:b0:18:de:8d
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: RM4 Pro - IR 1
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: urn:schemas-micasaverde-com:device:IrTransmitter:1
            2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: D_BroadLink_Mk2_IrRf_1.xml
            2021-04-02 08:53:45.633   luup_log:82: BroadLink_Mk2 debug: type = function, value = function: 0x1a03140
            2021-04-02 08:53:45.633   luup_log:82: BroadLink_Mk2 debug: {"a0:43:b0:18:de:8d":{"blInternalId":"00000001","blKey":"a7c5df0a9133f188c982a56dc8bcf9df","blDeviceType":25755,"blIp":"10.1.11.20","blDesc":"RM4 Pro"}} --> BroadLinkDevices
            2021-04-02 08:53:45.633   luup.chdev.append:: [a0:43:b0:18:de:8d_ir] RM4 Pro - IR 1
            2021-04-02 08:53:45.633   luup.chdev.sync:: [82] BroadLink-Mk2, syncing children
            2021-04-02 08:53:45.633   luup.set_failure:: status = false
            2021-04-02 08:53:45.633   luup.variable_set:: 82.urn:micasaverde-com:serviceId:HaDevice1.CommFailure was: false now: false #hooks:0
            2021-04-02 08:53:45.633   luup.variable_set:: 82.urn:micasaverde-com:serviceId:HaDevice1.CommFailureTime was: 1617316371 now: 1617368025 #hooks:0
            2021-04-02 08:53:45.633   openLuup.scheduler:: [82] BroadLink-Mk2 device startup completed: status=true, msg=All OK, name=BroadLink_Mk2
            

            Any ideas how to get the RF portion working?

            A 1 Reply Last reply Reply Quote 0
            • A
              a-lurker @ronluna last edited by a-lurker

              First on this:

              2021-04-02 08:53:44.604   luup_log:82: BroadLink_Mk2 debug: The BroadLink device at IP address 10.1.11.126 and of type 0x4e2a is not known to this plugin
              

              and

              Friendly name: e5a5a5e5858be696afe7a9bae8b083
              

              Getting the last bit and reformatting it a little:

              \xe5\xa5\xa5\xe5\x85\x8b\xe6\x96\xaf\xe7\xa9\xba\xe8\xb0\x83
              

              and sticking it into this UTF8 enc/dec you get the attached image. If someone knows what it means, I would be interested in knowing - I suspect it something to do with aircons.

              Friendly name 0x4E2a (20010).jpg

              It seems that a few air conditioners are now using the Broadlink protocol. They are controlled with a mobile app called AC freedom and they use the Broadlink devtype 0x4E2a (20010dec).

              So in short the plugin doesn't handle A/Cs. @ronluna can you tell us more about this Broadlink / Aircon device?

              More info here: on the A/Cs

              A 1 Reply Last reply Reply Quote 0
              • A
                a-lurker @a-lurker last edited by a-lurker

                Second: EDIT: yes the Broadlink device was not producing an RF child. It should be fixed: see latest lua file in GitHub ver 0.57a. There are so many variations of all these devices it's hard to keep up.

                On this:

                2021-04-02 08:53:45.632   luup_log:82: BroadLink_Mk2 debug: This device is probably offline - mac address: a0:43:b0:18:de:8d
                

                The Broadlink device may be on the edge of its WiFi range.

                Note that the plugin now also allows you to send codes in base64 format. Just send them and the plugin will work out if they are base64 encoded.

                For reasons unclear Home Assistant seems to use them. However they have thousands available for Aircons

                R 1 Reply Last reply Reply Quote 0
                • R
                  ronluna @a-lurker last edited by

                  @a-lurker the second broadlink device in the network is indeed Mini split A/C that uses AC Freedom app. Both device are well within the wifi range and working fine when using their native apps so I doubt the timeout message has something to do with the strength of the connection. What I've noticed in the past when I've seen a timeout like this is due to the socket expecting a special carrier return <CR> or something in that sort, simply not understanding what was sent back to it.

                  I'm not familiar with the RM communication protocol... Although I'm all ears to see what else We could try to get this off the ground.

                  2021-04-03 14:20:18.155   openLuup.scheduler:: [82] BroadLink-Mk2 device startup
                  2021-04-03 14:20:18.155   luup_log:82: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2
                  2021-04-03 14:20:18.155   luup_log:82: BroadLink_Mk2 debug: Using: Lua 5.1
                  2021-04-03 14:20:18.155   luup_log:82: BroadLink_Mk2 debug: 0.57a --> PluginVersion
                  2021-04-03 14:20:18.155   luup.variable_set:: 82.urn:a-lurker-com:serviceId:BroadLink_Mk2_1.PluginVersion was: 0.57 now: 0.57a #hooks:0
                  2021-04-03 14:20:18.156   luup_log:82: BroadLink_Mk2 debug: Using: dkjson
                  2021-04-03 14:20:18.157   luup_log:82: BroadLink_Mk2 debug: Broadcasting discovery message
                  2021-04-03 14:20:18.157   luup_log:82: BroadLink_Mk2 debug: 10.1.11.22
                  2021-04-03 14:20:19.157   luup_log:82: BroadLink_Mk2 debug: Number of BroadLink devices found is 1
                  2021-04-03 14:20:19.158   luup_log:82: BroadLink_Mk2 debug: Header to be sent follows (ex checksum):
                  
                  5A A5 AA 55 5A A5 AA 55  00 00 00 00 00 00 00 00   Z..UZ..U........
                  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
                  00 00 00 00 9B 64 65 00  00 00 8D DE 18 B0 43 A0   .....de.......C.
                  00 00 00 00 FB C8 00 00   ........
                  
                  2021-04-03 14:20:19.158   luup_log:82: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted):
                  
                  00 00 00 00 A7 C5 DF 0A  91 33 F1 88 C9 82 A5 6D   .........3.....m
                  C8 BC F9 DF 00 00 00 00  00 00 00 00 00 00 00 00   ................
                  00 00 00 00 00 00 00 00  00 00 00 00 00 01 00 00   ................
                  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
                  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
                  
                  2021-04-03 14:20:19.177   luup_log:82: BroadLink_Mk2 debug: Sending:  Authorisation: txMsg length = 136
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: RX of Authorisation msg response from 10.1.11.20 failed: timeout
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: This device is probably offline - mac address: a0:43:b0:18:de:8d
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: k = rf433
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: k = rf433 has no associated code at this time
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: k = ir
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: a0:43:b0:18:de:8d_ir
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: a0:43:b0:18:de:8d
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: RM4 Pro - IR 1
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: urn:schemas-micasaverde-com:device:IrTransmitter:1
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: D_BroadLink_Mk2_IrRf_1.xml
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: type = function, value = function: 0x19a62d0
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: k = rf315
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: k = rf315 has no associated code at this time
                  2021-04-03 14:20:20.177   luup_log:82: BroadLink_Mk2 debug: {"a0:43:b0:18:de:8d":{"blInternalId":"00000001","blKey":"a7c5df0a9133f188c982a56dc8bcf9df","blDeviceType":25755,"blIp":"10.1.11.20","blDesc":"RM4 Pro"}} --> BroadLinkDevices
                  2021-04-03 14:20:20.177   luup.chdev.append:: [a0:43:b0:18:de:8d_ir] RM4 Pro - IR 1
                  2021-04-03 14:20:20.178   luup.chdev.sync:: [82] BroadLink-Mk2, syncing children
                  2021-04-03 14:20:20.178   luup.set_failure:: status = false
                  2021-04-03 14:20:20.178   luup.variable_set:: 82.urn:micasaverde-com:serviceId:HaDevice1.CommFailure was: false now: false #hooks:0
                  2021-04-03 14:20:20.178   luup.variable_set:: 82.urn:micasaverde-com:serviceId:HaDevice1.CommFailureTime was: 1617440329 now: 1617474020 #hooks:0
                  2021-04-03 14:20:20.178   openLuup.scheduler:: [82] BroadLink-Mk2 device startup completed: status=true, msg=All OK, name=BroadLink_Mk2
                  
                  A 1 Reply Last reply Reply Quote 0
                  • A
                    a-lurker @ronluna last edited by a-lurker

                    A few points:

                    • My last mods to the Lua file would have no useful effect, so my bad. It's been a while since I looked at this code so my memory is a bit out of date.
                    • No "RF child" is produced. You get one child per physical Broadlink device (if they are known to the plugin). That child handles both RF & IR, as the sent code is either an IR or RF code.
                    • I see three IP addresses in the logs provided, which makes understanding the log a little tricky. Regardless the plugin knows the physical devices by their MAC address, so the IP address can change around. Have you fixed IP addresses for the BroadLink devices?
                    • I probably need to make the logging a bit clearer on what's going on.

                    On the aircon - the BroadLink protocol is not published and they change it from time to time so reverse engineering is always on going.

                    On the RM4 Pro - this tells me its been discovered OK:

                    {"a0:43:b0:18:de:8d":{"blInternalId":"00000001","blKey":"a7c5df0a9133f188c982a56dc8bcf9df","blDeviceType":25755,"blIp":"10.1.11.20","blDesc":"RM4 Pro"}}
                    

                    I assume here that the MAC listed above is the MAC address of the RM4 Pro? There is no list of found devices in the plugin's GUI representation (there probably should but I didn't do one). The json above is the "list" and it looks fine. Once a device is defined in the json it stays there; even if the device goes off line (for whatever reason) and therefore not discoverable. If the IP address changes the json is updated to match.

                    The final problem is the "cloud bit". Some of the newer devices get this bit set when the app is used with the device and it causes issues. I have no experience of any of this, as I my devices don't have it. Need to read the thread at the other site, that talks about the reset/pairing procedure to avoid problems.

                    Also is this is on a Vera or openLuup?

                    Try relocating the Broadlink device closer to the WiFi connection. I still maintain the comms may be a bit flaky. If you send any IR code to the device the log will show what's happening and you can use a cellphone camera to see if the IR is coming out of the RM4 Pro.

                    I have no plans to get this to work for the aircons - looks like a major effort; especially if you have no hardware to test the code on.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Welcome. If you’d like to participate in the discussion, rather than just read, then you can join the forum. As a member, you can interact with others here to share your experience and ask the questions you need answered.

                    Powered by NodeBB | Contributors
                    Hosted freely by PointPub Media Communications Inc. | Contact us