Go to advanced search

by oldjake
Sat Dec 01, 2018 4:38 pm
Forum: Automation, sensing and robotics
Topic: Tradfri light sunset switch on
Replies: 1
Views: 1022

Tradfri light sunset switch on

After seeing the article in MagPi #76 about Ikea Tradfri lights, I thought I'd have a play. The Tradfri app doesn't have any functionality to switch a light on at sunset. Bit of Python later... from pytradfri import Gateway from pytradfri.api.libcoap_api import APIFactory from pytradfri.util import ...
by oldjake
Sat Dec 01, 2018 2:14 pm
Forum: Other projects
Topic: Occupancy Detection
Replies: 4
Views: 1115

Occupancy Detection

Hi all Been chatting about this in another thread and someone suggested I put it in here as well. I've been playing with the Hive API for a while to turn lights on, adjust the heating, etc. One of the things that Hive is missing is proper geofencing. i.e. If the house is empty it turns the heating d...
by oldjake
Sat Dec 01, 2018 1:52 pm
Forum: The MagPi
Topic: MagPi 76
Replies: 21
Views: 5393

Re: MagPi 76

I should probably start a new thread for this. I've been back and had a look at this Tile thing. As I was playing, I noticed that it also picks up my Fossil hybrid watch... bonus! Anyway, whichever of these I scan for, I get similar results. This is my code: from bluepy.btle import Scanner, DefaultD...
by oldjake
Sat Dec 01, 2018 1:19 pm
Forum: The MagPi
Topic: MagPi 76
Replies: 21
Views: 5393

Re: MagPi 76

For reference, as I'm reading through your blog post, My Bosch/Worcester/Nefity Wave setup used GPS for geofencing (hence the geo part). But it means everyone needs to have a phone, have a mobile connection and have it on and well I have kids so that's not going to happen. The app then tells the kn...
by oldjake
Sat Dec 01, 2018 8:43 am
Forum: The MagPi
Topic: MagPi 76
Replies: 21
Views: 5393

Re: MagPi 76

Thanks. I think it does the job of explaining how it all works.

On the subject of the sunset thing... It didn't work :( It was fine before sunset as the comparison was always returning false. But it still returned false when sunset arrived. I've changed my code so fingers crossed for about 4.00!
by oldjake
Fri Nov 30, 2018 4:37 pm
Forum: The MagPi
Topic: MagPi 76
Replies: 21
Views: 5393

Re: MagPi 76

I don't know about the light sensor. It might be difficult to calibrate. We've got 5 lamps in the lounge that are supposed to all come on at sunset. 4 of them are Hive at the moment and they come on a few seconds apart.
by oldjake
Fri Nov 30, 2018 2:36 pm
Forum: The MagPi
Topic: MagPi 76
Replies: 21
Views: 5393

Re: MagPi 76

Yeah, we went over to the Reading store for a couple of Kilner jars and I came out with 95 quid's worth of bulbs. I really like the Ikea stuff. It's cheap as chips and (touch wood) we've not had a problem with any of it. The dimmer switch things are rubbish but we tend to use Alexa for everything an...
by oldjake
Fri Nov 30, 2018 12:23 pm
Forum: The MagPi
Topic: MagPi 76
Replies: 21
Views: 5393

MagPi 76

If there was nothing else interesting in any other edition of MagPi, I would still pay for them all just for the article about Ikea lights! I've got loads of their bulbs around the house as I'm swapping all my lights from Hive to Tradfri. One of the things missing from the Tradfri platform is the ab...
by oldjake
Wed Nov 28, 2018 8:20 pm
Forum: Beginners
Topic: Communication between two Pis and Camera
Replies: 1
Views: 367

Re: Communication between two Pis and Camera

Will WiFi be available? That would be my first thought. If so, the second Pi with the monitor is a bit irrelevant as the one on the car could live stream using something like MotionEye or RPi cam web interface (https://elinux.org/RPi-Cam-Web-Interface). Then you can just point any browser on any dev...
by oldjake
Mon Nov 26, 2018 1:46 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4982
Views: 1249513

Re: RPi Cam Web Interface

Hi

I'm just wondering if there is a way to retain the .h264 file after boxing?

Cheers
Andy
by oldjake
Mon Nov 26, 2018 8:43 am
Forum: Python
Topic: Struggling with structure of classes and functions
Replies: 3
Views: 770

Re: Struggling with structure of classes and functions

Thanks for that. I did some reading on classes and functions and I think the penny is dropping. The way I'm seeing it is that a class doesn't get run unless it gets called so something like (in pretend code): main prog class classOne(): Do some stuff class classTwo(): Dome some more stuff run classO...
by oldjake
Sat Nov 24, 2018 5:58 pm
Forum: Python
Topic: Struggling with structure of classes and functions
Replies: 3
Views: 770

Struggling with structure of classes and functions

Hi all I'm putting together some bits for occupancy detection. This is my first Python project and it's turning out a lot more involved than I'm probably capable of. This is the code I have: This is my code: from bluepy.btle import Scanner, DefaultDelegate import bluetooth import MySQLdb import mysq...
by oldjake
Sat Nov 24, 2018 9:16 am
Forum: Python
Topic: Detecting a Tile
Replies: 8
Views: 1383

Re: Detecting a Tile

Thanks, Douglas6 I couldn't quite get your example to work but it pointed me in the right direction. I've fudged something together from the documentation which does work. It's probably overcomplicated in the extreme, and I'm not even going to pretend that I get what's happening at this stage, but i...
by oldjake
Fri Nov 23, 2018 9:52 pm
Forum: Python
Topic: Detecting a Tile
Replies: 8
Views: 1383

Re: Detecting a Tile

Aha! Bluepy looks good. I've just installed that and looked at the scanner class. That looks like it scans for what's around. What I can't suss (admittedly, I've only just started looking) is how to do the equivalent of the single line that I use at the moment to do a sort of 'ping' on one address. ...
by oldjake
Fri Nov 23, 2018 6:27 pm
Forum: Python
Topic: Detecting a Tile
Replies: 8
Views: 1383

Re: Detecting a Tile

I think the module Bluez? It's a while since I installed it as it sort of works so I haven't worried until now. Code is as my original post: andyResult = bluetooth.lookup_name('xx:xx:xx:xx:xx:xx', timeout=10) It's just that one line. Then after that, it's: if (andyResult != None): status = "In" Phon...
by oldjake
Fri Nov 23, 2018 12:15 pm
Forum: Python
Topic: Detecting a Tile
Replies: 8
Views: 1383

Detecting a Tile

Hi I've got a Pi that does some occupancy detection so that I can mess with the heating depending on who's in. So, it's doing this: andyResult = bluetooth.lookup_name('xx:xx:xx:xx:xx:xx', timeout=10) I get the MAC address of the device by running: sudo hcitool scan This works fine BUT... If I have B...
by oldjake
Tue Nov 13, 2018 11:45 am
Forum: Troubleshooting
Topic: Onboard camera connector
Replies: 1
Views: 115

Re: Onboard camera connector

Sadly, I don't think you can. I'm assuming you're talking about the little black wedge on the ZIF connector? I got round it but it's on a Pi that runs as a security camera so it never moves. I wedged a small piece of plastic in there that I cut from an old food storage box and then put a couple of b...
by oldjake
Tue Nov 13, 2018 11:32 am
Forum: Automation, sensing and robotics
Topic: Control Sonoff wall swith
Replies: 3
Views: 2354

Re: Control Sonoff wall swith

I did a bit of research on this on a slightly different Sonoff switch but I think the principle is the same. It was a little while ago now and I ended up going down a different route so it's a bit fuzzy. The only way I've found is to use IFTTT and webhooks. The biggest problem I found is that these ...
by oldjake
Sun Nov 11, 2018 5:08 pm
Forum: General discussion
Topic: Multiple touch screens in home automation, is it posible?
Replies: 3
Views: 262

Re: Multiple touch screens in home automation, is it posible?

I'm pretty much obsessed with home automation at the moment. I've done it a slightly different way though. I have one Raspberry Pi 3B+ that sits in a cupboard connected directly to a router. That does all the grunt work. It hosts a Python based website that displays my dashboard that I can customise...
by oldjake
Thu Oct 18, 2018 1:39 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4982
Views: 1249513

Re: RPi Cam Web Interface

Oh, this is what's in the "Convert using" box:

/usr/bin/ffmpeg -f image2 -i i_%05d.jpg
by oldjake
Thu Oct 18, 2018 1:37 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4982
Views: 1249513

Re: RPi Cam Web Interface

Thanks for the reply. I have been variously refreshing or going out of the page and back in again. I kicked off another one after I reduced the image resolution. So my image res is 600 x 900. The preview says 121kb (104). The video bit still says 'Busy". I started the conversion at 11.39 which is ju...
by oldjake
Thu Oct 18, 2018 10:05 am
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4982
Views: 1249513

Re: RPi Cam Web Interface

How long should it take to convert a timelapse sequence? I only tried it for the first time this morning. It captured 198 frames. It's been going for quite a while now and still says "Busy". I just wondered how long to expect it to take. I guess it depends on the resolution but I'm just after an ide...
by oldjake
Tue Oct 09, 2018 7:46 am
Forum: Networking and servers
Topic: Force 2.4ghz
Replies: 1
Views: 448

Force 2.4ghz

I've got a 3B+ which I'm using connected to a BTWholeHome mesh system. This supports 2.5ghz and 5ghz but it only has one SSID, unlike my router which has one for 2.4 and one for 5. So I can't just select the SSID I want. The Pi is quite far away and through an internal wall but it connects at 5ghz. ...
by oldjake
Mon Oct 08, 2018 7:36 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4982
Views: 1249513

Re: RPi Cam Web Interface

@btidey

Tried your idea of entering the 25 in the recording and boxing fields and that's done the trick for me in terms of the playback speed.

Weird!
by oldjake
Mon Oct 08, 2018 7:34 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4982
Views: 1249513

Re: RPi Cam Web Interface

@Kaushik So, my Pi 3B+ was the unstable one, crashing after anything between a few minutes and several hours. On Saturday I turned off motion detection, deleted the MD 1 from the schedule and let it alone. It's now been running stable since then. My Pi Zero, with motion detection running, has also b...

Go to advanced search