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
    (Last Updated: October 26, 2020)
    For those who registered but didn't received the confirmation email, please send an email to support@smarthome.community with the email you used
    • Recover an ‘assumed bricked’ Vera Secure

      parkerc

      Hi

      Go with me here... I recently pick up a unresponsive Vera Secure from eBay for next to nothing, thinking I’d could have a go at trying to restore it, if only as a play thing..

      Situation - The power led comes on, but the internet and service leds just flash - no connection made (and even using a direct cable and Wireshark, I can’t see an arp request being made to see if it has a default in address) - I’ve also tried various reset button combinations - no luck.

      Perhaps this post is a long shot, but seeing so many familiar ex Micasaverde/Vera forum names - i thought I’d at least ask - just in case anyone had any guidance/advice etc. I could use ..

      General Discussion
    • New to the forum

      Q

      Hi!
      I was tipped off about this forum while bitching about my Vera on the Vera forum, as I had grown accustomed to over the years. I know that's not very nice, but that thing brings out the worst in me (and has even driven me to drink on occasions 😉 )!
      Anyway, how about a little intro in case anyone is actually interested? I did odd jobs, saved up for and built my first PC from components by the time I was 15 (back when you had to know how to get around a DOS prompt and a 120Mb hard drive was a big deal). Within 6 months I had my own BBS up and running. The internet wasn't really a thing back then -- did AOL really count? I only really discovered home automation almost a decade later, again before it had really taken off. Back then I was using X10 because it was still one of the only consumer options and I had no electronics background. Over the years I have experimented with several home automation technologies, 90% of them ending up as useless scrap and a waste of money. Today I feel like not much has changed, but things are moving in the right direction (wide scale adoption -> more money invested in improving tech to try to get us to part with our money, am I right?). I've never really had the funds to go all out or to get the more expensive gear, but I've found some products that have been worth sticking with -- namely my Elk-M1G and one or two other obscure devices. I recently was "renovicted" during the pandemic and decided to move from my modest apartment in the city to a house out in the woods in the middle of nowhere.
      So here I am, with an almost clean slate, looking to set this place up better than ever. The internet access sucks out here, but the house is mine to do what I will with it. I envision a keyless entry system even better than the last one I devised, walls that literally talk and eventually even roboticized structure & furniture (eg. Aquarium lids that rise for maintenance, hidden doors that slide open, a table that transforms into a bar, etc.).
      For the moment, though, I'd like to figure out how to replace this *&$%ing Vera. Funds have been tight lately, but at the moment I have several pieces of hardware I can start with: The Elk (as mentioned), ~20 LIFX bulbs/strips, a handful of Amazon Echos, a few Zwave devices, some IR and audio stuff, the Vera, a few other odds and ends.
      Ultimately, I'd like to set up a low-power system like a NUC or something that will always be on, running automation as well as handling audio (most likely multi-zoned). I built my last PC as a gaming PC, but I can use it to experiment until I'm ready to purchase an HA system.
      Where do I start if I want to learn about OpenLuup? I skimmed through the forums, but they seem quite advanced and are a little beyond my abilities. I do CAD/CAM, not programming, unfortunately!
      Thanks!!

      General Discussion
    • Status Board - What’s your HA Information Dashboard ?

      parkerc

      654a0b44-6cec-4466-8701-3566067abbd0-image.jpeg https://www.google.co.uk/url?sa=i&url=https%3A%2F%2Fpanic.com%2Fblog%2Fpanic-status-board-2013-edition%2F&psig=AOvVaw1ERsyah34ZkmLnpWaYLgu-&ust=1600418906446000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCODol5Xn7-sCFQAAAAAdAAAAABAE

      I’ve always liked the idea of having a screen, located somewhere in the house that would allow me to see the status of pretty much everything. (Hardware wise I’m just think of a basic Rasp Pi, fixed to a vesa mount, screwed to the back of an old monitor screen)

      I’ve tried a number of tools/apps over the years, one of which was PanicBoard (where the above image comes from) - which seemed to have some potential, but the owners stopped developing/investing in that a while back.

      What are people using ?

      Is there something, perhaps a single tool/app that this community would collectively support/promote, one that no matter what HA you used, you could submit information to and have it displayed ?

      **** Just to be clear, I’m referring to status/information boards, not a touch based, control board where you can turn things on/off etc..***

      General Discussion
    • MQTT – setup and use

      akbooer

      General discussion on all things MQTT.

      General Discussion
    • z-way device removal

      C

      Not sure this is in quite the right place (again) but I have a device that exists in z-way that I simply cannot remove. It seems to be a zombie. I have no idea what it was.
      It claims to be a routing binary sensor that has not woken up since August
      I go through the 'Only do this if your device is broken' and it simply will not go.
      Any ideas (apart from ignore it)?

      Cheers

      C

      General Discussion
    • Discover IR codes for lost remote

      parkerc

      Hi all

      Possibly a long shot - but does anyone know of a way, (maybe you have some code or know of an app) that can help you discover the IR codes of a device when you’ve lost the remote?

      Looking online there seems to be a growing number of IR banks, yet I can’t find anything on the market that could cycle through a huge set of different codes (e.g just the power on/off) to let me know which ones are compatible ?

      When you consider so many things these days are made in the same place, and often thing can just be re/badges versions of other items - it’s likely that a sets of codes for one branded product will work in the most part with another ..

      General Discussion
    • The Home Automation Controller Pyramid

      rafale77

      Since one member asked at one point about the "front end" and "back end", I drew this showing the controller from the base to the tip along with what I have found to be the best options from my testing. Almost every controller will try to integrate all elements, especially commercial ones but... they all have strengths and weaknesses so if one can have a medley of the best ones...

      Screen Shot 2020-05-14 at 07.11.06.png

      General Discussion
    • HTTP 400 error with Telegram

      C

      Hi all. Looking for some guidance as ever

      This

      luup.inet.wget('https://api.telegram.org/bot1225075966:AAHS5rwhCpOx0hwq3mOnNjtCSKiDeAS6B4/sendMessage?chat_id=@Coalport58&text=House mode is home')

      Works fine

      This

      luup.inet.wget('https://api.telegram.org/bot1225075966:AAHS5rwhCpOx0hwq3mOnNjtCSKiDeAS6B4/sendMessage?chat_id=@Coalport58&text=House mode is Home')

      Throws a 400 error:

      openLuup.client:: WGET error status: 400

      I have munged the bot key to post here, but just changing the 'h' to 'H' breaks it. Any ideas why?

      C

      General Discussion
    • Smart home startup looking for cofounder

      M

      We are a smart home startup based in England, we are looking for a co-founder/advisor who is good at iot software development.
      Many thanks

      General Discussion
    • I'm bored :D

      therealdb

      What are the projects you're working on?

      Summer is over, and that (unfortunately) means more time indoor and (luckily) more time to build things.

      I have almost nothing in my backlog and it's boring 🙂

      I appreciate a couple of (crazy) ideas.

      General Discussion
    • Alexa skill for Open Luup / Zway

      C

      Is there one? I know TTS is working but suddenly woke up at 0300....
      ...or does it just use Vera. That seems unlikely from what I know of the architecture

      TIA

      C

      General Discussion
    • Can't mount CIFS with Vera

      therealdb

      So, I'm trying to execute the same code I had for years to mount my synology NAS for datamine (I know, old stuff), but I'm getting this:

      mount -o user=vera,pass=pass //192.168.1.26/Backups/Vera/datamine /datamine mount: mounting //192.168.1.26/Backups/Vera/datamine on /datamine failed: No such device

      It used to work until 3 days ago, then I had to factory reset my Vera Plus and now this. Packages are OK:

      opkg update opkg --force-depends install kmod-fs-cifs opkg --force-depends install kmod-nls-utf8 kmod-nls-base kmod-crypto-hmac kmod-crypto-md5 kmod-crypto-misc

      I've already trying anything, with no luck. Any ideas?

      General Discussion
    • Home Automation Serial Server (Raspberry Pi)

      parkerc

      My quest to build a central usb to serial server (hub) continues 🙂

      The goal is to make a core set of usually local devices available to other HA controllers over the network to use (via Ser2net).

      Current list includes ..

      Current Cost Energy Monitor Rfxtrx433 Transceiver Bluegiga BLED112 Bluetooth

      Next up is a Z-Wave Module ZMEEUZB1

      What other devices do people think would be a good to add to the ‘hub’ ?

      General Discussion
    • IFTTT or the ultimate home automation in the cloud absurdity

      rafale77

      I just noticed from other forums that IFTTT has started some serious payment plans with a very restrictive free tier.

      IFTTT Plans - IFTTT Plans - IFTTT

      Find the right plan for Pros, Developers and Businesses.

      This was writing on the wall from the beginning and why I tested it for the entirety of 5mins and requested to delete my account back 3 years ago. The idea to me was mind boggling: Having a multitude of platform API integrated by them in the cloud so every signal and command would go through them. This outside dependency, could not remain free and would offer poor reliability security/privacy and performance by design and is intrinsically inefficient. Now if you want to continue using it, you get to pay for it.. What a waste of time and energy...

      General Discussion
    • Bluegiga’s BLED112, Raspberry Pi (Ser2net) & Vera/Node-Red

      parkerc

      Sorry for the long title 🙂

      After building, for the want of a better term, a “Ser2net Server” in order to share various USB/Serial devices With Vera/Node-Red etc.

      I’ve recently added Bluegiga’s BLED112 Bluetooth (https://www.silabs.com/wireless/bluetooth/bluegiga-low-energy-legacy-modules/device.bled112) with the goal that I can integrate all the personal bluetooth devices worn in the house (i.e fitness trackers etc.) into some sort of presence awareness set-up.

      All my other usb/serial devices, such as a Current Cost energy monitor, DSC Alarm Panel and a RFCOM Rfxrtx433 transceiver which are connected are all working well, and with the ability to share each device I’ve been able to integrate them into the different HA solutions I use.

      So getting back to the point of my post, and with the BLED112 connected, I can access it via the pi no problem and using this .py script (. https://github.com/jrowberg/bglib/blob/master/Python/Examples/bled112_scanner.py) - so I can do a few things when logged into the pi, but what I’m struggling with at the moment is how to get clean information out via ser2net. Currently everything looks jumbled/corrupted and I’ve tried to change the Ser2net serial/connection settings for it but that hasn’t resulted in any noticeable improvements .

      Ser2net .conf settings.

      4004:raw:0:/dev/ttyACM0:115200 8DATABITS NONE 1STOPBIT max-connections=4

      Is anyone on this forum using the BLED112 in any capacity today ? Ideally with Vera/OpenLuup ?

      Screenshot below of what’s seen via telnet (Remoter is the iOS app I’m using , but the N065H is a model of fitness band my wife has.

      C8FF65D2-9BA7-4696-B085-64170A42D3E1.jpeg

      And attached below is what seen from the pi when the python script is run..

      0E3B2939-3751-4804-9599-835BC9741524.jpeg

      Within the above you have the MAC of the Bluetooth device, plus the strength of the signal, so the makings of some good presence/range automation capabilities 🤩

      General Discussion
    • SilLabs Virtual Meeting - looks at Hub that failed........

      Black Cat

      General Information - I thought some of the regulars would like to register. Links down the bottom,Interesting that they are looking into the failures....wonder if there will be any mention of you know what.....

      Z-Wave Works With Amazon, Google, Samsung, Apple, Comcast Virtual Conference
      by DrZWave
      Silicon Labs is hosting what was intended to be an in-person conference in Austin Texas but is now a virtual online conference on IoT ecosystems - the Works With Smart Home Developer Event September 9-10. The best part is it is now FREE to attend any of the in-depth technical sessions and you don't have to wear a mask. The downside is that we don't get to experience all that great music down in Austin - well, there's always next year!

      Virtual IoT Works With EcoSystems from Google, Amazon, Apple for Z-Wave development engineers

      Works With Smart Home Developer Event - Silicon Labs Works With Smart Home Developer Event - Silicon Labs

      Attend Works With Smart Home Developer Event virtually to learn how to work with ecosystem partners to connect devices, platforms and protocols. Live or on-demand.

      I am hosting the Z-Wave track and will be making several presentations including a detailed look at Silicon Labs latest release of Simplicity Studio V5 which just came out yesterday. We'll also have presentations on developing Z-Wave Smart Hubs and Z-Wave Certification. I'll also be describing some IoT failures - you learn more from your failures than your successes. We have speakers and engineers from all of the ecosystem partners, not just Silicon Labs folks. Learn from the experts from across the industry!

      What is Works With 2020? The smart home developer’s virtual event where you will have the opportunity to interact with our ecosystem partners from Amazon, Google, Samsung, and Z-Wave to connect devices, platforms and protocols and be able to immerse yourself in keynotes, a panel discussion on Project CHIP, hands-on, and technical sessions led by smart home engineers who are building the latest advanced IoT devices. The Works With event is live, all-online, free of charge, and you can join from anywhere around the world.

      Works With Z-Wave Apple, Google, Amazon, Samsung IoT SmartHome conference 2020
      Click here to Register Today and feel free to forward to the rest of your team.

      Here’s an overview of what you won’t want to miss:

      Specialized Engineer-Led Tracks – Educational sessions and technical training designed for engineers, executives, developers, business development and product managers.

      Hands-On Workshops More than 12 workshops and hands-on sessions to give you experience, knowledge and confidence to develop and accelerate smart home development.

      One-on-One Developer Meetings – Schedule a meeting with Silicon Labs or an ecosystem partner to get 1:1 technical guidance.

      Join me in September and learn how to smoothly get your IoT device plugged into any and all of the ecosystem partners. Register today, it's totally free and you can join from anywhere in the world. See you September!

      DrZWave | July 30, 2020 at 8:22 pm | Tags: WorksWith | Categories: 700 series, Best Practice, Coding Guides, News, Presentations, Summit, Z-Wave Controllers, Z-Wave Developers, Z-Wave Mesh, Z-Wave Network, Z-Wave Slaves, Z-Wave Users | URL: https://wp.me/p6tsK6-o5
      Comment See all comments
      Unsubscribe to no longer receive posts from DrZWave.
      Change your email settings at Manage Subscriptions.

      Trouble clicking? Copy and paste this URL into your browser:

      DrZWave  /  Jul 30, 2020 Z-Wave Works With Amazon, Google, Samsung, Apple, Comcast Virtual Conference Z-Wave Works With Amazon, Google, Samsung, Apple, Comcast Virtual Conference

      Works With Amazon, Google, Apple and more Smart Home EcoSystem vendors. Learn how to design your product to work with these 800 pound gorillas

      General Discussion
    • MyCroft: The localized voice assistant

      rafale77
      Derick Schweppe Mycroft – Open Source Voice Assistant - Mycroft Mycroft – Open Source Voice Assistant - Mycroft

      Mycroft is an open source voice assistant, that can be installed on Linux, Raspberry Pi, or on the Mark 1 hardware device. Our opensource skills are written in Python and we have a very friendly developer community. Come join us!

      I have been following this project with great interest and am thinking about testing it. Eventually, I believe this is the way to go and will eliminate all the GH and Echo ecosystems.

      General Discussion
    • replacing SDC on Raspi with SSD

      Black Cat

      I picked up a new WD SSD for practically next to nothing (wow, have prices on storage dropped) and want to replace the SDC in omy HS4 Pi that I added Node Red to.
      I know that a thread existed on this, perhaps on the Vera forum before it was censored. I can't find it here can anyone point me in the right direction.
      Thks

      General Discussion
    • Socket settimeout times out every time for no apparent reason

      A

      In the pseudo code below settimeout always times out after ten seconds. I can set the timeout to any value and it always times out when it reaches the set value. But why? The transmit is fine and the data is rx'ed OK exactly as expected. ie the expected data is always the length expected. There are no partial results.

      The only way to get it to work is to set the timeout to zero. ie no timeout delay and use socket.select to become a defacto timeout. It works great after that.

      -- Socket library version is: LuaSocket 3.0-rc1 m_tcp = socket.tcp() m_tcp:settimeout(10) -- set to zero when using socket.select fix m_tcp:connect('ip_address', port) repeat -- send request local txMsg('Data request. Hi what is the hardware status? (ongoing)') m_tcp:send(txMsg) -- THIS fixs the problem as long as m_tcp:settimeout() is set to zero -- Wait on the socket for 50 msec for rx data. -- The rx data will arrive in the rx buffer in less than this time. -- *** local rxlist, _, selectStatus = socket.select ({m_tcp}, nil, 0.05) -- get the response to the request -- get the 16 byte data header, that contains the length of the payload local expectedLength = 16 local s, status, partial = m_tcp:receive(expectedLength) if (status == "timeout") then print('timeout') end -- the returned data amount varies but we know what it is from the header just rx'ed expectedLength = s[1] s, status, partial = m_tcp:receive(expectedLength) -- do this every 0.5 sec; -- we're regularly updating the status of a hardware device luup.sleep(500) until false
      General Discussion

    Discover IR codes for lost remote

    General Discussion
    5
    49
    300
    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.
    • parkerc
      parkerc last edited by

      Hi all

      Possibly a long shot - but does anyone know of a way, (maybe you have some code or know of an app) that can help you discover the IR codes of a device when you’ve lost the remote?

      Looking online there seems to be a growing number of IR banks, yet I can’t find anything on the market that could cycle through a huge set of different codes (e.g just the power on/off) to let me know which ones are compatible ?

      When you consider so many things these days are made in the same place, and often thing can just be re/badges versions of other items - it’s likely that a sets of codes for one branded product will work in the most part with another ..

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

        Lost remote? It's probably down the back of the couch.

        While not exactly what you want but have looked at Remote Central or possibly buy a new one on ebay?

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

          @a-lurker said in Discover IR codes for lost remote:

          Lost remote? It's probably down the back of the couch.

          Sadly not, I picked these items up 2nd hand, so they didn’t come with the original remotes.

          @a-lurker said in Discover IR codes for lost remote:

          While not exactly what you want but have looked at Remote Central or possibly buy a new one on ebay

          Yep, tried that already, along with http://irdb.tk/codes/ too - but neither of the manufacturers/ models I’m looking for are listed..

          Hence I was thinking there must be a high chance something in those code banks will work, at the very least to power on/off..

          Any ideas ?

          1 Reply Last reply Reply Quote 0
          • therealdb
            therealdb last edited by

            I'm not aware of anything like you requested. There are things that could learn codes, but they require a handheld. Have you tried calling the manufacturer? Maybe they will give you instructions about this issue.

            parkerc 1 Reply Last reply Reply Quote 0
            • parkerc
              parkerc @therealdb last edited by parkerc

              @therealdb said in Discover IR codes for lost remote:

              Have you tried calling the manufacturer?

              Yep, tried that I think I’ve tried everything, even have a saved search on eBay. Also as one of them had a RS232 connection, I explored that too, (via the Vera forum) but had to give up in the end as it wouldn’t work .

              So far one manufacturer has stated that the unit in question was discontinued and the other has yet to respond after multiple attempts. 😞 Rather that wait any long, seeing as I have a number of IR sender options, KIra, Harmony and BroadLink it made made me wonder if there was a way to retrieve codes, create a list and cycle through them.

              I mainly use @a-lurker Broadlink, and looking at the IR ‘ProntoCode’ command option, it feels possible (with help?)

              luup.call_action('urn:a-lurker-com:serviceId:IrTransmitter1', 'SendProntoCode', {ProntoCode = '0000 006C 0022 0002 015B 00AD 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 05F7 015B 0057 0016 0E6C'},49)
              

              it’s just the code bank connection to reduce the manual effort, and some way of recording/reporting which code was sent and if it worked or not. (Ideally all automated)

              1 Reply Last reply Reply Quote 0
              • parkerc
                parkerc last edited by parkerc

                There is a great community/code bank on GitHub.

                probonopd/irdb

                probonopd/irdb

                One of the largest crowd-sourced, manufacturer-independent databases of infrared remote control codes on the web, and aspiring to become the most comprehensive and most accurate one - probonopd/irdb

                Index of codes is here - https://github.com/probonopd/irdb/blob/master/index

                With their API - http://irdb.tk/api

                And you can retrieve a .csv set for anyone via https://cdn.jsdelivr.net/gh/probonopd/irdb@master/codes/Samsung/TV/7,7.csv

                1 Reply Last reply Reply Quote 1
                • parkerc
                  parkerc last edited by parkerc

                  I’ve just got an update from the guy behind the irdb - https://github.com/probonopd/irdb/issues/37

                  He mentioned..

                  Assuming you have the irdb tree locally on $IRDB_BASE, this pseudo code should do it

                  for file in $IRDB_BASE/codes/*/*.csv:
                      for line in $file:
                          (cmd_name,protocol,D,S,F) = split $line ','
                           if match('power', $cmd_name):
                                 echo "Trying signal $protocol $D $S $F" 
                                 pronto = $(irptransmogrifier render -n D=$D,S=$D,F=$F $protocol)
                                 sendIr $pronto
                                 sleep $a_while
                         endif
                     endfor
                  endfor
                  

                  Please could someone help me to translate this into Lua and then to work with the Broadlink plug-in ?

                  akbooer 1 Reply Last reply Reply Quote 0
                  • parkerc
                    parkerc last edited by parkerc

                    I’d also appreciate any help/advice on how to maybe adjust @rigpapa’s GitHub Lua/plug-in to potentially pull into the irdb database (or would that simply be too much for Vera to take?)

                    toggledbits/GitUpdater

                    toggledbits/GitUpdater

                    A service utility to update Vera plugins from GitHub releases - toggledbits/GitUpdater

                    1 Reply Last reply Reply Quote 0
                    • parkerc
                      parkerc last edited by parkerc

                      @a-lurker - is there scope here for a possible add-on/enhancement to the Broadlink plug-in 🙏😇😁

                      1 Reply Last reply Reply Quote 0
                      • therealdb
                        therealdb last edited by

                        well, it's possible in LUA as well. I'm not that expert in the file system libs, but Google is your friend 🙂

                        How to get list of directories in Lua

                        How to get list of directories in Lua

                        I need a list of directory in LUA Suppose I have a directory path as "C:\Program Files" I need a list of all the folders in that particular path and how to search any particular folder i...

                        Just use io to open files, but I think that so many commands will probably crash your luup engine. We're potentially speaking of thousands of calls to try.

                        1 Reply Last reply Reply Quote 0
                        • akbooer
                          akbooer @parkerc last edited by

                          @parkerc said in Discover IR codes for lost remote:

                          Please could someone help me to translate this into Lua

                          for file in $IRDB_BASE/codes/*/*.csv:
                              for line in $file:
                                  (cmd_name,protocol,D,S,F) = split $line ','
                                   if match('power', $cmd_name):
                                         echo "Trying signal $protocol $D $S $F" 
                                         pronto = $(irptransmogrifier render -n D=$D,S=$D,F=$F $protocol)
                                         sendIr $pronto
                                         sleep $a_while
                                 endif
                             endfor
                          endfor
                          

                          becomes, in Lua:

                          local lfs = require "lfs"
                          local dir = "codes/"   -- make this your path to the files
                          local split = "[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"  -- (cmd_name,protocol,D,S,F)
                          
                          for file in lfs.dir(dir) do
                              if file: match "%.csv$" then
                                for line in io.lines(dir .. filename)do
                                  local cmd_name,protocol,D,S,F = list: match (split)
                                  if 'power' == cmd_name then
                                    print ("$protocol $D $S $F",  protocol,D,S,F)
                                  end
                                end
                             end
                          end
                          

                          I've just replaced the IR send with a print statement for now.

                          1 Reply Last reply Reply Quote 1
                          • parkerc
                            parkerc last edited by parkerc

                            Thanks @akbooer

                            Some quick questions .

                            1. Where would be the best place to store/sync the .csv files ?
                            2. FYI to help test, here is an example/extract of the Samsung TV .csv
                            [functionname,protocol,device,subdevice,function
                            INPUT SOURCE,NECx2,7,7,1
                            POWER,NECx2,7,7,2
                            1,NECx2,7,7,4
                            2,NECx2,7,7,5
                            3,NECx2,7,7,6
                            VOLUME +,NECx2,7,7,7
                            4,NECx2,7,7,8
                            5,NECx2,7,7,9
                            6,NECx2,7,7,10
                            VOLUME -,NECx2,7,7,11
                            7,NECx2,7,7,12
                            8,NECx2,7,7,13
                            9,NECx2,7,7,14
                            MUTE,NECx2,7,7,15
                            CHANNEL -,NECx2,7,7,16
                            0,NECx2,7,7,17
                            CHANNEL +,NECx2,7,7,18
                            

                            By the looks of it to get the pronto version of the code, you would have to used the IrpTransmogrifier tool - https://github.com/bengtmartensson/IrpTransmogrifier

                            Where would be the best place to install that - is Vera a safe place or should I look elsewhere e.g a Pi ?

                            1 Reply Last reply Reply Quote 0
                            • akbooer
                              akbooer last edited by akbooer

                              What were you thinking of using to send the codes?

                              I note that luup has an ir table with a single function in it. Also, thanks to @a-lurker it's implemented in openLuup. IT mentions GC100 in the comments:

                              -- IR module
                              -- thanks to @a-lurker for this.
                              -- see: http://forum.micasaverde.com/index.php/topic,37268.0.html
                              
                              local ir = {
                                pronto_to_gc100 = function (pronto)
                                  -- replace the pronto code preamble with the GC100 preamble
                              
                              

                              ...but I have absolutely no idea about its functionality, not ever having used an IR devices at this level. I would have thought that these codes ARE the pronto codes?? (...or are they IRP notation protocols?)

                              parkerc 1 Reply Last reply Reply Quote 0
                              • parkerc
                                parkerc @akbooer last edited by parkerc

                                @akbooer said in Discover IR codes for lost remote:

                                What were you thinking of using to send the codes?

                                I was ideally looking to use my Broadlink RM-Pro device and @a-lurker ‘s Vera plugin

                                @akbooer said in Discover IR codes for lost remote:

                                I have absolutely no idea about its functionality, not ever having used an IR devices at this level. I would have thought that these codes ARE the pronto codes?? (...or are they IRP notation protocols?)

                                I’m getting a bit out of my depth here now too,..

                                which is so often the case when I embark on these kind of HA adventures 🙂 .

                                My interpretation is that when using irdb, you have to convert the code for them them to be Pronto codes. - http://irdb.tk/convert/

                                If I use my Samsung TV as an example, that seems to use the necx2:7.7 protocol - which I’ve also seen written as NECx2, device 7.7. Either way that seems to be a very common TV code set for Samsung, Akai and some other brands.

                                So, looking at their api, I assumed I could at least try to call a specific code.

                                http://irdb.tk/api/code/?brand=Samsung&devicetype=TV

                                And then..

                                http://irdb.tk/api/code/?brand=Samsung&devicetype=TV&protocol=NECx2&device=7&subdevice=7&functionname=POWER

                                but alas no ir code was returned only this json, which perhaps is not surprise... 😞

                                {
                                  "meta": {
                                    "model": "code", 
                                    "next": "", 
                                    "page": 1, 
                                    "previous": ""
                                  }, 
                                  "objects": [
                                    {
                                      "function": "2", 
                                      "protocol": "NECx2", 
                                      "subdevice": "7", 
                                      "devicetype": "TV", 
                                      "device": "7", 
                                      "functionname": "POWER"
                                    }
                                  ]
                                }
                                

                                Any ideas on their api - http://irdb.tk/api ?

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

                                  parkec

                                  You haven't told us what hardware or software (MiOS/openLuup) you are using. If you read AK's code above you would just have to point to where the files are. Presumably the file(s) could be on a USB stick. You want to get AK's coe running first, on just one file first - one step at a time.

                                  Later you need this bit:

                                  bengtmartensson commented 16 hours ago •

                                  Just install IrpTransmogrifier as shell command and call it (as shell program) using (I think) os.execute or io.popen in Lua. No need to call java from lua
                                  pronto = $(irptransmogrifier render -n D=$D,S=$D,F=$F $protocol)

                                  The database looks like it could be huge and would take a while (who knows - a day?) to cycle around all the IR codes. Are you going to sit there and watch your device all day to catch when it turns on? AK's code needs to get the pronto code and then send it. Something like this (but totally untested):

                                  -- Send an IR code every two seconds
                                  -- Function needs to be global as it's a delay timeout target
                                  function sendProntoCodeToBroadLinkDevice(prontoCode)
                                     local BROADLINK_DEVICE_ID = 49
                                     luup.call_action('urn:a-lurker-com:serviceId:IrTransmitter1', 'SendProntoCode', {ProntoCode = prontoCode}, BROADLINK_DEVICE_ID)
                                  end
                                  
                                  function scanIndexFiles ()
                                      local lfs = require "lfs"
                                      local dir = "codes/"   -- make this your path to the files
                                      local split = "[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"  -- (cmd_name,protocol,D,S,F)
                                      
                                      local prontoCode = ''
                                  
                                      for file in lfs.dir(dir) do
                                          if file: match "%.csv$" then
                                            for line in io.lines(dir .. filename) do
                                              local cmd_name,protocol,D,S,F = list: match (split)
                                              if 'power' == cmd_name then
                                                print ("$protocol $D $S $F",  protocol,D,S,F)
                                  
                                                local irptransmogrifierPath = "insert path here"
                                  
                                                -- this may all need work depending on whatever "irptransmogrifier" does
                                                local command = string.format("%sirptransmogrifier render -n D=%s,S=%s,F=%s protocol",irptransmogrifierPath,D,S,F,protocol)
                                                local handle = assert(io.popen(command))
                                                local prontoCode = handle:read("*a")
                                                handle:close()
                                  
                                                local INTERVAL_SECS = 2
                                                luup.call_delay('sendProntoCodeToBroadLinkDevice', INTERVAL_SECS, prontoCode)
                                  
                                              end
                                            end
                                         end
                                      end
                                  end
                                  
                                  scanIndexFiles()
                                  
                                  

                                  Note: luup.call_delay only works in the openLuup window test window - I'm still not clear why. But the Vera and AltUI test windows won't run it correctly. You need the delay so the BroadLink device has time to send the code. (the function sleep() is not suitable)

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

                                    @a-lurker said in Discover IR codes for lost remote:

                                    You haven't told us what hardware or software (MiOS/openLuup) you are using.

                                    Sorry,, I’m looking first to Vera/MIOS , with the Broadlink RM Pro4, and your plug-in.

                                    @a-lurker said in Discover IR codes for lost remote:

                                    The database looks like it could be huge and would take a while (who knows - a day?) to cycle around all the IR codes. Are you going to sit there and watch your device all day to catch when it turns on? AK's code needs to get the pronto code and then send it. Something like this (but totally untested):

                                    To avoid sitting around as the devices in question register for an IP, which I can fix, I was thinking I can watch for that variable to be updated .e.g via ping test or another option could be to place a light sensor right in front of the power LED to react when the light comes on..

                                    @a-lurker said in Discover IR codes for lost remote:

                                    You want to get AK's coe running first, on just one file first - one step at a time.

                                    Agreed, and here’s an example .csv of the Samsung TV code/set they store. /codes/

                                    
                                    functionname,protocol,device,subdevice,function
                                    INPUT SOURCE,NECx2,7,7,1
                                    POWER,NECx2,7,7,2
                                    1,NECx2,7,7,4
                                    2,NECx2,7,7,5
                                    3,NECx2,7,7,6
                                    VOLUME +,NECx2,7,7,7
                                    4,NECx2,7,7,8
                                    5,NECx2,7,7,9
                                    6,NECx2,7,7,10
                                    VOLUME -,NECx2,7,7,11
                                    7,NECx2,7,7,12
                                    8,NECx2,7,7,13
                                    9,NECx2,7,7,14
                                    MUTE,NECx2,7,7,15
                                    CHANNEL -,NECx2,7,7,16
                                    0,NECx2,7,7,17
                                    CHANNEL +,NECx2,7,7,18
                                    LAST,NECx2,7,7,19
                                    MENU,NECx2,7,7,26
                                    INFO,NECx2,7,7,31
                                    AD/SUBT,NECx2,7,7,37
                                    EXIT,NECx2,7,7,45
                                    E-MANUAL,NECx2,7,7,63
                                    TOOLS,NECx2,7,7,75
                                    GUIDE,NECx2,7,7,79
                                    RETURN,NECx2,7,7,88
                                    CUSOR UP,NECx2,7,7,96
                                    CURSOR DOWN,NECx2,7,7,97
                                    CURSOR RIGHT,NECx2,7,7,98
                                    CURSOR LEFT,NECx2,7,7,101
                                    ENTER,NECx2,7,7,104
                                    CH LIST,NECx2,7,7,107
                                    SMART HUB,NECx2,7,7,121
                                    3D,NECx2,7,7,159
                                    
                                    

                                    And overall size wise, I assume - as they are not storing every individual code and Ir format/type, instead it’s just the protocol and some other identifier - the whole irdb/code folder seems reasonably small.

                                    2B82889B-7547-4680-A42A-3029A4D70F7B.jpeg

                                    1 Reply Last reply Reply Quote 0
                                    • therealdb
                                      therealdb last edited by

                                      Are you sure you can’t open those devices and look at the electronics? It seems to be simpler than this, to me 😉

                                      Maybe, also, some repair shop could help you. They usually deal with these kind of things and maybe they have something smarter to identify them. May be worth a try.

                                      parkerc 1 Reply Last reply Reply Quote 0
                                      • parkerc
                                        parkerc @therealdb last edited by

                                        @therealdb said in Discover IR codes for lost remote:

                                        Are you sure you can’t open those devices and look at the electronics? It seems to be simpler than this, to me

                                        These items are racked up so it;s not quite as easy as I’d like that option to be - but I am weighing up the hassle of doing that vs doing this 🙂

                                        The benefit of making this code/process work is that a) i will have learnt something new - b) This could then be something g that helps others and c) it would give the Broadlink plug-in access to a huge ir bank of codes for people to use. 🙏🤞

                                        1 Reply Last reply Reply Quote 0
                                        • parkerc
                                          parkerc last edited by parkerc

                                          Hi,

                                          I’ve been working with the code that was shared (thanks so much), and have trimming it down a bit to work it through in sections, but - here’s my current issue - any ideas ?

                                          (I) if I put the .csv file in the main search folder it does not return any errors, but it also does not print anything out.

                                          /mnt/nas/vera/ircodes/7,7.csv

                                          
                                          LuaTest 1.7
                                          
                                          Lua file: /etc/cmh-ludl/luatest.lua
                                          
                                          Results
                                          No errors
                                          Runtime: 51.4 ms
                                          Code returned: nil
                                          
                                          Print output
                                          (none)
                                          
                                          Code
                                             1    
                                             2       local lfs = require "lfs" 
                                             3       local dir = "mnt/nas/vera/ircodes/"   -- make this your path to the files 
                                             4       local split = "[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"  -- (cmd_name,protocol,D,S,F) 
                                             5        
                                             6       local prontoCode = '' 
                                             7    
                                             8       for file in lfs.dir(dir) do 
                                             9           if file: match "%.csv$" then 
                                            10             for line in io.lines(dir .. filename) do 
                                            11               local cmd_name,protocol,D,S,F = list: match (split) 
                                            12               if 'power' == cmd_name then 
                                            13                 print ("$protocol $D $S $F",  protocol,D,S,F) 
                                            14               end 
                                            15             end 
                                            16          end 
                                            17      end
                                          
                                          
                                          • When I run it again, I get this, should filename be local or specified ?
                                          
                                          LuaTest 1.7
                                          
                                          Lua file: /etc/cmh-ludl/luatest.lua
                                          
                                          Results
                                          Runtime error: Line 9: attempt to concatenate global 'filename' (a nil value)
                                          
                                          Locals
                                          [main]
                                          lfs={ _VERSION="LuaFileSystem 1.6.2", symlinkattributes=function, lock_dir=function, dir=function, _DESCRIPTION="LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution", setmode=function, unlock=function, _COPYRIGHT="Copyright (C) 2003-2012 Kepler Project", currentdir=function, touch=function, mkdir=function, lock=function, link=function, attributes=function, chdir=function, rmdir=function }
                                          dir="mnt/nas/vera/ircodes/"
                                          split="[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"
                                          prontoCode=""
                                          
                                          Print output
                                          (none)
                                          
                                          Code
                                             1       local lfs = require "lfs" 
                                             2       local dir = "mnt/nas/vera/ircodes/"   -- make this your path to the files 
                                             3       local split = "[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"  -- (cmd_name,protocol,D,S,F) 
                                             4        
                                             5       local prontoCode = '' 
                                             6    
                                             7       for file in lfs.dir(dir) do 
                                             8           if file: match "%.csv$" then 
                                             9             for line in io.lines(dir .. filename) do 
                                            10               local cmd_name,protocol,D,S,F = list: match (split) 
                                            11               if 'POWER' == cmd_name then 
                                            12                 print ("$protocol $D $S $F",  protocol,D,S,F) 
                                            13               end 
                                            14             end 
                                            15          end 
                                            16      end
                                          
                                          

                                          II) I know we are doing this in sections, but as there are many layers of manufacturer folders and device type sub folders, will the eventual end code systematically search for all *.csv files within all the levels below? E.g.

                                          /mnt/nas/vera/ircodes/Samsung/TV/7,7.csv
                                          /mnt/nas/vera/ircodes/Panasonic/TV/128,0.csv
                                          /mnt/nas/vera/ircodes/Panasonic/TV/128,1.csv
                                          /mnt/nas/vera/ircodes/Panasonic/TV/128,4.csv
                                          /mnt/nas/vera/ircodes/Panasonic/TV/128,9.csv
                                          /mnt/nas/vera/ircodes/Panasonic/DVD Player/128,0.csv /mnt/nas/vera/ircodes/Panasonic/DVD Player/160,0.csv /mnt/nas/vera/ircodes/Panasonic/DVD Player/160,16.csv
                                          /mnt/nas/vera/ircodes/Panasonic/DVD Player/160,18.csv
                                          /mnt/nas/vera/ircodes/Panasonic/DVD Player/160,28.csv
                                          /mnt/nas/vera/ircodes/Panasonic/DVD Player/160,34.csv
                                          /mnt/nas/vera/ircodes/Panasonic/DVD Player/160,4.csv
                                          /mnt/nas/vera/ircodes/Panasonic/Unknown_EUR7617010/170,3csv

                                          I found this online, is that the sort of thing we will need to factor i later on..

                                          Alex  /  Jan 12, 2012

                                          Lua function to traverse all files in a folder recursively

                                          Lua function to traverse all files in a folder recursively

                                          Here is a little function that uses Lua File System (lfs module) in order to traverse all the files in a folder and its sub folders (and their sub folders) recursively. DIR_SEP=”\” &#82…

                                          If I remove the ‘filename’ variable call, and specify a file, it then does this.

                                          
                                          LuaTest 1.7
                                          
                                          Lua file: /etc/cmh-ludl/luatest.lua
                                          
                                          Results
                                          Runtime error: Line 10: attempt to index global 'list' (a nil value)
                                          
                                          Locals
                                          [main]
                                          lfs={ _VERSION="LuaFileSystem 1.6.2", symlinkattributes=function, lock_dir=function, dir=function, _DESCRIPTION="LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution", setmode=function, unlock=function, _COPYRIGHT="Copyright (C) 2003-2012 Kepler Project", currentdir=function, touch=function, mkdir=function, lock=function, link=function, attributes=function, chdir=function, rmdir=function }
                                          dir="mnt/nas/vera/ircodes/"
                                          split="[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"
                                          prontoCode=""
                                          
                                          Print output
                                          (none)
                                          
                                          Code
                                             1   local lfs = require "lfs" 
                                             2       local dir = "mnt/nas/vera/ircodes/"   -- make this your path to the files 
                                             3       local split = "[^,]+,[^,]+,[^,]+,[^,]+,[^,]+"  -- (cmd_name,protocol,D,S,F) 
                                             4        
                                             5       local prontoCode = '' 
                                             6    
                                             7       for file in lfs.dir(dir) do 
                                             8           if file: match "%.csv$" then 
                                             9             for line in io.lines(dir .. '7,7.csv') do 
                                            10               local cmd_name,protocol,D,S,F = list: match (split) 
                                            11               if 'POWER' == cmd_name then 
                                            12                 print ("$protocol $D $S $F",  protocol,D,S,F) 
                                            13               end 
                                            14             end 
                                            15          end 
                                            16      end
                                          
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            a-lurker last edited by a-lurker

                                            "list" should be "line"

                                            And /mnt/nas/vera/ircodes/Panasonic/Unknown_EUR7617010/170,3csv files are expected to end in ".csv"

                                            And "file" should probably be changed to "filename"

                                            Refer: https://keplerproject.github.io/luafilesystem/manual.html

                                            Also I see you changed "power" to "POWER", which is correct but it's safer to do this: 'POWER' == cmd_name:upper() to guarantee you get uppercase. You are also using commas in your filenames. While this is allowed in Linux, I'm not so sure it should be encouraged. If that's how they come, so be it.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB | Contributors
                                            Hosted freely by PointPub Media Communications Inc. | Contact us