Hello All,
Im trying to monitor my home NAS server which is publicly avaible but hided behind he cloudflare tunnel.
Obviously simple ping will not gona work so I tried to monitor based on recived HTML which is different when NAS is online (when offline, cloudflare sending the error page)
I tried both: native Home Assistant Scrape integration and HACS Multiscrape: nothing worked.
I do not know what Im doing wrong. I tried many different URL, selectors and value_template
HTML is simple:
Here is one of many examples which I tried (using multiscrape):
- name: HA scraper
resource: https://files.amadeuszjakobczak.pl/login?redirect=%2Ffiles%2F
scan_interval: 10
sensor:
- unique_id: NAS-TEST6
name: NAS-TEST6
select: "#login"
value_template: '{{ "available" if value else "unavailable" }}'
- unique_id: NAS-TEST5
name: NAS-TEST5
select: "#login"
value_template: '{{ value }}'
I tried:
resource:
https://files.amadeuszjakobczak.pl
http://files.amadeuszjakobczak.pl
https://files.amadeuszjakobczak.pl/
select: “h1”, “#login”, “form#login”, “.login > h1:nth-child(1)”
I see sensor in Development Tool but no matter what I do I have always “unavailable” state.
What Im doing wrong ? When I simply copy-paste example sensor from multiscrap documentation, it works perfectly.
I will appreciate for any hints or advices