EMHASS Docker persistently fetching HA data from old DuckDNS URL despite correct config #562
Unanswered
BarneyJing
asked this question in
Q&A
Replies: 1 comment
-
I had the same issue. I got it running using this commandline: docker run -it --restart always -p 5000:5000 --name emhass-container -v ~/emhass/config.json:/share/config.json -v ~/emhass/secrets_emhass.yaml:/app/secrets_emhass.yaml ghcr.io/davidusb-geek/emhass I subsituted "./emhass" with "~/emhass" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm setting up EMHASS (Energy Management Optimization for Home Assistant) in a Docker container on a Raspberry Pi (Raspberry Pi OS) alongside my Home Assistant Docker container (on the same Pi, using
--network host
).[Full disclosure: I am not that savvy with coding so have been using ChatGPT and Google Gemini to help which has got me a long way!]
My goal is to use EMHASS for energy optimization, including pre-conditioning my heating/cooling based on PJM day-ahead pricing (the Comed next day pricing API doesn't seem to work).
I'm encountering a very persistent and frustrating issue where EMHASS consistently tries to fetch Home Assistant data from an old, external DuckDNS URL (
https://myhass.duckdns.org/
), causing my PJM forecast price sensor to remainunavailable
. This happens despite all my configuration files correctly pointing to the local IP.My Setup:
my Pi's local IP:8123
)my Pi's local IP:5000
), using--network host
Problem:
unavailable
. I have confirmed that the PJM data is flowing through to my Pi.[INFO] Home Assistant data fetch will be performed using url: https://myhass.duckdns.org/
What I've already tried (extensive troubleshooting):
Verified
config.json
content:/path/to/emhass_config/config.json
."hass_url": "http://my Pi's local IP:8123"
and my correctlong_lived_token
.config.json
section (note: actual token string is present, not placeholder):Verified
secrets_emhass.yaml
content (and then consolidated):secrets_emhass.yaml
also contained the correcthass_url
and token.config.json
and deletedsecrets_emhass.yaml
.Docker Container Management:
sudo docker stop emhass_optimizer && sudo docker rm emhass_optimizer
before restarting.Docker Image Freshness:
sudo docker rmi ghcr.io/davidusb-geek/emhass:latest
) to force a fresh download.Host Volume Permissions & Content:
/path/to/emhass_config/
directory hasdrwxrwxrwx
(777) permissions.config.json
is a file (-rw-r--r--
) and owned by the user running Docker.emhass_config
directory (sudo rm -rf /path/to/emhass_config/*
) and re-created contents from scratch (manual config.json).EMHASS UI Save Attempts:
http://my Pi's local IP:5000/configuration
) multiple times, both with and withoutconfig.json
initially mounted. Theconfig.json
file was either not created persistently or created as a directory. Manually creating the file was the only way to get it as a file.Home Assistant Restart: Performed full Home Assistant Core restarts.
Browser Cache: Tried hard refreshing browser cache and using Incognito mode.
Relevant Log Snippet (from
sudo docker logs emhass_optimizer --tail 100
):This persistent
https://myhass.duckdns.org/
URL is the main blocker. Has anyone encountered a similar issue with EMHASS Dockerlatest
image (version 0.13.3) where it seems to ignorehass_url
inconfig.json
or falls back to an old URL?Any insights or suggestions would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions