Home Assistant : Q&A, Tips & Tricks, Your Configs

Veroland

Executive Member
Joined
Aug 24, 2005
Messages
6,071
I'm using the DS18B20 from Micro Robotics (It's cheap at R25 + VAT), with a D1 Mini. The D1 is managing 4 separate temp sensors from 1 GPIO pin.

I thought so. I have one as well hooked up to a pi in my weather station. I have often wondered if and how far you can extend it with a lan cable.
 

deesef

Expert Member
Joined
Mar 3, 2017
Messages
1,800
I thought so. I have one as well hooked up to a pi in my weather station. I have often wondered if and how far you can extend it with a lan cable.
My longest run is about 35 metres. I have read that the resistor should be placed close to the furthest temp sensor, to minimise interference.
 

w1tw0lf

Senior Member
Joined
Sep 29, 2009
Messages
992
Just want to give an update on my energy usage, based on the https://github.com/klaasnicolaas/home-assistant-glow that I made in late August. After the 1st full month of usage here is the results:

1634473163673.png

According to the municipality I used 947units(kwh) for the period of 1 September till the 29 September. My usage for the 30th mine meter reading has 29.67kwh usage for the day.

Which I would say is pretty much accurate using a "hack" to measure energy usage.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
7,709
Just want to give an update on my energy usage, based on the https://github.com/klaasnicolaas/home-assistant-glow that I made in late August. After the 1st full month of usage here is the results:

View attachment 1168882

According to the municipality I used 947units(kwh) for the period of 1 September till the 29 September. My usage for the 30th mine meter reading has 29.67kwh usage for the day.

Which I would say is pretty much accurate using a "hack" to measure energy usage.

Damn that's pretty high usage
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
39,320
Just want to give an update on my energy usage, based on the https://github.com/klaasnicolaas/home-assistant-glow that I made in late August. After the 1st full month of usage here is the results:

View attachment 1168882

According to the municipality I used 947units(kwh) for the period of 1 September till the 29 September. My usage for the 30th mine meter reading has 29.67kwh usage for the day.

Which I would say is pretty much accurate using a "hack" to measure energy usage.
I've been meaning to do the same in over a year, everything still sitting in the draw.

Currently using an Efergy Engage - and got it within 99% accuracy by fiddling with the voltage on their web portal.
 

w1tw0lf

Senior Member
Joined
Sep 29, 2009
Messages
992
Damn that's pretty high usage

Running servers/working from has had the effect on usage.

I've been meaning to do the same in over a year, everything still sitting in the draw.

Currently using an Efergy Engage - and got it within 99% accuracy by fiddling with the voltage on their web portal.

The only issue I had was getting the esp and the sensor which was from banggood. The photodiode was soldered the wrong way around as per the git. Once that was solved, took few tweaks on the sensitivity of photodiode and got it working.
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,553
Did another thing!

Connected a sonoff sv to my D5s gate status IO and now I know when my gate isn't closed. Have an automation that sends me a couple of screenshots when the gate is opened.

1634635715155.png

I'm trying to get my google home devices to announce it but having done google tts before, so need to figure that out still.
 

alqassam

Expert Member
Joined
Aug 11, 2014
Messages
4,015
Did another thing!

Connected a sonoff sv to my D5s gate status IO and now I know when my gate isn't closed. Have an automation that sends me a couple of screenshots when the gate is opened.

View attachment 1170164

I'm trying to get my google home devices to announce it but having done google tts before, so need to figure that out still.
Pics of which IO you used.

So no need for the Reed sensor then
 

AmazeBalls

Member
Joined
Jul 13, 2013
Messages
17
Did another thing!

Connected a sonoff sv to my D5s gate status IO and now I know when my gate isn't closed. Have an automation that sends me a couple of screenshots when the gate is opened.

View attachment 1170164

I'm trying to get my google home devices to announce it but having done google tts before, so need to figure that out still.

Interesting. Would like to know how that is wired. Also got the Sv hooked up to my D5 Smart but was planning on installing the window/ door sensor to get the open/closed status
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
39,320
Did another thing!

Connected a sonoff sv to my D5s gate status IO and now I know when my gate isn't closed. Have an automation that sends me a couple of screenshots when the gate is opened.

View attachment 1170164

I'm trying to get my google home devices to announce it but having done google tts before, so need to figure that out still.

Fairly simple - you need to turn the device "on" first. I do the following when the alarm sleep arms and a zone is "open".

Code:
  action:
    - service:  media_player.turn_on
      entity_id: media_player.bedroom_speaker
    - service:  media_player.volume_set
      entity_id: media_player.bedroom_speaker
      data:
        volume_level: 0.5
    - service: tts.google_say
      entity_id: media_player.bedroom_speaker
      data_template:
        message: > 
            The alarm has been sleep armed. {{ states.sensor.inside_alarm_active_sensors.state }} {{ states.sensor.outside_alarm_active_sensors.state }}
 

calypso

Expert Member
Joined
Feb 10, 2009
Messages
1,734
Did another thing!

Connected a sonoff sv to my D5s gate status IO and now I know when my gate isn't closed. Have an automation that sends me a couple of screenshots when the gate is opened.

View attachment 1170164

I'm trying to get my google home devices to announce it but having done google tts before, so need to figure that out still.
TTS is pretty simples, but dont over notify the **** out of yourself.
 

furpile

Expert Member
Joined
Jul 14, 2014
Messages
3,508
Did another thing!

Connected a sonoff sv to my D5s gate status IO and now I know when my gate isn't closed. Have an automation that sends me a couple of screenshots when the gate is opened.



I'm trying to get my google home devices to announce it but having done google tts before, so need to figure that out still.

Please post some more info of how you connected the SV to the status of the gate. Do you use the status LED outputs to the GPIO of the SV? Does it just read on/off when the light flashes or a voltage?

1634637299472.png
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,553
Pics of which IO you used.

So no need for the Reed sensor then

Interesting. Would like to know how that is wired. Also got the Sv hooked up to my D5 Smart but was planning on installing the window/ door sensor to get the open/closed status

Please post some more info of how you connected the SV to the status of the gate. Do you use the status LED outputs to the GPIO of the SV? Does it just read on/off when the light flashes or a voltage?

With the D5 smart you can program the IOs. There's an option for gate status, so the gate knows whether it's closed, open, opening, partially closed, etc.
  • Remove resistors from Sonoff SV to use it in isolated mode
  • Configured SV tasmota accordingly (there are a few guides online for operating in isolated mode
  • Connect motor COM to SV negative power input and to ground pin
  • Connect IO4 (the one I used for gate status on my gate) to GPIO14 on SV
  • Connect motor 12v to SV positive power input
I didn't connect the SV to trigger my gate motor to open. I have a dog so can't risk screwing up and my gate opening randomly.

In short, the D5 keeps track of gate status so you don't need a reed switch. A reed switch is probably a more sure way of tracking gate status though.

In HA the sv shows as on/off. On if the gate is closed and off if it's in any other state.

Hopefully that answers the questions
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,553
Fairly simple - you need to turn the device "on" first. I do the following when the alarm sleep arms and a zone is "open".

Code:
  action:
    - service:  media_player.turn_on
      entity_id: media_player.bedroom_speaker
    - service:  media_player.volume_set
      entity_id: media_player.bedroom_speaker
      data:
        volume_level: 0.5
    - service: tts.google_say
      entity_id: media_player.bedroom_speaker
      data_template:
        message: >
            The alarm has been sleep armed. {{ states.sensor.inside_alarm_active_sensors.state }} {{ states.sensor.outside_alarm_active_sensors.state }}
Mmm... I can't get mine to work

Here is my sample code, just using a light switch to test automation for now instead of my gate.

YAML:
- alias: Test Google Say
  trigger:
    platform: state
    entity_id: 'switch.lounge_light'
    from: 'off'
    to: 'on'
  action:
    - service:  media_player.turn_on
      entity_id: media_player.master_bedroom_speaker
    - service:  media_player.volume_set
      entity_id: media_player.master_bedroom_speaker
      data:
        volume_level: 0.2
    - service: tts.google_say
      entity_id: media_player.master_bedroom_speaker
      data_template:
        message: "Testing my Google TTS automation"

If I turn the light on the the volume changes and I get the "on" chime on my google home, but no speech.
If I check the state of the google home in HA then I get the below:

YAML:
volume_level: 0.20000000298023224
is_volume_muted: false
media_content_id: 'https://www.home-assistant.io/images/cast/splash.png'
media_position: 0
media_position_updated_at: '2021-10-19T10:23:44.020836+00:00'
app_id: CC1AD845
app_name: Default Media Receiver
entity_picture_local: null
friendly_name: Master bedroom speaker
supported_features: 21391

No idea why the media_content_id is a png instead of the mp3.

If I use the media card on my lovelace dashboard then it sends through the text and my google home speaks:
1634639284166.png
 

Charlesjjm

Senior Member
Joined
Dec 2, 2014
Messages
622
Mmm... I can't get mine to work

Here is my sample code, just using a light switch to test automation for now instead of my gate.

YAML:
- alias: Test Google Say
  trigger:
    platform: state
    entity_id: 'switch.lounge_light'
    from: 'off'
    to: 'on'
  action:
    - service:  media_player.turn_on
      entity_id: media_player.master_bedroom_speaker
    - service:  media_player.volume_set
      entity_id: media_player.master_bedroom_speaker
      data:
        volume_level: 0.2
    - service: tts.google_say
      entity_id: media_player.master_bedroom_speaker
      data_template:
        message: "Testing my Google TTS automation"

If I turn the light on the the volume changes and I get the "on" chime on my google home, but no speech.
If I check the state of the google home in HA then I get the below:

YAML:
volume_level: 0.20000000298023224
is_volume_muted: false
media_content_id: 'https://www.home-assistant.io/images/cast/splash.png'
media_position: 0
media_position_updated_at: '2021-10-19T10:23:44.020836+00:00'
app_id: CC1AD845
app_name: Default Media Receiver
entity_picture_local: null
friendly_name: Master bedroom speaker
supported_features: 21391

No idea why the media_content_id is a png instead of the mp3.

If I use the media card on my lovelace dashboard then it sends through the text and my google home speaks:
View attachment 1170204
This is my setup. Very basic, but it works like a charm.
action:
- service: notify.telegram
data:
title: Dishwasher
message: Dishwasher is done
- service: tts.cloud_say
data:
entity_id: media_player.googlehome4965
message: The dishwasher is done!
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,553
This is my setup. Very basic, but it works like a charm.
action:
- service: notify.telegram
data:
title: Dishwasher
message: Dishwasher is done
- service: tts.cloud_say
data:
entity_id: media_player.googlehome4965
message: The dishwasher is done!
I just updated my HA version and it's working now!
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,649
If I use the media card on my lovelace dashboard then it sends through the text and my google home speaks:

I have the opposite issue. I use node red to cast to my home mini speakers and it works as expected
But if I use the lovelace UI to send a text then it just beeps as if the speaker is tuning on then nothing.

Any idea on how to fix that?
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,553
I have the opposite issue. I use node red to cast to my home mini speakers and it works as expected
But if I use the lovelace UI to send a text then it just beeps as if the speaker is tuning on then nothing.

Any idea on how to fix that?
No idea hey tbh.

Maybe in developer tools check the states tab. See what state your speaker is in straight after trying to push a message.
 
Top