{"id":23430155,"url":"https://github.com/softplus/searchconsole-to-mqtt","last_synced_at":"2025-04-09T14:18:34.396Z","repository":{"id":155417267,"uuid":"322533520","full_name":"softplus/searchconsole-to-mqtt","owner":"softplus","description":"Publish Search Console API data to MQTT","archived":false,"fork":false,"pushed_at":"2022-02-03T06:50:34.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T08:15:48.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T08:22:54.000Z","updated_at":"2024-01-25T14:28:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ec499f2-3e56-41a5-82ac-5ef1e8029a96","html_url":"https://github.com/softplus/searchconsole-to-mqtt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fsearchconsole-to-mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fsearchconsole-to-mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fsearchconsole-to-mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Fsearchconsole-to-mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softplus","download_url":"https://codeload.github.com/softplus/searchconsole-to-mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054196,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T08:16:01.829Z","updated_at":"2025-04-09T14:18:34.377Z","avatar_url":"https://github.com/softplus.png","language":"Python","readme":"# searchconsole-to-mqtt\nPublish Search Console API data to MQTT\n\nWant to control your lights based on Google Search impressions of your website?\nOr just want fancy graphs of impressions \u0026 clicks in your Home Assistant? \n\n# Setup\n\n## Libraries\n\nPAHO MQTT\nhttps://pypi.org/project/paho-mqtt/\n\n`pip3 install paho-mqtt`\n\nGoogle APIs\nhttps://developers.google.com/webmaster-tools/search-console-api-original/v3/quickstart/quickstart-python\n\n`pip3 install --upgrade google-api-python-client`\n\n## Google API project \u0026 configuration\n\nFollow steps in https://developers.google.com/webmaster-tools/search-console-api-original/v3/quickstart/quickstart-python\n\nSave the `client-secrets.json` file in your local directory.\n\n# Using it\n\n## Initial call\n\n`python3 sc-to-mqtt.py`\n\nOn first run, it'll generate a generic `sc-to-mqtt.ini` file for settings. \nYou must update this file to make the script work.\nIt'll also prompt you for Google API authentication. \nCopy the link into a browser, log in, copy the result back here.\nThe authentication is saved in `searchconsole.dat`.\n\n## Settings required\n\nIn `sc-to-mqtt.ini` :\n\n```\n[config]\nmqtt_broker = mqttbrokerhostname.domain.com\nmqtt_port = 1883\nmqtt_username = mqttusername\nmqtt_password = mqttpassword\nclient_id = pythonForSeo\nmqtt_prefix = homeassistant/sensor/sc_\nsites = https://example.com/, https://site.com/\n```\n\nmqtt_broker: This is the hostname to your MQTT broker. If you're running it locally, use `localhost`. \n\nmqtt_port: The default MQTT port is 1833. \n\nmqtt_username / mqtt_password: If your broker requires authentication, set that here.\n\nclient_id: This identifies your client. Change it, leave it, whatever.\n\nmqtt_prefix: This is the prefix used for MQTT topics. \nIf you use Home Assistant auto-discovery, make sure it matches your auto-discovery topic prefix. \n\nsites: The sites to export. They must be verified in Search Console.\n\n## Command line options\n\n--noconfig: Don't send config data for sensors\n\n--remove: Send empty config data to remove sensors from Home Assistant\n\n--config=file.ini: Use this configuration file instead of sc-to-mqtt.ini\n\n## Topics sent\n\n### Sensor configuration for auto-discovery\n\n### Sensor values\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Fsearchconsole-to-mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftplus%2Fsearchconsole-to-mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Fsearchconsole-to-mqtt/lists"}