{"id":19163346,"url":"https://github.com/jessedc/ve.direct-python","last_synced_at":"2025-05-07T11:21:58.484Z","repository":{"id":43186186,"uuid":"158184371","full_name":"jessedc/ve.direct-python","owner":"jessedc","description":"VE.Direct to InfluxDB for Raspberry Pi","archived":false,"fork":false,"pushed_at":"2019-11-05T19:21:32.000Z","size":17,"stargazers_count":27,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-19T21:25:51.802Z","etag":null,"topics":["python","raspberry-pi","raspberry-pi-zero-w","solar-energy","solar-system","victron"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jessedc.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}},"created_at":"2018-11-19T08:08:08.000Z","updated_at":"2024-09-01T23:30:24.000Z","dependencies_parsed_at":"2022-08-31T15:30:40.122Z","dependency_job_id":null,"html_url":"https://github.com/jessedc/ve.direct-python","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/jessedc%2Fve.direct-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Fve.direct-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Fve.direct-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Fve.direct-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessedc","download_url":"https://codeload.github.com/jessedc/ve.direct-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252866124,"owners_count":21816397,"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":["python","raspberry-pi","raspberry-pi-zero-w","solar-energy","solar-system","victron"],"created_at":"2024-11-09T09:14:59.912Z","updated_at":"2025-05-07T11:21:58.414Z","avatar_url":"https://github.com/jessedc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VE.Direct Python\n\nPython 3 parser for Victron VE.Direct protocol.\n\nThis project is designed to run on raspberry pi connected to the VE.Direct port of an MPPT device and then post the data to an influx DB instance.\n\nRaspberry pi serial port is GPIO 14 + 15 and is available at `/dev/ttyAMA0`.\n\n# Installation\n\n- Clone this repository on your raspberry-pi to `/home/pi/ve.direct-pyton`\n- Copy `.env.example` to `.env.installed`\n- Configure `INFLUX_HOST` and `INFLUX_DB` in `.env.installed`\n- Run the `setup.sh`.\n\n```bash\ncp .env.example .env.installed\n./install.sh\n```\n\nDetailed install commands\n\n```\nsudo cp ./lib/systemd/system/vedirect.service /lib/systemd/system/\nsudo chmod 644 /lib/systemd/system/vedirect.service\n\nsudo systemctl daemon-reload\nsudo systemctl enable vedirect.service\nsudo systemctl start vedirect.service\n\nsudo reboot\n```\n\n# Running the parser directly\n\n```bash\n/usr/bin/python3 -u -m vedirect --influx=pi.hole --database=solar --port=/dev/ttyAMA0\n```\n\n# Example InfluxDB Measurement\n\n```json\n[\n    {\n      \"time\": \"2019-10-27T01:48:32.729954+00:00\", \n      \"tags\": {\n        \"sensor\": \"victron\", \n        \"location\": \"outdoors\"\n      },\n      \"fields\": {\"IL\": 600, \"PPV\": 9, \"V\": 25.7, \"I\": -270, \"VPV\": 33.55}, \n      \"measurement\": \"power\"\n    }, \n    {\n      \"time\": \"2019-10-27T01:48:32.729954+00:00\", \n      \"tags\": {\n        \"sensor\": \"victron\", \n        \"location\": \"outdoors\"\n      }, \n      \"fields\": {\n        \"H21\": 25, \"H20\": 0.07\n      }, \n      \"measurement\": \"today\"\n    },\n    {\n        \"time\": \"2019-10-27T01:48:32.729954+00:00\", \n        \"tags\": {\n          \"sensor\": \"victron\",\n          \"location\": \"outdoors\"\n        }, \n        \"fields\": {\n            \"MPPT\": 2, \n            \"CS\": 3, \n            \"LOAD\": 1, \n            \"ERR\": 0\n        }, \n        \"measurement\": \"status\"\n  }\n]\n```\n\n# References\n\n## VE.Direct\n\nVictron Manuals/VE.Direct-Protocol-3.27.pdf\n\nVE.Direct parser inspired by https://github.com/karioja/vedirect/blob/master/vedirect.py\n\n## vcgencmd\n\n- https://medium.com/@kevalpatel2106/monitor-the-core-temperature-of-your-raspberry-pi-3ddfdf82989f\n- https://elinux.org/RPI_vcgencmd_usage\n\n## Systemd\n\n- https://www.raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/\n- https://stackoverflow.com/questions/13069634/python-daemon-and-systemd-service\n\n## Python\n\n- [Executing periodic actions in Python](https://stackoverflow.com/a/28034554/184130)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedc%2Fve.direct-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessedc%2Fve.direct-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedc%2Fve.direct-python/lists"}