Heating control

0

Recently I mentioned monitoring the house with wireless sensors dotted around the place. It uses node-red to average the temperatures, and come up with a synthetic value that gets reported back to the home control system, Domoticz.

Next stage is to control the heating.

The heating system in my house is a very old design, and there’s simply a plug for the heating pump, and a plug for the boiler. When the heating is commanded to turn on by the control device (so old it’s not even a thermostat) downstairs, it really just connects these two plugs to a mains supply. The boiler and pump then turns on, and warmth ensues.

My chosen method of automation is simply to keep the heating ‘on’ all the time, and have some sort of device plugged in to the plugs in order to turn them on and off remotely. I want this to be completely retrofittable, so we can remove or change it at a later date without massive amounts of rewiring.

My initial thought was just to use a couple of LightwaveRF appliance modules, but I had a USB controlled dual relay floating around that I long planned to control the TV with, but never quite managed to get around to. Additionally, and conveniently, up the loft there’s a laptop that I use for transcoding the satellite feed to IPTV (with TVHeadend), so it was a simple case of hooking the USB board up to that laptop and getting some software on to it.

Also, to make it a bit safer, and along with the retrofitting feature, I opted to put the relay board into a little dual gang enclosure, and wire in some 13A sockets that I had in the garage.

The end result is a little deamon called mqtt-usb-relay that sits and listens for MQTT messages and then act upon them to turn the USB connected relays on and off. It subscribes to the /raw/`hostname -f`/usb-relay/#, topic, and simply takes the last component of the topic as the relay number to control, and the message as the state to turn the relay to.

Now, doing this ‘correctly’ would involve parsing the JSON output of the 3rd party mqtt.js script for Domoticz, but I decided to keep things simple and to use the On and Off Actions built into Domoticz to trigger simple mosquitto_pub events.

To do this, just create the dummy switch in Domoticz, and in the On/Off Action field, stick in commands similar to this.

script://///usr/bin/mosquitto_pub -h mqtt.vpn.glasgownet.com -t /raw/wmlp1000.vpn.glasgownet.com/usb-relay/1 -m 1

Job done. The heating can now be controlled from Domoticz. It’s not extensive control over zones or power levels of the boiler (although I have an idea for that), but it can certainly command the ‘MORE HEAT’ desire, and maybe one day I’ll install wireless TRVs on the radiators.

Household temperature monitoring

0

I’ve had it in my mind to control the heating of the house via the computer for a while now, but my first requirement was always to monitor the environment, so the computer can at least make an informed decision about whether the heating is *actually* required.

A while ago I purchased an RFXCom transceiver for my home automation needs, and it’s been one of the best decisions I’ve made with regards to home automation. Not only can it transmit and receive LightwaveRF signals, it can also do Byron, Nexa, X10, Oregon Scientific, and a whole tonne more.

I subsequently discovered these dirt cheap Imagintronix humidity and temperature transmitter devices, which you can buy for £7 each. The temperature sensor needs to be calibrated against a known source, and you then apply the difference to the device as it is picked up in Domoticz. It’s all rather simple, and you immediately have a source of temperature data that can be used. I took a variety of these sensors, and put one in each room, and rather quickly gained an overview of the house from within Domoticz.

Room temperatures

Next up was the desire to average out these temperatures per zone. We have a very simple heating system with only one zone, so it was a simple case of averaging all the temperatures to get one value that we can notionally call the ‘Average house temperature’

The issue here is that Domoticz can’t do that sort of simple calculation. It has a Blockly engine built in to it, but I didn’t see any way of making do simple calculations. However, there was a way around that…

I already use the mqtt.js script from http://www.domoticz.com/wiki/Setup_MQTT_support_to_connect_external_devices to publish MQTT messages from Domoticz, and Node-Red to do some other MQTT management things, so it was just a case of getting Node-Red to do the work instead, and then to JSONify it and push it back into Domoticz.

[{"id":"b75445a3.48abb8","type":"function","name":"JSONify","func":"msg.payload = '{\"idx\":46,\"svalue\":\"' + msg.payload + ';0;0\"}';\nreturn msg;","outputs":1,"x":495,"y":463,"z":"d5caab33.2a3558","wires":[["a4bce105.5b432"]]}]

Sorted, there’s now a dummy temperature sensor in Domoticz with IDX 46, and Node-Red emits a MQTT message with the appropriate JSON content for Domoticz to pick up and use with the temperature sensor.

Average temperature

Next step is to actually use that data…

L8 Lateness

0

Since the very beginning of https://www.kickstarter.com/projects/l8smartlight/l8-smartlight-the-soundless-speaker/ the founders of this project/company have been appalingly slow in responding to *anything*.

The product was delivered close to 2 years behind schedule, and in many cases backers had to plead for updates, and would often get one update every 2 to 3 months.

Suffice to say, the final product is somewhat lacking. But hey, it’s Kickstarter, so I’m not expecting an Apple class product. I am expecting decent communications from a company that has a Marketing and PR expert as a Co-Founder though.

One of my units was defective, so I emailed them for replacement guidance. A month and half later they emailed me with instructions…

It was subsequently posted, and I heard nothing. A month later I emailed to ask if they’d received it. Nothing. A month and a half later again, I email to demand a response. Still nothing.

So here’s my solution, there’s three co-founders, and they have a somewhat limited public presence. The best that I can glean is what’s listed below.

I’ve messaged 2 of them several weeks ago regarding my replacement unit, and they’ve not bothered to reply. What other L8 victims do with this information is now up to them.

Carlos Kuchkovsky – Co-founder – Software Design

http://www.linkedin.com/profile/view?id=6785213

https://www.facebook.com/kuchkovsky

Carlos Conejero – Co-founder – Industrial Design

http://www.linkedin.com/profile/view?id=47816711

Alvaro Martinez Esteve – Co-founder – Marketing & PR

http://www.linkedin.com/profile/view?id=45109590

https://www.facebook.com/alvarome

ESP8266 Links

0

What with the recent buzz around the latest ESP8266 chips, I thought I should compile a list of handy links here…

The manufacturer of ESP8266 – http://espressif.com/
Manufacturer discussion forum – http://bbs.espressif.com/

Community forum – http://www.esp8266.com/
Lua based firmware – http://nodemcu.com/index_en.html
Discussion regarding MQTT on the ESP8266 – https://groups.google.com/forum/#!topic/mqtt/Uy985KUpG64
ESP8266 Github wiki – https://github.com/esp8266/esp8266-wiki/wiki
Working GCC Toolchain – https://github.com/esp8266/esp8266-wiki/wiki/Toolchain
Open source SDK – https://github.com/pfalcon/esp-open-sdk
Native DHT22 and LED I/O using Lua – http://harizanov.com/2014/11/esp8266-powered-web-server-led-control-dht22-temperaturehumidity-sensor-reading/

Buy one (UK) – http://www.amazon.co.uk/gp/product/B00O9DSZBA/?tag=thelod-21

Avaya 4621SW Config by DHCP

0

I’ve been fiddling with an Avaya 4621SW IP phone recently, and I wondered if it would be more appropriate to pass settings to it via DHCP options, rather than editing the 46xxsettings.txt file that it always downloads via TFTP.

Previously I had the following in my 46xxsettings.txt file

SET SIPDOMAIN glasgownet.com
SET SIPPROXYSRVR voip.vpn.glasgownet.com
SET SNTPSRVR pool.ntp.org

In an effort to transition this to DHCP, after a few minutes of experimenting this was the final outcome that went in to the top of my Debian dhcpd.conf file. It handles the Option 176 that Avaya phones use to get parameters passed to them.

option space Avaya;
site-option-space “Avaya”;
option Avaya.custom code 176 = string;
option Avaya.custom “SNTPSRVR=pool.ntp.org,SIPPROXYSRVR=voip.vpn.glasgownet.com,SIPDOMAIN=glasgownet.com”;

The last line there contains my SIP server settings as I’m using the SIP software stack on the phone. Equally, I’ve tested the following with the H323 firmware, and it works too

option Avaya.custom “MCIPADD=8.8.8.8,MCPORT=1719,TFTPSRVR=172.24.32.1,L2Q=1,L2QVLAN=10″;

Now, http://www.voip-info.org/wiki/view/Avaya+4602+configuration states that the 4602s can be configured independently by manipulating sip_.txt, but I’ve yet to see any requests for those files. Worst case scenario is that I embed SIP_USERNAME1 and SIP_PASSWORD1 into option 176 for each client. Nasty…

Go to Top