Bonjour,
Bonjour,
Je suis entrain de migrer ma domotique de Jeedom vers Home asssitant.
J’utilisais une scenario pour aller scrapper les info de temperature / humidité de mes sondes la crosse technology via le service https://mobile-alerts.fr/
Voici le scenario :
$stream = stream_context_create(
Array("http" =>
Array("method" => "GET",
//Ne marche plus "header" => "User-agent: PHP",
"header" => "User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0",
)
)
);
$html = file_get_contents("https://measurements.mobile-alerts.eu/Home/SensorsOverview?phoneid=XXXXX,false,$stream);
//$scenario->setLog(strlen($html));
$dom = new DOMDocument;
$dom->loadHTML($html);
$xpath = new DOMXpath($dom);
//Température intérieure
$value=$xpath->query("/html/body/div[2]/div/div/div/div[4]/h4")[0]->childNodes[0]->nodeValue;
if ($value!="---" && $value!="OFL") cmd::byId(3841)->event($value);
//Hygrométrie intérieure
$value=$xpath->query("/html/body/div[2]/div/div/div/div[5]/h4")[0]->childNodes[0]->nodeValue;
if ($value!="---" && $value!="OFL") cmd::byId(3842)->event($value);
//Température extérieure
$value=$xpath->query("/html/body/div[2]/div/div/div/div[6]/h4")[0]->childNodes[0]->nodeValue;
if ($value!="---" && $value!="OFL") cmd::byId(3849)->event($value);
//Hygrométrie extérieure
$value=$xpath->query("/html/body/div[2]/div/div/div/div[7]/h4")[0]->childNodes[0]->nodeValue;
if ($value!="---" && $value!="OFL") cmd::byId(3850)->event($value);
J’ai essayé descrapper les données a partir de l’integration scrape
Voici ma configuration :
Mais sans succes jusqu’a maintenant, voyez-vous une erreur qql part .
Ma configuration
System Information
version | core-2024.7.4 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.12.4 |
os_name | Linux |
os_version | 6.6.33-haos |
arch | aarch64 |
timezone | Europe/Paris |
config_dir | /config |
Home Assistant Community Store
GitHub API | ok |
---|---|
GitHub Content | ok |
GitHub Web | ok |
GitHub API Calls Remaining | 5000 |
Installed Version | 1.34.0 |
Stage | running |
Available Repositories | 1389 |
Downloaded Repositories | 19 |
Home Assistant Cloud
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
Home Assistant Supervisor
host_os | Home Assistant OS 12.4 |
---|---|
update_channel | stable |
supervisor_version | supervisor-2024.06.2 |
agent_version | 1.6.0 |
docker_version | 26.1.4 |
disk_total | 14.1 GB |
disk_used | 12.3 GB |
healthy | true |
supported | true |
host_connectivity | true |
supervisor_connectivity | true |
ntp_synchronized | true |
virtualization | kvm |
board | generic-aarch64 |
supervisor_api | ok |
version_api | ok |
installed_addons | Spotify Connect (0.13.0), ESPHome (2024.7.2), Let’s Encrypt (5.0.26), Linky (1.5.0), Mosquitto broker (6.4.1), Samba Backup (5.2.0), Samba share (12.3.1), Studio Code Server (5.15.0), Terminal & SSH (9.14.0), Zigbee2MQTT (1.39.0-1), eWeLink Smart Home (1.4.3) |
Dashboards
dashboards | 4 |
---|---|
resources | 10 |
views | 23 |
mode | storage |
Recorder
oldest_recorder_run | 21 juillet 2024 à 04:00 |
---|---|
current_recorder_run | 31 juillet 2024 à 09:24 |
estimated_db_size | 384.09 MiB |
database_engine | sqlite |
database_version | 3.45.3 |