The easiest way to secure home assistant with https

     

I am running the latest (1.99) docker version of phitienkiem.com-server locally on my network. Using the website ui, I tried installing the home Assistant skill but it fails with Missing OAuth Client Secret in Authentication part of the manifest.

Bạn đang xem: The easiest way to secure home assistant with https

When I looked at the source code for this skill, I found that trang chủ assistant is currently hardcoded lớn const HASS_URL = "http://hassio.local:8123"; which in my case is not correct. I am not sure whether the error above is related to this finding, but to thử nghiệm it out, I would lượt thích to correct the URL.

I downloaded io.home-assistant-v21.zip, unzipped it và made my modification in index.js. How và where can I deploy this inside my docker container? Can I mount it as a volume? bởi I have to rebuild the container somehow?


To configure trang chủ Assistant with phitienkiem.com, you need khổng lồ follow the guide in the trang chủ Assistant documentation: https://www.home-assistant.io/integrations/phitienkiem.com/Basically, you configure phitienkiem.com in trang chủ Assistant rather than the other way around. When home Assistant starts, it connects khổng lồ phitienkiem.com and configures itself with the right URL và the right authentication tokens.

As for testing modifications to the skill, you can mix your phitienkiem.com in developer mode, which causes it khổng lồ load the skill from a local directory instead of downloading from Thingpedia. To do that, you need khổng lồ edit prefs.db & set developer-dir pointing to lớn a directory containing your local skills. Each skill needs to be in a folder named after its ID in Thingpedia. That is, you mix developer-dir to point khổng lồ ~/MySkills, and make a directory called io.home-assistant in ~/MySkills, containing index.js & the rest of the stuff from the zip file. You also need the manifest.tt and dataset.tt files you get from https://phitienkiem.com-dev.stanford.edu/thingpedia/classes/by-id/io.home-assistant (or from the source at https://github.com/stanford-oval/thingpedia-common-devices/tree/master/main/io.home-assistant )

The location of prefs.db depends on how you’re running phitienkiem.com. In docker, it’s in /var/lib/phitienkiem.com-server in the docker filesystem (which you can access with docker exec or similar). When running directly from git sources, it’s in ~/.config/phitienkiem.com-serverI assume you already know how lớn make the developer directory visible inside the docker, as you mentioned that.

Additional info is in the Thingpedia guide, in the part about testing.


vinith_kumar December 29, 2021, 5:01am #3

It’s not clear. Can you elaborate


Sp8cemanSp1ff December 29, 2021, 7:38pm #4

I’m encountering a similar problem under different circumstances. I’m running home Assistant 2021.12.6 (latest as of today) on a trang chủ Assistant Blue, and I’ve installed Genie-Edge as an addon. I have also successfully installed the Genie Client on a RPI3B+ and have voice commands working khổng lồ my home Assistant instance.

However, when I select “Configure a new skill” on the “My Skills” page in the add-on, the OAuth request ends up failing because the vps “hassio.local” cannot be found. I’m not sure why this MDNS name is being used, because my HA instance is using “homeassistant.local”.

I would love to try creating new skills using the button in the Add-On, but for now I’m stuck at this failure. Any tips as to where “hassio.local” is originating would be welcome.

*

Thanks!


Hello!

If you’re running the Genie add-on in trang chủ Assistant, the trang chủ Assistant skill is already available, và all the trang chủ Assistant devices that are recognized will be listed in My Skills. No further configuration is necessary.

Manual configuration is only necessary when running the Genie server standalone separately from trang chủ Assistant.

Xem thêm: Sơ Đồ Chiến Thuật 523 - Sơ Đồ Phòng Ngự Dễ Dàng 5


Hi - thanks for the quick response.

What if I add, rename, or delete devices? Will the skills automatically update?


Yes, Genie connects to trang chủ Assistant & synchronizes all the recognized entities. If it doesn’t update automatically (it should), try restarting the add-on.


I had kind of a same problem. When phitienkiem.com/Genie server is installed on another server, there is 401 Unauthorised warning và HA is reporting issue in config_flows:88.

I “fixed” this problem by installing Nginx reverse proxy on the same server where phitienkiem.com/Genie hệ thống is installed.


which version of Genie and HA are you running?

In our thoughts we considered as “standard” an HA server with Genie as địa chỉ on (so no problem in networking), và then Genie Clients for installation in other places/systems, to lớn be connected lớn main Genie (which will be then interacting locally with HA)

Otherwise you fix is the only way to vày that (if the HA is the supervised, with the core version for example, you don’t have that problem


I am running the latest version of HA that is 2022.2.2 và latest genie hệ thống built from source.

I have migrated my bộ vi xử lý core version installation khổng lồ Docker over this weekend and now it is running on the same host. Interestingly enough I am experiencing new error now that Genie cannot connect back to HA, error message:

Failed lớn reconnect to home Assistant: TypeError: Cannot read property ‘setSocket’ of undefined.

I am not sure if this problem is due khổng lồ upgrade of HA, as before I was running 2021 December & now it is 2022 Feb. I will troubleshoot this issue later and post the results here. Và error message is the same with or without Nginx proxy.

Personally, I try to avoid Supervised or OS version of HA as it is bound khổng lồ hardware exclusively. I am running now HA và Genie on Nvidia Jetson Xavier NX as it is quite powerful and has small power requirements.

Update: I got it working again. I had to remove HA integration from the server & it worked fine.


Chuyên mục: Tin Tức