-
ChatGPT samples:
Me:
Tell me about an iot program called openLuup.
It:
OpenLuup is an open source home automation system that is built on the VeraLuup platform. It is designed to be easy to install and configure, and provides users with a powerful and versatile way to control their home automation devices. OpenLuup offers a wide range of features, including support for many popular home automation devices, scheduling, scripting, and integration with other services. OpenLuup is designed to be customizable, allowing users to create their own home automation systems. It is an excellent choice for those looking to create their own home automation system without spending a lot of money.
Me:
Write an iot program using openLuup.
It:
--openLuup IoT Program-- -- Initialize Variables -- local device_id = "MyHomeDevice" local temperature_sensor_id = "MyTemperatureSensor" local temperature_threshold = 75 -- Create Devices -- luup.create_device("OpenLuup Temperature Sensor", 0, device_id, "D_GenericSensor1.xml", "I_GenericSensor1.xml", "S_TemperatureSensor1.xml", "") luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 0, device_id) -- Start Timer -- luup.call_delay("check_temperature", 10, "", false) --Function to Check Temperature-- function check_temperature() local current_temperature = luup.variable_get(temperature_sensor_id, "CurrentTemperature", 0) --Check Temperature Threshold-- if current_temperature >= temperature_threshold then --Send Alert-- luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "SendTextMessage", {PhoneNumber="1234567890", Message="ALERT! Temperature exceeded threshold!"}, 0) end --Reset Timer-- luup.call_delay("check_temperature", 10, "", false) endMe:
Write an iot program using openLuup.
It:
Write an iot program using openLuup. -- openLuup IOT Program -- -- Variables local lampState = false local lampTime = 0 -- Functions function lampTimer() if lampTime > 0 then lampTime = lampTime - 1 if lampTime == 0 then luup.variable_set('urn:upnp-org:serviceId:SwitchPower1', 'Status', 0, lampDeviceID) lampState = false end end end -- Setup luup.call_delay('lampTimer', 60, 0) -- Main Loop while true do -- Check for motion if luup.variable_get('urn:micasaverde-com:serviceId:MotionSensor1', 'Tripped', motionSensorDeviceID) == '1' then if not lampState then luup.variable_set('urn:upnp-org:serviceId:SwitchPower1', 'Status', 1, lampDeviceID) lampState = true -- Set lamp timer to 5 minutes lampTime = 300 end end luup.sleep(1) endWhat??
luup.sleep(1)Not good - looks like I still have some semblance of a job to fulfill.
Me:
An iot program called openLuup was written by akbooer. Who is akbooer?
It: (note: answer redacted and as I understand it, also incorrect re: AltUI):
akbooer is the pseudonym of the software developer and home automation enthusiast. He is the creator of the openLuup home automation software, which is an open-source version of the Vera home automation system. He is also the creator of the AltUI graphical user interface for openLuup.
Me:
Who created of the AltUI graphical user interface for openLuup.
and
Me:
Who created of the AltUI graphical user interface for the home automation system Vera.
Names two different people - mmmm.
Regardless very impressive - give it a few more years.
-
Hi,
I am a student and recently i am working on smart home project and writing a seminar paper about the way users handle and manage IoT devices. I you have 3 min, please fill below survey. Its really short.
Thank you in advance, I really appreciate everyone's help. -
For what it's worth, I've been putting the finishing touches on a much-updated version of my DP Apps spreadsheet -- specifically intended for HE users, at least for now -- and invite you all to take a gander http://bit.ly/hedb23 at the PDF one-page version.
Corrections and edits welcome (esp. for the HOMEKIT column, just added yesterday)! Thanks in advance, especially because I'm not a big dashboard user myself, but somehow accepted this role as "keeper of the list" as it were.
-
Hello guys,
I would like to achieve two different things with lights, but I am not sure it could be done. I am starting with smart things, and I am far from any electrician knowledge, wo any help is really appreciated.
I have dumb switches in my hall, controlled from 3 places. I understood that installing one smart module before first switch will make them "hybrid", both smart controlled and dumb controlled.
I would like to buy ceiling light with two bulb sockets. What I would like to achieve is I would like to have one bulb for normal daily usage (lets say cold white full brightness), and second for night time (aprox from 10pm till morning) with some red/orange - minimum brightness.
So question are:
Is there a way to keep both bulbs turning-on separated? So only one will be on during day, and then only second during night?
And could that be done with pressing dumb switch? What would I need to achieve it? (maybe another module into the ceiling lights)
Thank you in advance
-
Aften some testing I watt to clear KWH how ?
Regards Bjarne
-
Hello,
I have a kitchen light that can be controlled by two switches, using either to turn it off or on. I have been slowly changing things over to be a smart home but this is the first switch I am attempting to install.
I am in a double wide modular home (mobile) that was built in 1994.
At first I thought I would need a 3 way switch but when taking the normal switches apart I realized that was incorrect because the wiring on my switches are different than anything I could find online.
For one a 3 way smart switch requires 5 wires and there are only 2 wires going into the primary switch with 3 wires going into the secondary switch from the primary switch (at least I think the 3 wires connect the two switches together). Images will be attached of the wiring.
There are two wires (one black and one white) going into the first switch and 3 wires (black, white, and red) going out of that and into the second switch (I assume). The odd thing is the red wire going to the second switch is connected to the white wire going into the first switch and the white wire going into the second switch seems to be a bridge wire or a traveler wire. Not exactly sure. You will see what I mean in the images.
I need to know what kind of smart switch I can use in this set up with one remaining a normal switch.
Note that for some reason the images got switched around when uploading them. The image with 2 wires on one side and 3 on the other is what I think is the primary and the image with just 3 wires is the secondary.
Primary.jpg Secondary.jpg -
You lot are more likely to have a view than most I know. Our much used Logitech Harmony is (not so) slowly dying.
And Logitech have discontinued the entire line.
And no one else appears to be making something similar.
Was going for a Sofabaton X1, but no numeric keypad. Sofabaton U1, but no favourites.
Anyone got suggestions?
Needs to have those features, oh and not be only a phone app.....C
-
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...
-
-
So, I think I'm in a bit of an unusual situation. I work at a camp & retreat center that has wifi throughout. I want to put a few switches in the office that can control outdoor lighting throughout the camp. We currently have switches in each of the buildings, but it is a particularly frustrating job to get all the lights on in the evening when it is brutally cold out or we are short staffed.
Most of our staff is not very tech savvy (my boss literally has his wife print out his emails for him each day!!!) so, I'd love to avoid having to set up any sort of raspberry pi or new phone app.
Is there type of 3-way switch that can connect to the wifi, turn on a light in another building AND turn on an indicator light in the office, without having any sort of wire running between the buildings? Hopefully looking for a simple solution without breaking the bank too.
I greatly appreciate any input that you can give. Thank you!
Unsolved 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 ?
-
@parkerc motion sensors obviously, but also Netatmo's noise sensor and if lights are on. Geofencing woud be helpful, but haven't used that.
-
I’m just using OwnTracks to my own endpoint saving the messages in a mqtt queue. In the past I used to mix things, but OwnTracks is very good precise.
House modes are driven by the alarm, other modes by tvs. -
@tunnus said in Occupancy - What are people using to check?:
Netatmo's noise sensor
That’s a new one, I did a quick search and couldn’t see anything specific about that - do you have a link ?
-
Hi @therealdb
@therealdb said in Occupancy - What are people using to check?:
other modes by tvs.
Sorry, what do you mean by ‘tvs’?
-
Sorry, I meant Televisions. I have a couple of scenes looking at them to adjust lights, or notify people in the room via Alexa only if the tv is on.
-
@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.
-
-
Re. Sound, just be aware that the sampling rate of the Netatmo app is, at best, 10 minutes. So this is probably OK for occupancy when supported by other measurements, but not, for example, for intruder detection!
-
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.
-
@parkerc I have some friends using pressure mats attached to sensors to detect chairs or coach being in use. I’m not sure earthquake sensors make any sense, even if I’m living in an active earthquake zone.
-
@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 ?