Hi All
Hopefully this place looks like a helpful forum as I’m quite new to all this!
I’ve had a few devices all working separately /through their proprietary apps but we’re just finishing off a large house extension and this has added to the list.
I’d ideally like to be able to view/switch a number of different devices on one screen/head end but have no idea where to start.
The devices we have/will have shortly are as follows;
Zigbee Smart Sockets
Zigbee smart switches (for lights)
Heatmiser Neo Underfloor Heating (this runs from a Samsung ASHP but that part is automatic)
Samsung VRF air conditioning (currently using Smart Things App)
Hive (2xLTHW heating circuits in the existing house and Hot Water)
Ring (doorbell!)
Hik Vision PoE CCTV
We have lots of appliances (Neff N70) which we can control remotely but not too fussed about controlling those at the
Moment)
Any help/recommendations would be appreciated!
Thanks
Adrian
I have a legacy home automation set-up running on Windows XP. the computer and software have now died.
I have written a very nice Excel VBA program to replace the software and it can run on any modern Windows system.
My only remaining problem is to output the correct signal to a USB port to trigger the wireless switches.
Has anybody done a similar exercise. Please help.
Hi All,
Kind of new to Home Automation. Started off Using Amazon Echo units and added a Samsung SmartThings hub. I have mostly been using plug in modules for turning lights on and off. I live in a very rural area where the internet goes out a lot. I eventually want to change to to a non internet Hub so things will work without needing an internet connection. But I will post with those questions at a later date.
So, the task at hand is this: I have flood lights at each corner of my house. They are currently controlled by switches at the front and back doors. I would like to add Security Cameras to each corner also. I can easily find small Wifi switches to put into the electrical box where the flood lights are located, then I can terminate the leads together behind the Decora switch to have constant power. Then I can use the constant power up at the lights electrical box to power the security cameras. I would also like to have a wireless switch to take the place of the Decora switch to be able to turn the lights off and on.
I cannot seem to find a product like this. It seems I can find the small wired in switch boxes that will also come with external smart wall switches, but the wall switches are an external box that does not fit in or cover the existing Wall switch electrical box. I can also find Wireless Decora switches that come with a remote wired in small switch box , but they all seem to be RF and do not integrate with a Smart Hub.
I am hoping someone here knows of a product that matches what I am looking for. Any help would be appreciated.
Also any recommendations for Wireless Security cameras are welcome.
Thanks for any help.
Dear Forum,
I am just starting a smart home system. I've wanted to do this for 10 years at most and really would like to get a start. What I have are a couple of SONOFF wifi relays, some 433 (Hz/mHz) switches ( not wifi ) a couple of wifi lightbulbs, and I'd like to expand wifi thermostat, leak/water detectors, garage door openers and what ever else I can think of.
In the SONOFF items I have it's a particular app, the wifi bulbs are another app, and if I do a thermostat there might be another app. My wife is not a Luddite but she damn sure doesn't want to have to trouble shoot if/why a particular app breaks down.
So in what I do understand about smart home things is that I need/want a HUB. I spent 15 years doing some programming so I do have some computer ability, though I'd prefer to stay away from HAVING to line command operate the hub.
I would like a list of HUB's that people have found to be the best. Even better are links to let's say Amazon for that hub.
Regards from Noob Smart Home,
Barry
Hello lovely people. Long time and all that. Hope you're all doing OK.
Bit of a left field one here, looking for extra eyes more than an answer and you're the most logical bunch I know 🙂
Part of our HA system is a Logitech Elite hub and remote control.
This is programmed to control my Cyrus Stereo, our TV, and HDMI switch and our Virgin V6 box.
I've been away for a couple of days. Got back this evening to (eventually) work out that the V6 box appears to be not accepting any commands from the Logitech.
Everything has been rebooted.
Logitech uses IR to control
Cyrus: Fine
TV: Fine
HDMI: Fine
Remote control uses Bluetooth to control Hub.
All commands from the Remote to the hub are executed (one might assume correctly) as the activity LED responds, and if you're controlling (say) the Cyrus, all works fine.
iOS App can be used to control Hub over the WLAN:
All commands from the App re executed (one might assume correctly) as the activity LED responds, and if you're controlling (say) the Cyrus, all works fine.
Native remote (that uses as far as I know bluetooth) to control the V6 box works fine.
V6 box refuses to acknowledge any command other than from the native remote. Remote or app provoke absolutely zero response from the V6 box.
This is annoying, but damned if I can think of any logical reason. One might assume a firmware update on the V6 box, but given that the Hub simply emulates the native remote, that seems unlikely.
I'm struggling to think of where even to start troubleshooting this, so any random thoughts would be appreciated.
My initial approach is to buy another hub in case there's a different radio set that's failed in the hub...
TIA!
C
I currently have an HVAC system in the attic - for heating and A/C. 120v is supplied to the unit to run the gas heating. A/C uses 240v. I have an ecobee thermostat...which sometimes goes offline....not often. When it goes offline, I need to turn the 120v power to the HVAC system off and then back on (the ecobee gets its power from the HVAC system). That resets the ecobee and all is fine. I spend the summer away from this house and if the ecobee goes offine..I have no current method to reset the HVAC 120v power remotely. My idea is to replace the current 120v plug in the attic with a smart plug...then I can remotely turn the 120v power off and the ecobee will reset and come back online. I use Wyze and Lutron Casita in the house currently and was hoping I could find an in-wall smart plug from Wyze or Lutron. Obviously, I don't need diming, etc...just the ability to turn the plug power on/off. I've seen some options...but one problem I have is the attic can reach up to 135F in the summer...many of the smart plugs I've seen are not rated for that temperature. Might any of you have any thoughts on a smart plug I might want to look at? I don't want to invest in anything that would require a new hub - so either WiFi based or Casita HUB based. I need 120v and 15amp ratings. Thanks in advance.
I am trying to run a reaction that turns on lights if a sensor has not been tripped for 2 minutes. Basically, when a garage door is open, turn on inside lights if nothing has been sensed for 2 minutes. My question has to do with the expression/variable for "Last Seen". The variable never gets updated over time since the last seen event never changes.
Screenshot 2024-09-02 191632.png
In the screenshot above, the reaction checks for any garage door as well as the variable called "GarageLastEntry". The expression for this variable is displayed below:
Screenshot 2024-09-02 191651.png
The problem that I am experiencing is that the variable never changes over time. I understand that this is because the "last seen" variable does not change over time when there is no activity. In this screenshot, the value shows 0.029... This can also be seen as the current value in the original reaction screenshot above. After 10 minutes, this value should be 10. However, when a garage door is opened, the variable does not get updated and thus the rule does not become true since .029 is less than 2.
When I go to the variable and click on the > icon, the variable then gets updated as expected as seen below:
Screenshot 2024-09-02 191711.png
So the ultimate question is, how do I use a rule that can use a variable such as "last seen"? Do I need to create another variable or reaction that multiplies this by 1 every minute? From what I read in the manual, a variable is evaluated every time it is included in a reaction. But this is not what I am seeing.
I also want to ask another question related to this variable. It seems like Reactor continuously deletes this variable and I have to keep recreating it? I have never experienced this with MSR so wanted to ask if this is a common problem or if my definition is causing this.
Any info is appreciated!!!
BACKGROUND
I have been using 4 x Yale Contactless Connected Door Locks for several years (they use either a rfid tag or code to enter)
I have also been using 1 x Yale L1 Door Lock on the main front door and this connects via Yale Software
Yale contacted me to advise the L1 Lock software was being withdrawn and I needed to install a Yale Access Module into the existing lock and a Wi-Fi Bridge to link it with the newly released software
ALL of the above was working just fine.
RECENT
Yale emailed to advise I should add a Yale Access Module to each of the 4 other locks as this would link with the updated software via the Wi-Fi Bridge.
They offered a deal of just £4 each for these Modules so I got them.
THE PROBLEM
I found that only 2 of these modules would slot easily into the locks - two of them bent the pins and one of those snapped the female part in a lock (I do have a spare lock but thats not the point).
Anyway, I began to set-up the two fitted Modules with the Wi-Fi Bridge and I eventually found (thanks Google, NOT Yale) that I now need 1 x Wi-Fi Bridge PER LOCK (£50 each).
QUESTION
Does anyone know of a compatible Wi-Fi Bridge which works with Yale AND can handle multiple connections (ie 5 all 5 of my locks) ?
THANK YOU
Some of you may know that I took at shot at building an alternate geofencing solution for Vera. The core of it was system agnostic, using the OwnTracks application and AWS lambdas to track devices and keep a central data, then disseminate that to the Vera via a websocket-based plugin. It worked with other apps as well, including Tasker and GPSLogger, but of the dozen people that were testing it, most used OwnTracks.
A lot was learned in the process, not the least of which is that the success of any such solution is highly dependent on the phone and its settings. Phone manufacturers love to set things up for the longest battery life, of course, but that's usually very anti-geofencing behavior. In the case of at least one brand, it was unusable and the settings could not be modified. It was also cost-prohibitive to maintain on Amazon, as AWS grabs a dime here and a dollar there and before you know it, it added $100/month to my AWS bill, which my wife deducted from my Scotch budget. Unacceptable.
But it's quite reasonable to use OwnTracks to a local endpoint, and I could pretty easily replicate the functionality as a local application, or maybe even as an additional endpoint built into MSR's API (still separate port and process, but in the package).
So the question really is... would you do it, or would you be too concerned about the security risks associated (e.g., dynamic DNS and NAT mapping in the firewall necessary for the phone to contact the service when not on LAN)?
Hello forum instigators.
Not sure who host/runs the forum software but a couple of challenges:
The chat is not currently usable, as the scrolling is all not right and it's not possible to read chats or send chats reliably.
There are a lot of female members that should perhaps be on another forum; where they can advertise their skills more appropriately. Note: I agree it's a job, like any other.
Whoever you are - thank you for your invaluable work.
I run a B&B and am looking for a way to turn the lights off whenever a room is unoccupied for X amount of time. The guest should still be able to turn the lights on and off manually, but should not be able to disable the auto turn off feature if the room is unoccupied.
I guess I am looking for a light switch with a built in presence sensor? I guess a presence sensor would be better as if it is a motion sensor, the lights may go off unwanted if the guest fails to make sufficient movement e.g. if the guest is lying down watching a film.
Are there any products on the market that would work for my application?
Hello,
I am in search of a device capable of using Bluetooth to connect with a smartphone and serve as its primary sound source on demand. This device should function similarly to conventional Bluetooth headphones, which automatically become the phone's sound output upon activation. However, this device should differ in that it transmits the audio signal to an amplifier via a jack, SPDIF, or similar connection. Alternatively, it could be an integrated amplifier that directly sends the signal to passive speakers.
The control of this process should be manageable through an API such as MQTT, REST, MODBUS, or similar. Are you aware of any devices that operate in this manner?
The concept is as follows: upon entering the bathroom, I would press a wall-mounted switch. This switch would send a signal to the Bluetooth device, prompting it to connect to my smartphone and seamlessly continue playing the audiobook I am currently listening to. Instead of using the phone's speakers, it would seamlessly start playing through ceiling-mounted speakers.
Many thanks 🙂
Hi folks,
I currently have some cheap Zigbee hub and some Amazon Alexas running my smart home which mostly consists of Zigbee power strips and Zigbee battery powered switches.
It all worked OK originally, but now whenever I press a Zigbee switch the light in the corresponding plug switches on then immediately off again.
If I ask Alexa to turn the light on it works fine. Likewise if I switch it on from my phone.
Any ideas what the issue could be?
I've tried unplugging the hub a number of times but that doesn't seem to fix it.
I was thinking about getting a Homey Pro 2023 to speed things up (tmas the Zigbee hub seems to be really slow now as well, for some reason) but I'm not sure about that either.
Any suggestions greatly appreciated!
Looking for a recommendation:
Locksmith is trying to talk me into the Yale Assure Lock Touchscreen with Wi-Fi and Bluetooth - the original 1st generation because they said it's built better than the Assure Lock 2. Any thoughts on this? Which would you recommend?
I see Mul T Lock makes a cylinder (KW-KIDYRL) for Yale Smart Locks. Would this fit the 1st gen Assure Lock, as well as Assure Lock 2? Has anyone tried replacing the cylinder with this on either lock?
Other smart lock I was considering is the Schlage Encode Plus.
Thanks!
Hi. So when I had my house build I ran a bunch of stuff, one of which being two pairs of speaker wires to each bedroom and to 4 spots around my living room… Over the years I have used them here and there with different success.. But today they sit in my walls just unused.
I converted all the cat6 or 5e (I don’t remember) over to basically eithernet jacks. The cable coaxial well it’s there but now unused. But I was thinking there has got to be some use for two pairs of speaker wires to each room. Can I make them usb plugs? Not sure so looking for ideas.
Thanks in advance for your thoughts on this.
Kevin
Hey guys...
We are replacing the heat pump and furnace this week and I will also need to replace my nest thermostat at the same time 'cause Nest is ending the cloud thing end of the month.
Anyway, I'm looking to use the
T6 Pro Z-Wave Programmable Thermostat | Smart Home | Honeywell HomeThat's what the heat pump installer recommend BUT, using Nest I was also using it to control the home humidifier using a single wire connected to nest... but no low voltage thermostat is able to do that, I checked all of them...
So I need some help on how I can do that, to connect the home humidifier using zwave also....
Hi
We are looking for a solution where we can detect presence of a «thing» (people , car , dog, cat, and more..
We need:
fast detections, 1-3 seconds in range from 0 to 20 m from «base» fysical «client» , chip , transmitter , unit. base , receiver placed at a door, gate, house, etc uniq Identifying wirelessThe client:
no need for pressing any thing (no buttons) battery , hoply 2-5 years battery time.Have someone done anything like this?
What technologi will be best?
Hey everyone, I'm currently working on developing a bed sensor that can detect when you're out of bed. It could be used to trigger other smart home gadgets, like lights or blinds, temperature etc.
The sensors are placed under the legs of your bed post. Should look and feel like "smart furniture pads" with size 2 inches in diameter and 1/4 inch thick.
Before we go any further, I'd love to get your thoughts on this - would a bed sensor like this be something you'd find useful? We're still in the early stages of development, so any feedback you have would be greatly appreciated. Thanks in advance!
smart möbeltass.JPG
@DesT, fenced code blocks display differently after the upgrade.
abc defThe above should display as abc and def on two separate lines. This works. But this fails:
verbose: true config: data: "auto"The above should display as three lines, verbose: true, config: and data: "auto", but this fails. In order to make it display properly, I now have to open the fenced code block with ```text (specify language, generic text). This displays without highlighting. The words yml and yaml (and the all-caps versions) don't seem to be recognized. I can also use js to get JavaScript highlighting, but this isn't great for YAML. Here's the same block with the language (text) specifier added (no other changes):
verbose: true config: data: "auto"Sure, we can start adding language specifiers to our new posts, but I suspect if we start digging around old posts, we're going to find a lot of broken display of the fenced code blocks (plain ``` at the start with no language specifier) in the thousands of old posts in these forums, upon which people still rely for answers and information.
Log file snippets also get similarly brutalized:
[###BUILDVERSION###]2023-04-26T19:41:51.683Z <ZWaveJSController:NOTICE> ZWaveJSController#zwavejs added file logger to zwavejs.log [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_device_cfg, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_mfg_spec, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_device_ver, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.747Z <ZWaveJSController:WARN> zwavejs_capabilities defines x_zwave_values, which is not consistent with the recommended naming [###BUILDVERSION###]2023-04-26T19:41:51.837Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs connecting to ws://192.168.0.10:3000 [###BUILDVERSION###]2023-04-26T19:41:51.874Z <ZWaveJSController:NOTICE> ZWaveJSController#zwavejs connected [###BUILDVERSION###]2023-04-26T19:41:51.874Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs sending connection initialization [###BUILDVERSION###]2023-04-26T19:41:51.931Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs greeting from server: [Object]{ "type": "version", "driverVersion": "10.16.0", "serverVersion": "1.28.0", "homeId": 3631280043, "minSchemaVersion": 0, "maxSchemaVersion": 28 } [###BUILDVERSION###]2023-04-26T19:41:51.932Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs performing initial inventory [###BUILDVERSION###]2023-04-26T19:41:52.325Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs manufacturer-specific data for 134 (AEON Labs) from package ver 22315.1 [###BUILDVERSION###]2023-04-26T19:41:52.328Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs configuring node 1 endpoint 0 (entity "1-0") [###BUILDVERSION###]2023-04-26T19:41:52.339Z <ZWaveJSController:INFO> ZWaveJSController#zwavejs manufacturer-specific data for 543 (Elexa Consumer Products Inc.)I think this is going to be a problem. Is there a way in NodeBB to configure the default language for fenced code block markdown for the entire forum so that these display more as they did before the upgrade?
EDIT: Examples below of old posts with corrupt formatting now:
https://smarthome.community/topic/1101/dynamic-groups-controller-filter-expressions
https://smarthome.community/post/11362
This last old post is interesting, because the first block displays incorrectly, but the second block is OK. In playing around, there seem to be triggering character sequences, suggesting that the markdown processor is trying to "guess" the language but not getting it right, perhaps:
https://smarthome.community/post/11332
Discover IR codes for lost remote
-
@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 ?
-
@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)
-
There is a great community/code bank on GitHub.
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
-
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 ?
-
well, it's possible in LUA as well. I'm not that expert in the file system libs, but Google is your friend
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.
-
@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.
-
Thanks @akbooer
Some quick questions .
- Where would be the best place to store/sync the .csv files ?
- 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 ?
-
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?)
-
@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..
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 ?
-
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)
-
@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.
-
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.
-
@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.
-
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,3csvI found this online, is that the sort of thing we will need to factor i later on..
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
-
"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.
-
Thanks, I’ve made a few adjustments based on feedback, and using just one .csv file for now, which it seems to find ok, based on the print output, but it unfortunately doesn’t extract the POWER information?
LuaTest 1.7 Lua file: /etc/cmh-ludl/luatest.lua Results No errors Runtime: 9.9 ms Code returned: nil Print output 7,7.csv Code 1 2 local lfs = require "lfs" 3 local dir = "mnt/nas/vera/ircodes/" -- make this your path to the files 4 local split = "[^,]+,[^,]+,[^,]+,[^,]+,[^,]+" -- (func_name,protocol,D,S,F) 5 6 local prontoCode = '' 7 8 for filename in lfs.dir(dir) do 9 if filename: match "%.csv$" then 10 print(filename) 11 for line in io.lines(dir .. filename) do 12 local func_name,protocol,D,S,F = line: match (split) 13 -- print(line) 14 -- print (line: match (split)) 15 if 'POWER' == func_name:upper() then 16 print ("$protocol $D $S $F", protocol,D,S,F) 17 print (func_name) 18 end 19 end 20 end 21 end
-
My fault. A rookie error in the code (which, obviously, I hadn't tested.)
For your purposes, it's probably good enough to use the search string:
local split = "([^,]+),(%.*)" -- (func_name,protocol,D,S,F)
So this I have tested, and it works.
local lfs = require "lfs" local dir = "mnt/nas/vera/ircodes/" -- make this your path to the files local split = "^([^,]+),(.*)" -- (func_name,protocol,D,S,F) local prontoCode = '' for filename in lfs.dir(dir) do if filename: match "%.csv$" then print(filename) for line in io.lines(dir .. filename) do local func_name,etc = line: match (split) if 'POWER' == func_name:upper() then print ("$protocol $D $S $F", etc) end end end end
giving this output, for example:
7,7.csv $protocol $D $S $F NECx2,7,7,2