Wednesday, 18 November 2020

Smart Electricity meter installed by ESB Networks this morning

I had requested a night meter so that I could charge my batteries cheaply at night and draw power fro the during the day. However, after any e-mails between myself and ESP Networks, Community Power and CRU (https://www.cru.ie/home/smart-meters/) a fella just turned up out of the blue.

 

Sadly, while in Germany I could insert a module to allow consumer monitoring the ESB have security tagged that slot.

See page 10 of:

"In OMNIPOWER® single-phase meter, it is possible to mount a CCC module. The module can be used for communication and data exchange with smart home products such as energy displays and external relays. The CCC module is mounted without using tools or breaking the seal of the meter. The mounting may be done by e.g. the consumer himself."

  However, there's an IR window that should allow serial comms to the unit. https://wiki.hal9k.dk/projects/kamstrup

 Indhold af kit

 I've bought one of these kits and should be able to attached magnetically to the smart meter.


 

And read basic usage data from a NodeMCU and post to MQTT

Saturday, 12 September 2020

Tuya ZigBee TRVs proving tricky to control.

The first three I bought work fine on my Raspberry Pi Zigbee2MQTT set-up but the second three need to be woken up before they will hear a command.

But I've sniffed the comms over Wireshark when using their app so I should be able to crack it.

 

TUYA Zigbee TRV Thermostat Valve Thermostatic Radiator ...

This command worked!

pi@tola-smarthome-v2:~ $ date; mosquitto_pub -h localhost -p 1883 -u ***USERNAME*** -P ***PASSWORD*** -t zigbee2mqtt/Tonys\ Bedroom\ TRV/set/force -m "open"
Mon 23 Nov 2020 08:10:56 PM GMT

Nov 23 20:10:56 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:debug 2020-11-23 20:10:56: Received MQTT message on 'zigbee2mqtt/Tonys Bedroom TRV/set/force' with data 'open'
Nov 23 20:10:56 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:debug 2020-11-23 20:10:56: Publishing 'set' 'force' to 'Tonys Bedroom TRV'

Nov 23 20:10:57 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:debug 2020-11-23 20:10:57: Received Zigbee message from 'Tonys Bedroom TRV', type 'commandSetDataResponse', cluster 'manuSpecificTuyaDimmer', data '{"data":{"data":[1],"type":"Buffer"},"dp":1130,"fn":0,"status":54,"transid":122}' from endpoint 1 with groupID 0

Nov 23 20:10:57 tola-smarthome-v2 npm[30279]: Zigbee2MQTT:info  2020-11-23 20:10:57: MQTT publish: topic 'zigbee2mqtt/Tonys Bedroom TRV', payload '{"auto_lock":"MANUAL","away_preset_days":1,"away_preset_temperature":15,"boost_time":300,"child_lock":"UNLOCKED","comfort_temperature":20,"current_heating_setpoint":"5.0","eco_temperature":15,"force":"open","holidays":[{"hour":6,"minute":0,"temperature":20},{"hour":8,"minute":0,"temperature":15},{"hour":11,"minute":30,"temperature":15},{"hour":12,"minute":30,"temperature":15},{"hour":17,"minute":30,"temperature":20},{"hour":22,"minute":0,"temperature":15}],"linkquality":60,"local_temperature":"15.0","local_temperature_calibration":"0.0","max_temperature":35,"min_temperature":5,"position":0,"preset":"manual","system_mode":"manual","week":"7","window_detection":"OFF","window_detection_params":{"minutes":10,"temperature":5},"workdays":[{"hour":11,"minute":0,"temperature":20},{"hour":11,"minute":1,"temperature":15},{"hour":11,"minute":30,"temperature":15},{"hour":12,"minute":30,"temperature":15},{"hour":17,"minute":30,"temperature":20},{"hour":150,"minute":0,"temperature":15}]}'




 

Monday, 29 July 2019

Oil tank sensor

Installed an oil tank level monitor in Tola Park yesterday.






Based on a HC-SR04 ultrasonic sensor and an ESP8266 NodeMCU module and code from:

https://www.instructables.com/id/Distance-Measurement-Using-HC-SR04-Via-NodeMCU/

It publishes to MQTT which can then be displayed as a graph using Node-Red



Friday, 26 July 2019

Installed Node-Red on Ubuntu laptop for remote control of Inisfree CH

Followed instructions at:
https://skjoldtech.wordpress.com/2019/01/29/install-node-red-on-ubuntu-server-18-04-1-lts/


Adding password to MQTT broker

I followed the instructions at:
http://www.steves-internet-guide.com/mqtt-username-password-example/


using Method 2.


Wednesday, 24 July 2019

Got DHT22 sensors working with NodeMCU

Problem was lack of dht.begin() in code! This allowed a DHT11 to sort of work but not a DHT22.

Found my mistake by examining coding example by Muhammad at:
https://www.hackster.io/mafzal/temperature-monitoring-with-dht22-arduino-15b013.


And even deployed a unit in the cottage next door

So now Node-Red has some zone temperatures to use to control the MVs.

Monday, 22 July 2019

Need new Node-Red control swicth that incorporates Temp/Timer

The current Node-Red switches for the MVs (Sleeping Zone, Living Zone, Extension Zone and Cylinder) just act as ON / OFF switches.

See: http://192.168.1.100:1880/ui/#/0

They are a bit smarter than that in that they incorporate feedback from the SonOffs they control to affect the switches ON/OFF status. That way they always reflect the current state of the SonOff even when controlled outside the Node-Red switch. See diagram below:









But what I would like is an extra ON selection which would only last for the duration of a set time interval (say 15 mins default) and which would also turn on/off its associated MV dependent on the temperature in that zone.

So three settings:
1) three-way switch: OFF / ON / Timed
2) Time selection slider: 15, 30, 45, 60 minutes
3) Temperature selection slider: 15 to 22 degrees C