Marc's Public Blog


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Diving | Dreamstate | Edc | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Monuments | Museums | Oshkosh | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips




More pages: November 2024 October 2024 September 2024 August 2024 July 2024 June 2024 May 2024 April 2024 March 2024 February 2024 January 2024 December 2023 November 2023 October 2023 September 2023 August 2023 July 2023 June 2023 May 2023 April 2023 March 2023 February 2023 January 2023 December 2022 November 2022 October 2022 September 2022 August 2022 July 2022 June 2022 May 2022 April 2022 March 2022 February 2022 January 2022 December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980



2013/01/30 2 way talking to a Lockstate LS-DB-500R lock because the Lockstate wifi Remotelock is no good for me
π 2013-01-30 00:00 in Computers, Linuxha
WARNING: because lockstate is not willing to release anything about the safety of their RF protocol, you should assume that it is vulnerable to both replay attacks (i.e. a neighbour or a van listening to your unlock code, and replaying it later to unlock your door), as well as high speed code sweeps (assume that it is possible to have a custom transmitter transmit all unlock codes in a few seconds and unlock your door).

Actually, the lock is not from lockstate, they simply resell a Taiwanese product from Ez Set which is available through other channels like QVC.

User manual: https://support.remotelock.com/hc/en-us/articles/360001749972-DB-500R-User-Manual

To be fair, many locks are unsafe and can be hacked. Also, the default key lock can likely be unlocked with a bump key, making any fancy unbreakable electronics a bit worthless anyway. So as long as you don't expect a high security lock for $100, let's continue... (but yeah, since I changed their key with a better one that can't be brute forced so easily, I'd feel better if I knew that the RF code can't be trivially sent by a van in the street). It's very possible that Lockstate doesn't know either and only the Ezset folks in Taiwan know.

So, I've been wanting to have a deadbolt (not a lock since electric strikes won't work on my front door), that I can control from my misterhouse PC. For a while smarthome has had an insteon module that talks to Morningstar deadbolts, but it's not a 2 way link: there is no way to know if the door is locked or unlocked.

As a result, I never bought the smarthome/morningstar solution since it was important to me to know that my door wasn't closed right, or closed but unlocked.

Then, I found out about lockstate, and quickly found http://www.lockstateconnect.com/ . A wifi lock, that sounds great, right?

  • It reports local changes
  • No wiring required
  • But, then I read up more about it, and found out it wasn't actually what I was hoping for, nor is it something I can recommend:

  • It will only talk to their server over the internet. Sorry, but I don't want MY lock to report state and be controllable by a remote company
  • How well will your lock work if that company is gone in 5 years, or decides to stop supporting their lock (don't think this never happens, it has many times for other companies 5-10 years after the product is shipped).
  • I want lock updates to go directly to MY server, not theirs.
  • I want MY server to initiate door unlock right away if needed (that lock will only respond to remote events every minute or so depending on how quickly you want the batteries to die, unless someone pushes a button). This is ok for many uses, but not the 'lock the unlocked door now' required by the bug I'll explain below.
  • Right, you said lock bug?
    Yes. After some testing, I confirmed that there is a flaw in lockstate locks with auto-lock. If auto lock fails just once, because your deadbolt is not aligned with the hole (happens easily on my door if I push it too far or not far enough), the firmware will remember that auto lock is not working, and not try to auto lock later.
    The big flaw is that if you manually close the lock, the firmware is not aware of that fact, and it will refuse to autolock until you either power cycle the lock, or your force a lock event using a motor (either using the lock button on the wrong side of the door when you're inside, or using the remote control for the -R models).
    I have notified lockstate of that flaw, but they didn't seem very interested in notifying their customers about it. The fix would include having their CPU read back the microswitches state even when it wasn't given a command (probably having a microswitch event trigger an interrupt that wakes up the CPU and tells it to notice the new state and re-enable auto lock if the deadbolt just got locked ok).
    I have personally fixed that problem by having my computer keep track of the lock state and try to re-lock it using the RF remote if it stays unlocked for too long. But understand that without that, you'll most likely end up with the door unlocked sooner or later if you don't close it in perfect alignment every single time.

    Proof if you don't believe me (it has 30 second delays since I have my door auto locks after 30 seconds)

    Ok, so the wifi lock isn't it. What now?
    Well, I did go with lockstate afterall, because they did have cheap locks that exactly matched the black color motif of my door, and aesthetics was important for the WAF :)

    I bought the Lockstate LS-DB500R-RB (rubbed bronze) because it was a great deal for $100 onsale, and I knew I could very likely hack it to do what I wanted. So, it comes with a remote control, and I knew I could trivially connect its micro switches to a relay and control the door from my PC, just like the Morningstar option, but bypassing insteon and another module I'd have had to pay for.

    The more important part however was how to know whether the door was closed, and whether it was locked.

    The closed part, I solved first by simply using an X10Sec/X10RF DS10A door/window sensor: http://www.x10.com/security/ds10a_s.html . This is a wireless option working on batteries, and it will fail after 1-2 years when the batteries die, but I already have a fully working monitoring setup with those and misterhouse will tell me when the batteries are low or dead.


    Next, I just did not want the lock to require batteries, many comments make it clear that the batteries never last long enough, so I decided to hot wire the door to a power supply.
    First, I used a flat phone cable, which I painted, and only found out later that there wasn't enough copper in that cable (just a few thin wires) and it didn't have enough 'oomph' to actuate the motor, doh! So, I put a second thicker cable with enough copper for just the power, using the phone cable for the return path. I just wired the power where the batteries would go if I had put any.


    Yes, the wires fit on my door because I have a small gap. Your door may be different
    Yes, the wires fit on my door because I have a small gap. Your door may be different

    Return path you said? Yes, I found out how to connect to unused pins on the microswitches and know whether the door is locked or unlocked. You can do this easily without even soldering. See picture:


    Be very careful not to pull the gears. They are in a very specific place and you'll be sorry if you have to put them back after you lost which way they went.

    Now, if you're counting, you'll say that I had 4 wires in my phone cable, and I only used 2 to get the lock/unlock status. It would be nice if the other 2 wires could be used to tell the lock 'lock' or 'unlock', but AFAIK, this is non trivial to do since you don't want a lock to unlock by just easily shorting 2 wires on the board. This is why I got the LS-DB500R with remote control support.
    The interesting bit is that the remote receiver is in the keypad, and the keypad actually will tell the lock CPU: "I received an unlock code, please unlock". This does mean that lock/unlock can be sent over the few wires that go through the door, but I'm somehow hopeful that it's not as easy as just shorting 2 wires :)

    So, instead of explaining in long details, I'll show a few pictures on how to modify the remote control to connect it to relays. I used a small breadboard with a voltage regulator to get 3V from 5V which I have on my 1-wire relay board, and you can send lock/unlock codes by shorting one of the green wires with ground.

    note the holes for power wires, nicely labelled 3V + -
    note the holes for power wires, nicely labelled 3V + -

    finished setup with voltage regulator and power LED (since the remote will not show if it has power)
    finished setup with voltage regulator and power LED (since the remote will not show if it has power)

    And I then connected everything to my 8 Channel 1-wire I/O board from hobby-boards.com.



    If you look at the above picture carefully, relay 7 is an input relay that gets the 2 wires saying whether my door is locked. Locked shows as LED on. Relay 5 is an output relay to send the unlock command to the remote, and relay 6 sends the lock command. From there, you can watch the video showing how sending the unlock command from my PC (off camera) shows relay 5 going on, then input 7 going off showing unlocked, and later relay 6 going on for lock, closing the lock sense relay and turning input 7 LED back on.

    And this is how I got a fully locally controllable lock with lock state sense and door open sense for barely over $100 and a little bit of time.

    By the way, if you want to debug RF, the LS-DB-500R (aka Ez Set), transmits on 433.92Mhz.

    Last, but not least, the lock has another issue where it locks/unlocks the deadbolt on power reset. This is not a huge problem if you are using batteries, but with house power, that means that a power outage would unlock your door for a brief time when the power comes back up. Not so great... So I hacked mine with a Voltage regulator, put the lock behind it and also connected the batteries behind a diode to give backup power if the wall power goes away (diode stops the wall power from trying to recharge non chargeable batteries):


    Also, I figured I'd show the voltage regulator I use to power the door. My original one was a 5V Vreg and it just wasn't enough for the lock. It would often complain that the voltage was too low.
    I now use a 6V LM regulator and add a big diode that prevents both backflow and drops the voltage by only 0.3V, giving me 5.7V. The door is very sensitive to low voltage and will complain loudly if your voltage drops to 5V or less. The batteries can give up to 6.2V or so, and their voltage gets dropped to 5.5V by regular diode that drops 0.7V. The end result is that the battery voltage is always lower than the power supply, and the batteries never power the lock unless the power supply is disconnected (which in my case means a power failure):

    end result
    end result

    2013/01/28 Linux.conf.au 2013
    π 2013-01-28 01:01 in Linux
    Another year, another LCA. Some brave volunteers donated many hours of their time and personal lives for another great conference that we've all come to enjoy (since 2001 for me). I already had come to Canberra last time the conf was there, and while the local diving hasn't improved :) the conf was great again. It was awesome to be able to see Mt Stromlo and the Telstra Tower restaurant this time.

    Thanks to all who made this possible.

    Now, some select pictures. I have a different page for Pictures of Canberra

    On Sunday evening, I met with old friends:


    my old coworker Joey, hadn't seen him in over 10 years
    my old coworker Joey, hadn't seen him in over 10 years


    Speakers get the red carpet at LCA :)
    Speakers get the red carpet at LCA :)


    Bdale gave a nice keynote on his last days at HP, and his retirement, playing more with rockets:





    More about Bdale

    Monday was arduino miniconf day. We built a 2D CNC machine that can draw using CAD files:




    the finished product :)
    the finished product :)



    Tuesday, I was a lucky invitee at the speakers dinner, which gave me a chance to socialize with friends during a nice dinner in a rotating restaurant:








    After dinner, I went to hack on the CNC a bit, and we got mine working with John's help:



    On wednesday, there was a way too early Professional DNS breakfast (instead of dinner). It was nice, but too damn early, and the lack of sleep made it more difficult to follow the talks during the day:



    nice ear rings :) (made with CNC)
    nice ear rings :) (made with CNC)


    Wednesday was the main conf opening. Donna got Rusty's wrench:



    After the conf, I went to the local maker venue:






    Thursday, Bunnie Huang, of chumby fame, gave a great keynote about his experience with designing and selling the chumby, as well as his new device that can add an overlay on a HDCP signal without decrypting it:


    That evening, after the talks, the penguin dinner was at the top of Mt Stromlo:





    Friday, Tim Berners Lee gave quite frankly a pretty lame keynote that many people could not even understand a portion of due to his mumbling, which I guess was no big loss because he just rambled a lot anyway. I'm not blaming the organizers for that, they couldn't have known that he was such a terrible speaker. I just hope others will know this and save themselves the trouble of inviting him.

    And just like that, it was over. During conference close they announced that the next location would be Perth. Paul gave a hillarious 1mn25 talk about the insecurity of social networks, and why you shouldn't link them:

    Then was time for actual conference close:



    thanks Mikal and all the organizers
    thanks Mikal and all the organizers

    After that, Ben nicely invited me for a nice french dinner at the water edge:






    And here are some random pictures from talks and folks:


    git talk
    git talk

    Chrome Boot Talk
    Chrome Boot Talk

    Tridge on radio comms with his self flying plane
    Tridge on radio comms with his self flying plane

    Dirk on subsurface, which I got to use the next week while diving :)
    Dirk on subsurface, which I got to use the next week while diving :)


    Paul, the crazy genius with always entertaining talks:



    fun slides as always :)
    fun slides as always :)

    More pictures of old friends:





    See more images for Linux.conf.au 2013
    2013/01/27 Re-visiting Canberra, Australia
    π 2013-01-27 01:01 in Australia, Ntrips, Trips
    It had been 8 years since my first trip in Canberra, and thanks to Linux.conf.au 2013, I got to go back.

    This time, I was able to score a much nicer flight in 1st class, which definitely made the long flight more bearable:


    Straight off the plane in sydney, I actually took a bus to Canberra, which with 3H door to door, was simpler and just as fast, if not faster, than a plane while being faster. I dropped my stuff at the Uni accomodations and took my skateboard to Questacon to visit a few hours before they closed on that sunday afternoon:



    Questacon
    Questacon



    They had a really good robot playing air hockey:



    Next, I just quickly stopped by the Parliament for a later visit, and went by a few ambassies:




    Tuesday, I had a day off from the conference, so I went to revisit the National Museum of Australia, which quite frankly I had somewhat forgotten about:




    Rabbits spread out... like rabbits
    Rabbits spread out... like rabbits




    Next, I went to see the sculpture garden and the National Gallery of Australia







    From there, I went to the Old Parliament House:



    seeing the old equipment used up to 40 years ago was fun :)
    seeing the old equipment used up to 40 years ago was fun :)

    After the old house, which is now a museum, I went to the current/new parliament:

    it has a nice view on the old one and the war museum all the way down
    it has a nice view on the old one and the war museum all the way down



    Kangaroo and Emu, nice emblem
    Kangaroo and Emu, nice emblem

    cute
    cute



    And that was it for Canberra. There was a little more to see, like the war museum, but I had seen it years ago, and didn't have the time to go back with the conference schedule.

    Right after the conference was over, I went back to Sydney with Linus and Dirk for a flight to Lord Howe Island.

    See more images for Re-visiting Canberra, Australia
    2013/01/20 Back to the Roots Mushrooms
    π 2013-01-20 01:01 in Public
    I bought a back to the roots mushroom kit at Maker Faire last year, and despite following the instructions, it never worked. Turns out that just being close to the kitchen window, pretty much never in direct sunlight, was apparently enough to stop the mushrooms from coming out.

    After getting a replacement, which didn't work either, I finally figured out that it really needed to be in a dark corner. The kit I threw away actually started producing in the garage without even being watered.
    Once I figured that out, I was able to get the kits to work, first inside, and after getting the first crop, I put them outside in the yard for more output :)

    Finally, got some mushrooms indoors, after weeks of failing :)
    Finally, got some mushrooms indoors, after weeks of failing :)

    The other kit had other mushrooms, which were quite yummy too
    The other kit had other mushrooms, which were quite yummy too

    And I was able to get more by just putting the already used up kits outside
    And I was able to get more by just putting the already used up kits outside

    Did we save money or time? Hell no :) but it's about the challenge :)

    See more images for Back to the Roots Mushrooms
    2013/01/15 Seeing the McLaren P1
    π 2013-01-15 01:01 in Cars, Ncars
    I got to see the mostly finished car on display. It looks mean.

    The specs are not out yet, but it could be 800-900HP or more. It's meant to be track optimized, but road legal and ought to be in the 1 mil range. I can't wait to see the top gear track times for this thing.










    See more images for Seeing the McLaren P1
    2013/01/03 Visit of the New Google Paris Office
    π 2013-01-03 01:01 in Google
    Like last year, I went to visit the Paris Office after Xmas, and work there a few days, and got to see the newer buildings now that they've mostly been built.





    The café was quite nice:


    I had lunch with Frank who came visit
    I had lunch with Frank who came visit

    Android toilets:





    The CV is actually a conference room with google video
    The CV is actually a conference room with google video

    A very nice napping room :)
    A very nice napping room :)

    It was nice to see the new digs, it doesn't suck too much to work from there :)


    More pages: November 2024 October 2024 September 2024 August 2024 July 2024 June 2024 May 2024 April 2024 March 2024 February 2024 January 2024 December 2023 November 2023 October 2023 September 2023 August 2023 July 2023 June 2023 May 2023 April 2023 March 2023 February 2023 January 2023 December 2022 November 2022 October 2022 September 2022 August 2022 July 2022 June 2022 May 2022 April 2022 March 2022 February 2022 January 2022 December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980

    Contact Email