First steps into the home automation world…

Category Archives: DomotiGa

Until now I used DomotiGa to get the date off my CurrentCost EnviR energy sensor.

Since I’ve moved all my automations to Home-Assistant, the only bit that was not supported by HA was the CurrentCost device. I didn’t want to run DomotiGa just to get the data off the EnviR and then send it to HA via MQTT.

I’ve finally finished a script thanks to Robin Wilson that gets the EnviR data from the serial port and sends it to HA. DomotiGa can now truly rest in peace.

The final script is this one:

Python

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

#!/usr/bin/python

# -*- coding: utf-8 -*-

importuntangle

importserial

importjson,requests,simplejson

defget_data(port='/dev/ttyUSB1',verbose=False):

"""port: the port that the CurrentCost meter is attached to. Something like /dev/ttyUSB0 or COM1

Returns:

(sensor, temperature, usage), with sensor as the number of the interface a device is assigned to, temperature in degrees C, and usage in Watts

Notice: Undefined variable: amazondisplaywidget in /var/www/html/wordpress/wp-content/plugins/wp-auto-affiliate-links/aal_engine.php on line 503

Following what I think is due to a general OS update, SmartVISU no longer connects to DomotiGa. I’ve tried to fix it, but I’ve thought for a while now to transfer everything over to Home-Assistant since support for IoT devices is much better and update are a lot more frequent

So I’ve finally taken the plunge. One of the main hubs that was used in DomotiGa was the RFXTrx433 Transceiver. I’ve disconnected it from DomotiGa and added it to Home-Assistant. I’ve spend the best part of 2 weekends and several weekday evenings recreating the devices and events that were in DomotiGa.

Home-Assistant Main Page

There’s still a lot of work to be done, but I’ve done the most important bits. I’ve also broken down the content on several pages unlike cramming almost everything in one page like I did in SmartVISU.

I’ve also used this an opportunity to save my config to GitHub for back up and in case it helps someone else.

The only thing I’ll be missing as not built-in is the data from my CurrentCost Sensors, but I’ll be running a light version of DomotiGa to send that data to my Home-Assistant setup.

Note: I only soldered the RGB and Vcc pins as I’m not looking to use the white channels, hence the hard coded 0000 in the above script

All I need to do now to change the colour [to purple on the 1st controller) is to call the script as follows:

Shell

1

LEDStrip12550255

Now to take it to the next level, I created a separate script to slowly run through the colour spectrum. I mainly run it at Christmas so called it LEDStripXmas.py (hence the command in previous script to kill this one if running):

then in my automations, I call this function with the correct parameters. See below example for my Nest Thermostat (virtual) Device on DomotiGa:

automation

YAML

1

2

3

4

5

6

7

8

9

10

- alias: Update Nest Status

trigger:

- platform: state

entity_id: sensor.hallway_thermostat_hvac_state

action:

- service: shell_command.set_domotiga

data_template:

device_id: 122

valuenum: 2

value: '{{states.sensor.hallway_thermostat_temperature.state}}'

I’ve also tried to install Home-Assistant on my Raspberry Pi as I do like the Web interface, but it’s overkill and take too much overhead when I only need to monitor my GPIO ports. My own script is better in that effect.

My old “dumb” thermostat packed up while doing some redecorating, so I upgraded to a smart one: the Nest Thermostat:

Nest Thermostat 3rd Gen

One of the cool features of this thermostat is that it can be remotely controlled via the web (http://home.nest.com) or via an app on a smart phone.

Now what would be even better is if I could integrate this with the rest of my home automation setup. And so I went looking online for ways to connect with the intent of 1) extracting data such as temperature and humidity and 2) control the target temperature remotely from DomotiGa.

Although it works perfectly fine, there is some sort of limit on the number of times you can poll the info and eventually the connection gets closed.

I then looked at Google’s official API, and I’ve even followed their tutorial and managed to connect to my Nest, but it’s a little bit too much out of my area of expertise, plus I think the Google codelabs example is intended to be ran on mobile devices rather than a simple web interface. So for now I’ve parked this project for later.

[26th Jan 2017]

Edit: home-assistant.io supports Nest natively, using Google Nest official API. I’m currently working through integrating my Nest with home-assistant.io and get it to talk to DomotiGa. Watch this space.

Having trawled the interweb for an answer, having even signed up for an API key on the new Google Translate API V2, it’s just become impossible to download the text-to-speech audio files.

I have tried various free TTS options – see previous post here – and none were really “fit for purpose” as they really sounded metallic computerised voices, but I’ve just found Voice RSS.

Now Voice RSS is really nowhere as good as Google’s TTS quality, but in the grand scheme of things, it’s probably the next best thing, especially as it can be used almost as a direct replacement using wget.

You’ll have to sign up for an API key first, but provided you need less than 350 requests / day (with each request being smaller than 100kb), it’s free 🙂

Categories

Meta

This website uses cookies to personalise content and ads, to provide social media features and to analyse traffic. Information about your use of the site is also shared with social media, advertising and analytics partners who may combine it with other information you’ve provided to them or they’ve collected from your use of their services.OkRead more