Read the statement by Michael Teeuw here.
Home Assistant Module
-
Any chance this will work with https ?
I’m receive the same error “Error fetching stats”I can see the attributes if I browse to
https://IP:8123/api/states/sensor.name?api_password=PASSWORD -
I have it working with HTTPS :grinning_face:
Change the url to match what you have for HA
{ module: 'MMM-homeassistant-sensors', position: 'bottom_right', config: { url: 'https://username.duckdns.org:8123/api/states', prettyName : 'true', stripName: 'true', values: ["sensor.humidity", "sensor.temperature"] } },You will need to modify the node_help.js file for this module change the below line of code /MagicMirror/modules/MMM-homeassistant-sensors/node_helper.js
request({ url: url, method: 'GET' }, function (error, response, body) {To the following and change the api-password to what you have set in HA it’s about line 12.
request({ url: url, headers: {'x-ha-access': 'api-password'}, method: 'GET' }, function (error, response, body) {It’s working it looks like it takes a bit longer to get the data as I think the atentication takes some time.
Regards
skippy_oz
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login