Water Heater control

We call them geysers… but then a geyser is “a hot spring in which water intermittently boils, sending a tall column of water and steam into the air”, so Water Heater is the preferred name?
Recently the thermostat on my water heater broke, or rather it stopped doing thermostat thingies.
What amazed me is the design of the thermostat, 2 pieces of metal with different properties that opens and closes as the water heats up and cools down, This design must have been around for ages…. I suppose do not reinvent the wheel?

For those that does not know what a thermostat is, see Thermostat
For those that does not know what a element is, see Element

Problem with the design though, switching AC current through mechanical contacts, causes the contacts to burn and pit. I do not believe that this design provides very accurate temperature readings?

IoT-BuTT

Yea I know, terrible name, but funny in my twisted mind. Build with the ever popular ESP-8266.

The “idea” came to me when my 84 Year old mom fell ill. She has an apartment in a retirement home. They do supply panic buttons, but when she fell sick the one night and activated the panic button, the care takers did responded to her panic button activation (in due time I might add), but I only found out about the indecent the next day as the night staff could not find my number to phone me. I guess communication failure between the day and night staff, who knows….

The design is not all mine, there are a lot of information about this on the Inter-webs, but I tried to “better” the design a bit, Currently the design is a round PCB at about 44mm in diameter, it uses a 500MaH LiPo battery that is rechargeable – take that Amazon AWS..





 



The charger is supplied as a separate item, I.E. the charging circuit is not build in the design. Initial the design did include the charging circuit, but that increased the thickness of the button with about 7 mm.



The button works like this.

  • When the button is pressed for 30 seconds or longer, the ESP8266 goes into AP mode, you then use your smartphone or PC to search and logon to a network called IoT-BuTT. 
  • Open your browser on your smartphone or PC and goto http://192.168.1.77
  • You are then presented with a screen to fill in the Wi-Fi network SSID and password and a URL to activate.
  • When the parameters are saved, the IoT-BuTT goes into “normal” mode.
  • When the button is then pressed in the event of an emergency, the LED will 1st turn RED, indicating that it is trying to get an IP address from the Wi-Fi network, then start flashing RED every second and it will try and obtain an IP address for 20 times.
  • When an IP address is successfully allocated, the LED will flash BLUE and then GREEN when the URL is successfully send.

So what can you do with the button, well….
look at ifttt

IFTTT – is a free web-based service that allows users to create chains of simple conditional statements, called “recipes”, which are triggered based on changes to other web services such as Gmail, Facebook, Instagram, and Pinterest. IFTTT is an abbreviation of “If This Then That“.

Coming soon – An app for Android that will really wake you up, when the elderly presses the button…


So getting into the Nitty Gritty of the IoT-BuTT

Nice thing about the design is that the device is not powered all the time. It will only power on and start to boot when the button is pressed. So this brings battery duration into a complete different level. When pressing the button, the following happens, the button must be pressed for ~2 seconds or until the RGB LED turns RED. This is to compensate for the boot time of the ESP8266 module. 

NodeMCU must load 1st and then run init.lua

  • GPIO-0 which is linked to CH_PD is set to high when the button is pressed. CH_PD is needed to keep the module enabled after the button press.
  • The RGB LED color is changed to RED.
  • If there are connection details, (a text file with the URL), load the text file.
  • Try and see if Wi-Fi connection is possible.
  • RED LED flashes as it tries to get an IP address.
  • If no IP is received within ~20 seconds, power the module down.
  • If the button stays pressed, remove all the details and shut down, I.E. the next time the module starts up, it will start in AP mode and you will have to reconfigure the SSID, password and URL.
  • Once the details are completed, the text file is saved and will be used with the next boot.
  • When the module is booted and the text file is loaded and Wi-Fi is available with the ssid and password specified, IoT-BuTT will try and connect using the details.
  • If an IP address is available, the RGB LED is changed from RED to BLUE
  • The ESP8266 then creates a TCP socket and sends the URL from the text file.
  • The RGB LED is changed from BLUE to GREEN.
  • The ESP8266 then waits a couple of seconds and sets GPIO-0 to low. This will also pull CH_PD to low and the module is powered down.
  • Some ESP8266 seems to ignore the set GPIO-0 to low, so a transistor is connected to the RGB LED GREEN leg that pulls GPIO-0 to low via a capacitor and resistor

Netflix, HuluPlus, Amazon on Roku device

mmmh I need some BitCoins to pay for all this, please donate some to me :-) .... - 16tb2Rgn4uDptrEuR94BkhQAZNgfoMj3ug

If you live in a country that has censorship laws, corrupt politicians, a crime rate higher than the stars and people taking other people's land and you are desperate to get some decent TV, then this is for you.

I recently had fiber to the home installed, but there was no way to set the DNS in the ONT - Optical Network Terminal, IE the little thingy that's mounted on the wall where the fiber plugs in, this caused some problems for me, as I stream through a Roku device and the Roku device of course does not allow you to set the DNS...

I do have Unotelly, but the problem is that although I can activate the UnoTelly DNS on my computer and stream Netflix by using the computer, that does not solve my Roku streaming problem as the Roku device does not pick up the computer settings, so below is what I did


Install Pacemaker and Corosync on SLES 11 SP3 - Postgres streaming - Part3

Darn, between part1, part2 and part3, no Bitcoins, Is there someone out there?.... - 16tb2Rgn4uDptrEuR94BkhQAZNgfoMj3ug

Hopefully you read through Part 2?

Install Pacemaker and Corosync on SLES 11 SP3 - Postgres streaming - Part2

Darn, no Bitcoins, PLEASE?.... - 16tb2Rgn4uDptrEuR94BkhQAZNgfoMj3ug

Hopefully you read through Part 1?

Install Pacemaker and Corosync on SLES 11 SP3 - Postgres streaming - Part1

When starting Corosync, the Corosync scripts should start Pacemaker as well, you can check this with the following in all the nodes


cl1_lb1:/ # ps -ef | grep corosync
root      4064     1  0 07:14 ?        00:00:07 /etc/init.d/rc3.d/S11corosync start
root      7594 12522  0 10:08 pts/0    00:00:00 grep corosync
cl1_lb1:/ # ps -ef | grep pacemaker
90        4084  4064  0 07:14 ?        00:00:29 /usr/lib64/pacemaker/cib
root      4085  4064  0 07:14 ?        00:00:01 /usr/lib64/pacemaker/stonithd
root      4086  4064  0 07:14 ?        00:00:02 /usr/lib64/pacemaker/lrmd
90        4087  4064  0 07:14 ?        00:00:00 /usr/lib64/pacemaker/attrd
90        4088  4064  0 07:14 ?        00:00:00 /usr/lib64/pacemaker/pengine
90        4089  4064  0 07:14 ?        00:00:00 /usr/lib64/pacemaker/crmd
root      7770 12522  0 10:08 pts/0    00:00:00 grep pacemaker
cl1_lb1:/ #