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

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,209
Not working. I also set up samba share but still no access from the network is possible.

I can’t access front end. Only backend on host device.

I suspect it’s something to do with duckdns I added so I want to edit the config.yaml.

I'm quite sure I had the same problem when I was setting up my duckdns.

I cant remember exactly what I did to fix it though. I think I changed the IP on the duckdns page to the IP of the HA to get local access then edited my config file then reset the duckdns IP

Edit: I went back and checked my posts in this thread. Read from about post 430 onwards and maybe something the other guys posted may help you
 
Last edited:

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,225
Part of the switchover to DuckDNS is to basically switch over to HTTPs mode (that you configure in the http: part of your YAML, and set ssl_certificate).

At this point you will only be able to access Home Assistant via https://<address>. The other problem is that if the certificate is served correctly then you can only use the address as specified in the certificate. In other words, the IP:8123 method will no longer work, only the address in the certificate with the standard HTTPs port 443.

If DuckDNS and LetsEncrypt and your router isn't 100% set up correctly then you won't be able to use it and will have to revert back to figure out what is still missing. It is quite difficult to set up, to be honest!

So yeah, it is really vital that you need access to your config files when you do this switchover, and I'd recommend two more things:
- Make sure you have access to SSL and can use the Home Assistant command line (to restart Home Assistant again)
- Set up a notification to your phone every time Home Assistant starts and shuts down. That way you know that it has started correctly and is shutting down, which helps you figure out what is going on when you can't access the GUI.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,209
- Set up a notification to your phone every time Home Assistant starts and shuts down. That way you know that it has started correctly and is shutting down, which helps you figure out what is going on when you can't access the GUI.

How can I do this?

On Monday I had a power outage at home (I was at work) and I was thinking it would be nice if I could get a notification every time my Pi goes off and comes back on.
 

Veroland

Executive Member
Joined
Aug 24, 2005
Messages
5,971
How can I do this?

On Monday I had a power outage at home (I was at work) and I was thinking it would be nice if I could get a notification every time my Pi goes off and comes back on.
Will this help:

 

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,225
How can I do this?

On Monday I had a power outage at home (I was at work) and I was thinking it would be nice if I could get a notification every time my Pi goes off and comes back on.
In automations:

Code:
- id: Hass Startup Notification
  alias: Hass Startup Notification
  trigger:
  - platform: homeassistant
    event: start
  action:
    service: notify.mobile_app_eben_s_iphone_11
    data:
      title: Home Assistant
      message: Home Assistant was started




- id: Hass Shutdown Notification
  alias: Hass Shutdown Notification
  trigger:
  - platform: homeassistant
    event: shutdown
  action:
    service: notify.mobile_app_eben_s_iphone_11
    data:
      title: Home Assistant
      message: Home Assistant was shut down
 

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,225
How can I do this?

On Monday I had a power outage at home (I was at work) and I was thinking it would be nice if I could get a notification every time my Pi goes off and comes back on.
Are you running it from an SD card? Or an SSD?

The SD cards in Raspberry Pi's do not enjoy losing power, especially when writing to it (which is almost constantly with Home Assistant). You can easily get a corrupt SD card like that.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,209
Are you running it from an SD card? Or an SSD?

The SD cards in Raspberry Pi's do not enjoy losing power, especially when writing to it (which is almost constantly with Home Assistant). You can easily get a corrupt SD card like that.

At the moment I have an SD card in the Pi. I got an SSD and the enclosure but for the life of me I cant get HASS OS to run of the SSD. Ive been trying to research why for the past few days but Im getting no where.

I tried a normal 2.5" SSD in the enclosure and I tried a Samsung T3 Portable SSD, both arent booting on the Pi
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
38,912
I am now over measuring my water tank with an ultrasonic sensor - tried various versions, they all have their issues, and seem to eventually fail. Latest one has just died, it doesn't measure further than 50cm - tried cleaning it, etc...

Going to find an alternative
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
9,947

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
38,912
condensation killing them?

Also, how much do you want to spend on a fix?
Look at this: https://thingslog4u.com/product/mqtt-nb-iot-tank-water-level-monitoring-data-logger/
:ROFL: - not spending that. Especially without knowing it'll even work reliably

This is the latest one to give up: https://www.aliexpress.com/i/4001287816907.html

Don't think its just the condensation - my ground water is fairly high in calcium, so it probably builds up over time and kills the sensor.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
1,209
I am now over measuring my water tank with an ultrasonic sensor - tried various versions, they all have their issues, and seem to eventually fail. Latest one has just died, it doesn't measure further than 50cm - tried cleaning it, etc...

Going to find an alternative

What about a pressure sensor? Im not sure if its possible on a low pressure system like a jojo tank, but at my workplace we use pressure sensors to measure in bar then convert to % on the system, but that is for tanks storing 200 cubes of water.
For our high turbidity water, our sensors have a diaphragm between the sensor and the water line (to protect the sensor)
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
9,947
:ROFL: - not spending that. Especially without knowing it'll even work reliably

This is the latest one to give up: https://www.aliexpress.com/i/4001287816907.html

Don't think its just the condensation - my ground water is fairly high in calcium, so it probably builds up over time and kills the sensor.
ok thats what I thought :p

So maybe lets look at it using something else?

Take a read here and let me know what you think?

Considering that to measure daily rainfall, but I think this could work for a tank.

Edit:
This is the same @MidnightZA mentions.
 

InusB

Well-Known Member
Joined
Jan 7, 2010
Messages
430
I am now over measuring my water tank with an ultrasonic sensor - tried various versions, they all have their issues, and seem to eventually fail. Latest one has just died, it doesn't measure further than 50cm - tried cleaning it, etc...

Going to find an alternative
What about using a float sensor to show when it reaches a critical point, they are so cheap you can add for different levels
FloatSensor
 

Veroland

Executive Member
Joined
Aug 24, 2005
Messages
5,971
Does anyone have recommendations for a water flow sensor that can be hooked up to HassIO?

Some of my ideas are:
Wifi/Zigbee and running on battery would probably be nice, or the other option is hooking up an Arduino in a waterproof case close to the tap.
 

calypso

Expert Member
Joined
Feb 10, 2009
Messages
1,660
I am now over measuring my water tank with an ultrasonic sensor - tried various versions, they all have their issues, and seem to eventually fail. Latest one has just died, it doesn't measure further than 50cm - tried cleaning it, etc...

Going to find an alternative
Weight?
 

tRoN

Executive Member
Joined
Mar 13, 2007
Messages
6,392
Part of the switchover to DuckDNS is to basically switch over to HTTPs mode (that you configure in the http: part of your YAML, and set ssl_certificate).

At this point you will only be able to access Home Assistant via https://
. The other problem is that if the certificate is served correctly then you can only use the address as specified in the certificate. In other words, the IP:8123 method will no longer work, only the address in the certificate with the standard HTTPs port 443.

If DuckDNS and LetsEncrypt and your router isn't 100% set up correctly then you won't be able to use it and will have to revert back to figure out what is still missing. It is quite difficult to set up, to be honest!

So yeah, it is really vital that you need access to your config files when you do this switchover, and I'd recommend two more things:
- Make sure you have access to SSL and can use the Home Assistant command line (to restart Home Assistant again)
- Set up a notification to your phone every time Home Assistant starts and shuts down. That way you know that it has started correctly and is shutting down, which helps you figure out what is going on when you can't access the GUI.


Hey. Thanks. The https worked!

Deleted the SSL config and duckdns.
 

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,225
Does anyone have recommendations for a water flow sensor that can be hooked up to HassIO?

Some of my ideas are:
Wifi/Zigbee and running on battery would probably be nice, or the other option is hooking up an Arduino in a waterproof case close to the tap.

I couldn't find anything with a quick search directly, but reading these should give you an idea:

Interfacing water flow meter with arduino uno (engineersgarage.com)
Pulse Counter Sensor — ESPHome

Basically use an ESP32 which has a built-in pulse counter, use ESPHome to quickly program it to convert counts/pulses to litres/min and to connect it to Home Assistant.

Should be easy enough to do... Of course, this probably won't last long on batteries.
 

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,225
What about using a float sensor to show when it reaches a critical point, they are so cheap you can add for different levels
FloatSensor
Yeah, I read a suggestion somewhere to have a PVC pipe upright in the tank, with various float sensors mounted at various levels to read the level. You can construct the whole thing outside and then mount it internally in the tank.
 

Veroland

Executive Member
Joined
Aug 24, 2005
Messages
5,971
I couldn't find anything with a quick search directly, but reading these should give you an idea:

Interfacing water flow meter with arduino uno (engineersgarage.com)
Pulse Counter Sensor — ESPHome

Basically use an ESP32 which has a built-in pulse counter, use ESPHome to quickly program it to convert counts/pulses to litres/min and to connect it to Home Assistant.

Should be easy enough to do... Of course, this probably won't last long on batteries.
Great, thanks

Will do a bit of reading. I just have no idea where to even start with the ESP32's
 
Top