Hello! My name is Svetlana, I'm a UX/UI designer working on a design for a smart home app. I want to know about the experience of using any smart home application (be it MiHome, Tuya, Home Assistant, etc.) and your own thoughts. If you have a similar experience and want to help, please write to me in private. Your participation will help me make the product better and understand the needs of real users. I'm looking forward to communicating with you! Thank you.
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
Occupancy - What are people using to check?
-
Hi,
I have a lua/luup piece of code that checks, if any motion sensors have been tripped within the last 20 mins, and if not then to let me know.
I then look at pinging TVs to see if they are on, in order to help rule out if someone’s just sitting still, and then I look at bluetooth sensors (RoomMe) and also Wi-Fi devices (UniFi) to help identify specific people’s active devices.
I know there’s no perfect solution, but I was wondering what are other people using ?
-
Hi @therealdb
@therealdb said in Occupancy - What are people using to check?:
other modes by tvs.
Sorry, what do you mean by ‘tvs’?
-
@therealdb said in Occupancy - What are people using to check?:
I meant Televisions
Sorry, I see it now
What are you doing to check if the TV is on/off, do you have energy metered plugs, or do you have an api call direct to the TV?
-
Both. Dummy TVs are behind a plug and I’m watching for watts to know if it’s on or off. Smart TVs are LG and I have api in place to report current input and volume. Plus, I have a sky Q device to know the current channel being watched on the main tv.
I’m turning lights on and off automatically with TVs and adjusting the TTS announcements volume in order to increase it when volume is very high. I also have notifications in place on the TVs (similar to push notification, but local).
-
Thanks @therealdb
I’m keen to build upon my initial set of scripts, to create something a little more accurate
The motion sensors seem to be the best 1st check, but as people can just be sitting still, it’s not perfect, so it’s then those secondary checks I’m keen to do too..I’m using the following script to check for movement via my DSC motion sensors
module("xxoccupancy", package.seeall) -- first check if any motion sensors have tripped in the last 15 minute local tt = {} local SEC_SER = "urn:micasaverde-com:serviceId:SecuritySensor1" local sensorsum = 0 local sum = 0 local next = next -- https://stackoverflow.com/questions/1252539/most-efficient-way-to-determine-if-a-lua-table-is-empty-contains-no-entries for n,d in pairs(luup.devices) do if d.id:lower():match( "^zone%-" ) and d.category_num == 4 and d.subcategory_num == 3 then sensorsum = sensorsum + 1 local lasttrip = tonumber(luup.variable_get (SEC_SER, "LastTrip", n) or os.time()) local timeString = os.date(" %Y/%m/%d - %X", lasttrip) local timediff = os.time() - lasttrip if lasttrip > 0 and timediff < 900 then sum = sum + 1 table.insert(tt, { devnum=n, name=d.description, last=lasttrip, ltimeHR=timeString, td=timediff }) end end end table.sort(tt, function(a,b) return a.last > b.last end) -- sort highest to lowest if next(tt) == nil then print("No one is moving") xxprowl.send_prowl ("VeraPlus (Home)", "Occupancy Notification", "No motion sensors have reported movement within the last 15 mins") return true else print(sum.. " out of " ..sensorsum .. " motions sensors, reported movement within the last 15 mins") for n,d in ipairs(tt) do print(d.name .. ' was last tripped on ' .. d.ltimeHR .. " - " .. d.td .. " seconds ago") end return false end
I have a Sonos one too, checking to see if anything is being listened to, and an API for Panasonic TVs to check if any are on.
I don’t have Sky Q, I’m still on Sky HD, but I’m not checking anything to do with that (yet). You mentioned that you check the channel being watched, what do you do off the back of that information ?
-
@parkerc I have hue lights and I’m adjusting them based on what’s on TV. So, it’s basically doing light automation based on 3 programs (normal, sport, cinema).
I’ll probably add an home theater setup later and I’ll use the cinemas and series channels (plus netflix/prime/Disney+) to adjust audio as well.
-
I mentioned the Merrytec previously, now I've tried it out, it does what it claims.
I guess the negative to it is that it needs to be hardwired in.Breathing Detecting Technology
Innovative patent energy saving switch.
Dry Contacts - Control Lights.
ON-OFF automatically, supersedes traditional switch.
Only very slight movements are required, detects human breathing.
Variable delayed shutdown if light control is enabled.
Interference free of flying insects, falling leaves, air flow and wireless signals (WiFi, Bluetooth, 4 or 5G).
Adjustable detector settings, suitable for various locations.
Available in KNX or Zigbee models.You would need to do a google search to find it in your region
-
@black-cat said in Occupancy - What are people using to check?:
it does what it claims.
Amazing! Just imagine if all HA products did that!
-
One thing I’ve not explored yet, is the seismic sensor that’s in one of the Fibaro motion sensors i have - the manual talks about Earthquake detector mode
“FIBARO Motion Sensor can be configured to work as a simple earthquake detector, by setting tparameter 24 value to 4. Reports with scale of the vibrations (dimensionless) will be sent at the time intervals specified in parameter 22. First report will be sent immediately after vibrations have been detected. The minimum value of the vibrations, resulting in report being sent, can be defined in parameter 20. Once the vibrations cease, reports will stop being sent. “
Now admittedly I’m in the UK , so not really in earthquake city, but there are some very heavy foot’d people in my house who i could potentially test some occupancy scenarios with e.g. when a particular chair/sofa is sat on, or stepping on something like a door mat, or perhaps it’ll sense when someone walks across a wooden the floor..
Any other ideas for a seismic sensor ?
-
To keep the code sharing going, this is what I have to check if any Sonos device in the house is being used.. (I’m always open to any feedback on my coding quality etc.)
module("xxactivesonoscheck", package.seeall) -- spot check to see any Sonos devices are being used local sonosserv = "urn:upnp-org:serviceId:AVTransport" local sonosdevices = 0 local nonactivesonos = 0 for n,d in pairs(luup.devices) do if d.id:match( "^RINCON" ) then local state = luup.variable_get (sonosserv, "TransportState", n) local status = luup.variable_get (sonosserv, "CurrentStatus", n) if string.match(status, "Group driven") ~= "Group driven" then sonosdevices = sonosdevices + 1 if state == "STOPPED" or state == "PAUSED_PLAYBACK" then --print(d.id, d.description, state, status) nonactivesonos = nonactivesonos + 1 end end end end if sonosdevices == nonactivesonos then print("Nothing is being played on a sonos device") return true else print("Something is being played on a sonos device") return false end
-
The
d.id:match( "^RINCON" )
is a little crafty. You're relying on the contents of private data of the implementation, which could change any time. Unlikely to change is the device type, so a better check isd.device_type == "urn:schemas-micasaverde-com:device:Sonos:1"
Style-wise, the indenting is corrupted by the mixed use of tabs and spaces for indents. Choose one or the other, but don't mix.
-
@akbooer said in Occupancy - What are people using to check?:
@black-cat said in Occupancy - What are people using to check?:
it does what it claims.
Amazing! Just imagine if all HA products did that!
and there lays the difference between Home Automation and Building Management products - notably the price difference between amateur and professional use.
At the end of the day you get what you pay for. -
Hi all,
In the process of doing this, I’ve created a number of occupancy check scripts, each one of them is currently it’s own module (i think that’s the correct term)?
xxoccupancy-motion.lua xxoccupancy-sonos.lua xxoccupancy-lights.lua xxoccupancy-tvs.lua
I’ve done this to make each one manageable, with each one ultimately running a global function that will return either true or false if the occupancy criteria check is meet (true for no activity, false for recent activity)
- Although saying that, I’m probably going to make the ‘lights’ one the target now, , so if no motion, tvs or sonos are found in use, (thus all true) then run the other one, to turn off all known lights.
Is that a good approach, or would dofile() be better, or should I simply put them all to one ‘module’ ? How would you approach doing multiple assessment/checks ?