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

alqassam

Expert Member
Joined
Aug 11, 2014
Messages
4,024
Installed the ds1820b into the return of my pool pump. Just drilled a hole and used that epoxy pipe fixing tape to strap and close the hole. No leaking and works as expected
376f31b118216f9d59a723ca458ff630.jpg
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
10,680
Installed the ds1820b into the return of my pool pump. Just drilled a hole and used that epoxy pipe fixing tape to strap and close the hole. No leaking and works as expected
376f31b118216f9d59a723ca458ff630.jpg
Show us photos of how the pipe looks now
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,664
Look at this : Maybe you missed this step

EDIT: Issue is back again

Thanks a mil :D. That fixed the issue

1633674782233.png

I used this guide and oddly enough it doesn't make a note to add that API. It is in the picture below and the description says the smart home products should be selected by default. There are so many guys on reddit and the HA forums complaining about that issue.

 
Last edited:

w1tw0lf

Senior Member
Joined
Sep 29, 2009
Messages
998
Yeah I am staying with localtuya until I am ready to rip the things apart and put esp chips in.


Very much so yes.

Create a few template sensors:

So here is my localtuya config:
Code:
localtuya:
  ## CBI Astute Smart Switch
  - host: 192.168.241.150
    device_id: !secret geyser_mainbathroom_device_id
    local_key: !secret geyser_mainbathroom_local_key
    friendly_name: Main Bathroom Geyser
    protocol_version: "3.3"
    entities:
      - platform: switch
        friendly_name: Main Bathroom Geyser
        id: 1
      - platform: sensor
        friendly_name: Main Bathroom Geyser Current
        id: 21
        device_class: current
        unit_of_measurement: "mA"
      - platform: sensor
        friendly_name: Main Bathroom Geyser Power
        id: 23
        scaling: 0.1
        device_class: power
        unit_of_measurement: "W"
      - platform: sensor
        id: 22
        scaling: 0.1
        friendly_name: Main Bathroom Geyser Voltage
        device_class: voltage
        unit_of_measurement: "V"

This then creates a few entities but the one we want is sensor.main_bathroom_geyser_power which is the one showing the current watt usage, eg. 4000w +- for my 4kW geyser.

I then create the following template sensors, integration sensors, etc. Not all needed but the daily one eventually is picked up by the energy dashboard setup and allows you to add it.
Code:
sensor:
  # Sensor for Riemann sum of energy bought (W -> Wh)
  - platform: integration
    source: sensor.main_bathroom_geyser_power
    name: main_bathroom_geyser_usage
    unit_prefix: k
    round: 2
    method: left

utility_meter:
  main_bathroom_geyser_daily:
    source: sensor.main_bathroom_geyser_usage
    cycle: daily
  main_bathroom_geyser_monthly:
    source: sensor.main_bathroom_geyser_usage
    cycle: monthly

Here is how you see it in the UI config:
View attachment 1162706

View attachment 1162708

And finally here is my daily energy dash for yesterday:
View attachment 1162710

Thank you. Made me jump to local builders and pick one up. Your guide made it a lot easier.
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
2,489
Upgraded to 2021.10.1 and upgraded to new Tuya Integration. I have a few GU10 bulbs and the process was relatively simple. Had to create a Tuya Dev IOT account.

One thing is driving me nuts since these are colour changing GU10 bulbs (it used to happen with old integration too).

Inside the Tuya app, there is the ability to choose a colour or to have the warm white. When it is warm white (that is also at highest brightness) , HA sees the value of the bulb as this:

YAML:
supported_color_modes:
  - brightness
  - hs
  - onoff
color_mode: hs
brightness: 255
hs_color:
  - 0
  - 0
rgb_color:
  - 255
  - 255
  - 255
xy_color:
  - 0.323
  - 0.329
friendly_name: Lounge L1
supported_features: 0

I also have a rgb-light card that looks like this, where I expect when I tap on white, it should put the lights at full warm bright. However it doesn't - it's a wierd colour that's dim , so it's forcing me to always open Tuya App to set it back at full warm white.

Code below. Am I missing a trick here?

1633773944877.png


YAML:
type: entities
show_header_toggle: true
entities:
  - entity: light.lounge_lights
  - type: custom:rgb-light-card
    entity: light.lounge_lights
    colors:
      - rgb_color:
          - 255
          - 255
          - 255
        brightness: 255
        transition: 1
      - rgb_color:
          - 234
          - 136
          - 140
        brightness: 255
        transition: 1
      - rgb_color:
          - 251
          - 180
          - 139
        brightness: 200
        transition: 1
      - rgb_color:
          - 136
          - 198
          - 237
        brightness: 150
        transition: 1
      - rgb_color:
          - 140
          - 231
          - 185
        brightness: 100
        transition: 1
state_color: true
title: Lounge Lights
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
10,680
Upgraded to 2021.10.1 and upgraded to new Tuya Integration. I have a few GU10 bulbs and the process was relatively simple. Had to create a Tuya Dev IOT account.

One thing is driving me nuts since these are colour changing GU10 bulbs (it used to happen with old integration too).

Inside the Tuya app, there is the ability to choose a colour or to have the warm white. When it is warm white (that is also at highest brightness) , HA sees the value of the bulb as this:

YAML:
supported_color_modes:
- brightness
- hs
- onoff
color_mode: hs
brightness: 255
hs_color:
- 0
- 0
rgb_color:
- 255
- 255
- 255
xy_color:
- 0.323
- 0.329
friendly_name: Lounge L1
supported_features: 0

I also have a rgb-light card that looks like this, where I expect when I tap on white, it should put the lights at full warm bright. However it doesn't - it's a wierd colour that's dim , so it's forcing me to always open Tuya App to set it back at full warm white.

Code below. Am I missing a trick here?

View attachment 1163460


YAML:
type: entities
show_header_toggle: true
entities:
- entity: light.lounge_lights
- type: custom:rgb-light-card
entity: light.lounge_lights
colors:
- rgb_color:
- 255
- 255
- 255
brightness: 255
transition: 1
- rgb_color:
- 234
- 136
- 140
brightness: 255
transition: 1
- rgb_color:
- 251
- 180
- 139
brightness: 200
transition: 1
- rgb_color:
- 136
- 198
- 237
brightness: 150
transition: 1
- rgb_color:
- 140
- 231
- 185
brightness: 100
transition: 1
state_color: true
title: Lounge Lights
Create a button that call a service that set the light to warm white, or the values you manually set it to in the light. Will save you time.

If you need a hint on how to create a button that call the service let me know, can show you.
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,627
Just achieved something cool today that I've been wanting to do.

I can say "Hey Google, run camera snapshot script" and I get a snapshot on telegram for each one of my cctv cameras. Pretty nifty I think.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,664
Screenshot_20211013-172306_Squid.jpg

Is this wiring correct? Just double checking before I start so i dont damage anything.

I have a 12V battery. I want to make a voltmeter to read in HA. That part is already done, but set up powering it via a cellphone charger and usb cable. I want to power the d1 mini from the battery so it doesn't go off during load shedding
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
2,489
Create a button that call a service that set the light to warm white, or the values you manually set it to in the light. Will save you time.

If you need a hint on how to create a button that call the service let me know, can show you.
Would appreciate that thanks
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
10,680
Would appreciate that thanks
Ok this is a random one I have. It doesn't look nice though, still a WIP.
Whole card:
Code:
type: entities
title: Manual automation triggers
entities:
  - type: custom:paper-buttons-row
    buttons:
      - entity: automation.shellies_announce
        name: Shellies Announce
        state_styles:
          Unlocked:
            icon:
              color: rgb(5, 147, 255)
            text:
              color: rgb(5, 147, 255)
        tap_action:
          action: call-service
          service: automation.trigger
          service_data:
            entity_id: automation.shellies_announce

You probably should add an icon as I have done here:
Code:
      - entity: sensor.kitchen
      - type: custom:paper-buttons-row
        buttons:
          - entity: sensor.kitchen
            name: Unlocked
            icon: mdi:lock-open-variant
            state_styles:
              Unlocked:
                icon:
                  color: rgb(5, 147, 255)
                text:
                  color: rgb(5, 147, 255)
            tap_action:
              action: call-service
              service: switch.turn_on
              service_data:
                entity_id: switch.kitchen_lock_keepout
          - entity: sensor.kitchen
            name: Out-only
            icon: mdi:lock
            state_styles:
              Locked_in:
                icon:
                  color: rgb(5, 147, 255)
                text:
                  color: rgb(5, 147, 255)
            tap_action:
              action: call-service
              service: switch.turn_off
              service_data:
                entity_id: switch.kitchen_lock_keepout
 

SAguy

Executive Member
Joined
Nov 4, 2013
Messages
8,627
Inline messages on Telegram are really cool as well, really need to find time to play more with my HA setup:

1634192991198.png


YAML:
    - service: telegram_bot.send_message
      data_template:
        message: 'Refresh Snapshots?'
        inline_keyboard:
          - "Yes:/refreshsnapshots"

And then you use that message as a trigger:
YAML:
- alias: Automation Camera Snapshot
  trigger:
    platform: event
    event_type: telegram_callback
    event_data:
      data: '/refreshsnapshots'
  action:
    - data:
        entity_id: camera.front_yard
        filename: 'www/snapshots/front_yard.jpg'
      service: camera.snapshot
    - data:
        file: 'www/snapshots/front_yard.jpg'
      service: telegram_bot.send_photo
    - ....
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
39,332
You know you can also send them as alerts to your phone? Pops up as a preview via the HA app.
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
39,332
Installed the ds1820b into the return of my pool pump. Just drilled a hole and used that epoxy pipe fixing tape to strap and close the hole. No leaking and works as expected
376f31b118216f9d59a723ca458ff630.jpg
That's not a bad idea - the return should be fairly accurate to the pool temperature - maybe I'll do this.
 

AmazeBalls

Member
Joined
Jul 13, 2013
Messages
17
Installed the ds1820b into the return of my pool pump. Just drilled a hole and used that epoxy pipe fixing tape to strap and close the hole. No leaking and works as expected
376f31b118216f9d59a723ca458ff630.jpg

Thanks. This gave me the idea to do the same. Worked out well. Was wondering how I was going to get the sensor across the garden and into the pool.
 

deesef

Expert Member
Joined
Mar 3, 2017
Messages
1,809
Installed the ds1820b into the return of my pool pump. Just drilled a hole and used that epoxy pipe fixing tape to strap and close the hole. No leaking and works as expected
376f31b118216f9d59a723ca458ff630.jpg
I have connected my jacuzzi's thermostat in a similar way. However, it is grossly inaccurate unless the pump is running. Ambient temp has a big impact on the temp of the water in the pipes - the further from the pool, the biggest the impact.

Learning from this, I have done the pool temp by removing the cement between the paving around the pool, carefully running LAN cable to the pool and hanging the thermostat directly in the water. I brushed some cement back between the pavers and you can't even see the difference.

The following are a 24 hour and a 3-week graph of the pool water. Note the much smaller difference between min and max temps compared to the setup with the thermostat in the return pipe. I am planning to redo the jacuzzi setup to also immerse the thermostat directly in the water.


PS; the blip at 11:00 is caused when the pump turns on and brings in the warm water that's in the solar panel pipes. This quickly mixes with the mass of water in the pool.

8880bd314f11ec9b19d73fe7a3044d21.jpg
40de11f1ecc0dc6e0d258276e260fd13.jpg
 

Veroland

Executive Member
Joined
Aug 24, 2005
Messages
6,074
I have connected my jacuzzi's thermostat in a similar way. However, it is grossly inaccurate unless the pump is running. Ambient temp has a big impact on the temp of the water in the pipes - the further from the pool, the biggest the impact.

Learning from this, I have done the pool temp by removing the cement between the paving around the pool, carefully running LAN cable to the pool and hanging the thermostat directly in the water. I brushed some cement back between the pavers and you can't even see the difference.

The following are a 24 hour and a 3-week graph of the pool water. Note the much smaller difference between min and max temps compared to the setup with the thermostat in the return pipe. I am planning to redo the jacuzzi setup to also immerse the thermostat directly in the water.


PS; the blip at 11:00 is caused when the pump turns on and brings in the warm water that's in the solar panel pipes. This quickly mixes with the mass of water in the pool.

May I ask what thermostat you are using?
 
Top