Weekend fun

One of the toys I’ve been playing with this weekend is the Amazon Dash – contributed by visiting read JAY when he popped over to see me last week.

Oh, before I start – anyone using the SOURCE of my ESP code – (not Arduino IDE) – if you fancy having a go at getting the NAME to show up on your router (as against ESP_xxxxx) and achieve success – PLEASE let me know – the library function that is supposed to do this simply won’t work for me).

SonoffAnd on the subject of ESP – if you’re using Sonoffs – take a look at this - https://github.com/arendst/Sonoff-MQTT-OTA-Arduino – This was good software for Sonoffs BEFORE I started putting in requests – but now – it has at my request DUAL ESSDs (so you can move from one place to another) – and at someone else's and my requests –ECHO support – all in a good job and his code still fits into the standard FLASH – you’ll need the Arduino ESP8266 IDE setup – but that’s easy enough. Worth a look.

And on the subject of SONOFFS – I noted this on Banggood.. £4.80 inc delivery to the UK!

http://www.banggood.com/DIY-Wi-Fi-Wireless-Switch-For-Smart-Home-With-ABS-Shell-p-1019971.html?rmmds=category

Anyway…

Amazon DashThe Amazon Dash (full breakdown here for those interested) is a small device designed, like everything Amazon do – to get you to buy more Amazon products.  £4.99 for the privilege of having a button next to your washing machine to help you buy more washing powder (though to be fair apparently you get the money back on your first purchase). The unit is obviously meant for householders who like to waste money – as it is ultrasonically sealed so long after you lose interest in it, it packs in for good.

But of course we technical types are never stopped by such things – you can prise the thing open and replace the battery.  So now all that is needed is to think of a use for it.

Well, it just so happens that this is how it works – when you press the button, it turns on – transmits a signal (while flashing a light) then turns off. The signal is WIFI and a little Amazon SHOPPING APP on your phone lets you set it up to your WIFI.

So, you don’t after all have to order something with it – you could tie it into your home control system – there is a node for that in Node-Red but I didn’t find it that useful so wrote my own.

tmpB085

Easy really – once it it on your WIFI – tell your router to fix that IP address. Then ping it in, Say, Node-Red. So if you do that regularly, say every second or so – your PING will return true or false.  A simple function to detect change of state toward true – and you can do whatever you like with the result.

Odroid C2The unit is sealed and I would imagine would take a little light rain. I plan to use mine (with a new label) as a doorbell.  How about an emergency helper for someone with a temporary illness or other problem – with Node-Red you could have it send you an email, a text or other alert or just sound a bell somewhere. I’ve been testing this over and over and I can’t get it to fail. Of course-  if the broadband goes down you’re stuffed.

Oh and here’s the clincher.. Black Friday sale they were going for 99p each – so look out for other excuses for a sale – you might get a bargain.

In other interests, I finally got my hands on an Odroid C2 and my Debian script works a treat on it APART from Webmin – working on that and I’ll do a full write-up soon.

Facebooktwittergoogle_pluspinterestlinkedin

13 thoughts on “Weekend fun

  1. Hello Pete,
    What's the delay between pressing the button and getting picked up by the 'ping' node? i.e. how long does it take for the device to establish its self on the network?

    I can't buy one directly in Australia, I sure similar functionality could be done using a 8266, but just not sure what the latency between power on and network establishment would be.

    Cheers,

    alex

    1. Hi there Alex - well, it's about a second. For comparison I put together an ESP8266 which wakes up, connects to WIFI, sends an MQTT message and waits for a reply then shuts down into low power mode (wake on reset) - and that took over 2 seconds which is pretty useless.

      1. For what the DASH is intended to do it is not important how long the ordering takes. No problem replacing it with an ESP.

        If you are using it for something different where speed is a problem you may put the ESP into deep sleep mode (~20 µA) instead of completely powering it off. This may save boot time but I do not know how much.

  2. other done the dash stuff differently: look for arp tables on network, as dash mac address appears, they do something... the dash battery is made for about 1000 presses, so an "impatient" person could consume them very fast 🙂

    i sent you some hacks via email a few weeks ago

  3. I tried to build a Dash-like device using an ESP-01 but the power requirements were too much. Two CR2025 batteries in parallel weren't enough to keep it alive when it went to transmit mode, so it was going to be too bulky.

    1. The ESP has very short peaks of up to 300 mA when broadcasting WiFi. You may reduce the broadcasting intensity to reduce that but for button cells 200+ mA is still too much. Two AA cells are okay (maybe two AAA) but I would use a flat shape quadcopter LiPo battery to reduce size.

      Still bigger than the DASH though. The ESP8266 just was not designed to run with batteries. Maybe the ESP32 will perform better.

  4. Since you mentioned ODROID-C2: I measured consumption a while ago and found it rather high (for an IoT node): https://docs.armbian.com/board_details/odroidc2/

    Good news: Zador, another Armbian dev, in the meantime improved boot script so when running the device headless consumption should be lower. Bad news: Not part of the Armbian image now, this will come with next major update (5.25)

      1. Hi there. Well I had a play the other day - had my ESP wake up, send an mqtt message and go back to sleep - but then I realised the sleep mode is not energy efficient enough to run on button cells (would work with your large batteries) - the button cell route is better for size and I like your diode route but another way, of course, would be a transistor - power to the button powers the unit, transistor (pnp) is turned on by port- to keep power up - when the unit is finished it simply removes power from itself - not built it but I will when I'm done with my DASHBOARD stuff. The only problem with the MQTT route is the time to make the WIFI connection, then send and receive MQTT - actually, it's the WIFI connection that takes time - so no good for a doorbell. All good fun.

Leave a Reply

Your email address will not be published. Required fields are marked *