At this time it has support for the things you can call using a service call.
That includes custom python scripts, but i’m not sure about appdaemon have not tried that myself.
At this time it has support for the things you can call using a service call.
That includes custom python scripts, but i’m not sure about appdaemon have not tried that myself.
but how about creating the link via a web call where I pass in the service/entity/start/end etc into a web call and then it creates the link.
Yeah, you should be able to i suppose, it’s a pretty simple form without too much security (other than that the administration service listens to another port than the user GUI and should not by obvious reasons be exposed to the internet)
It probably needs to be done in two steps, first create the link and then add actions to it,
I have not implemented any REST service or anything, but just posting the data with say curl should do the trick
I was able to create a new link and add an action to it using the two requests below
(just copied as curl
from the network tab in browser developer tool and the removed the un-needed extra headers)
curl 'http://myhass:8899/?action=createNamedLink' --data-raw 'linkPath=111222&theme=default&password=333444'
curl 'http://myhass:8899/?action=addActionToLink&id=111222' \
--data-raw 'friendly_name=whatnot&service_call=switch.toggle&dynamic_field%5Bentity_id%5D=switch.restart_camera&valid_from_date=2022-09-28&valid_from_time=00%3A00&valid_from=2022-09-28+00%3A00&expiry_time_date=2022-09-28&expiry_time_time=23%3A59&expiry_time=2022-09-28+23%3A59'
This addon seems to have stopped working for me when trying to create links or add actions it just refreshes and nothing has changed.
Do you have any more information, maybe logs?
Have you tried re-installing the addon?
I tried uninstalling and installing the addon but was unable to replicate the issue
Replied with some logs on github thanks for your fast reply I did uninstall and install again its now working but getting some errors I posted logs from addon to github.
Glad to hear that the addon is once again working for you, i’ll have a look at the remaining issues!
Hello, I am having issues with https and the certificate. In the config I enabled tls and added https to the external url. When I access home assistant through the https url it doesn’t show a certificate error, but when I access the external page of this addon then it shows a certificate error and shows the page is dangerous (Check if a site's connection is secure - Google Chrome Help, search for dangerous).
If I click on the Dangerous “button” on the website then it says the certificate is valid, but still finds the page “Dangerous”.
How is this possible and can I fix this?
Hi,
Can you take a screenshot of the error?
I can’t by the description tell what the issue with the certificate could be
Hi,
Woah, that looks like it got swooped up in google safe-browsing!
I don’t know dutch but from translating it looks like it was listed as dangerous, as far as i understand, this should only happen if there is dangerous code injected onto the website you are trying to visit.
I would try to inspect the generated source if you are able to continue to the site
The document should only contain some styling and a few links.
Does your search console for the domain show you any clues?
The source is not showing any strange things, I think. I added some custom styling and also by removing that, it doesn’t change.
I will include some things I checked and maybe it is not of importance.
The log shows a lot of these errors:
2023/12/05 16:38:12 [error] 95#95: *1604 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Exception: No ID given! in /var/www/user/actions.php:148
Stack trace:
#0 /var/www/user/actions.php(17): TekniskSupport\LimitedGuestAccess\User\Actions->getLink()
#1 /var/www/user/index.php(3): TekniskSupport\LimitedGuestAccess\User\Actions->__construct()
#2 {main}
thrown in /var/www/user/actions.php on line 148" while reading response header from upstream, client: 167.94.146.55, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "82.151.61.186:8888"
And:
2023/12/05 19:20:49 [error] 94#94: *1634 open() "/var/www/user/favicon.ico" failed (2: No such file or directory), client: 188.207.79.107, server: _, request: "GET /favicon.ico HTTP/2.0", host: "xxx.duckdns.org:8888", referrer: "https://xxx.duckdns.org:8888/d7b13d/?performedAction=Light"
And Chrome console (is that what you mean with search console?) shows the following:
I am not receiving this red screen for the same url with a different port, as I use the same one for Home Assistant which I can open without any problems.
Do you have enough information like this? Thanks for your help!
Hi,
The errors provided are basically non-issues.
first one is that you have visited the url without the last portion of the URL i.e. no link ID
Second is that the browser automatically asks for a fav-icon which is not present
third looks like it was triggered by a chrome extension.
One thing that caught my eye, is that it looks like a duckdns-address, could it possibly be a previous owner of that subdomain that has misbehaved and actually had malicious code, that google remembers?
Looks like there’s a process if getting it re-audited in order to remove the warnings
https://web.dev/articles/hacked
Hi,
Thanks for your reply once again.
As I mentioned before I don’t get any error message on the same domain on a different port (which I use for Home Assistant).
I also tried creating different links in the addon, but all are showing the error unfortunately…
Hi,
I at this moment do not think the issue is with the application, but something lingering at google’s side from a previous user of the duck-dns domain
Have you tried switching port or change domain name?
Did you check search console?
Hi everyone,
relative home assistant newbie here… Running home assistant green with a nabu casa subscription. Found this addon and it really meets my use case, however, am having some trouble with the networking…
After that, I am still only able to access the generated links on my local network… i can’t seem to reach it over the internet. the request just times out.
not sure what i am missing here and would appreciate any guidance…
Hi,
You should not port forward port 8899, that is the administration interface.
It kind of sounds like you are behind a CGNAT or that your ISP blocks the port in some way
Is your external IP really publicly available?
Check https://icanhazip.com
Thanks Teknisk for the resonse…
i think you might be right on the CGNAT issue… i spoke to my ISP and they insisted i get a static IP package to solve this “issue”…
working that out…
Another possible fix for this is to use something like a VPN or tailscale or wireguard to let the user in behind the CGNAT or utilize a web accessible proxy to proxy the traffic (that’s kind of how nabu casa works)
How it would work is that you have a server somewhere that is accessible thru the internet
You connect your sevice that is behind the firewall to it with a tunnel connection
something like an SSH reverse tunnel can be used for that; you may also want to check out autossh in order to keep the connection stable