{"id":16991772,"url":"https://github.com/soif/mysensors_php_api","last_synced_at":"2025-07-16T20:32:48.403Z","repository":{"id":147611007,"uuid":"51519635","full_name":"soif/MySensors_Php_API","owner":"soif","description":"Php API class to send messages to a MySensors Gateway","archived":false,"fork":false,"pushed_at":"2017-03-21T20:51:12.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T04:34:01.576Z","etag":null,"topics":["api","class","mysensors","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soif.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2016-02-11T14:23:38.000Z","updated_at":"2020-11-23T23:36:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b473910-ae35-405e-9e61-83b9162e8c02","html_url":"https://github.com/soif/MySensors_Php_API","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FMySensors_Php_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FMySensors_Php_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FMySensors_Php_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soif%2FMySensors_Php_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soif","download_url":"https://codeload.github.com/soif/MySensors_Php_API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244902927,"owners_count":20529115,"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":["api","class","mysensors","php"],"created_at":"2024-10-14T03:27:12.592Z","updated_at":"2025-03-22T04:11:44.169Z","avatar_url":"https://github.com/soif.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MySensors Php API\n\nThis class implements methods to directly send messages (and get answers) to a [MySensors](http://www.mysensors.org) gateway.\n\n\n### Main Files\n- **example.php** : Basic usage example\n- **form.php** : Send (or visually convert) messages to your Gateway\n- **src/mysensors_bin.php** : an excecutable script to send/receive message from the command line\n- **src/mysensors.class.php** : The main class\n- **src/PhpSerial.php** : Serial handling [class by Rémy Sanchez](https://github.com/Xowap/PHP-Serial/)\n\n\n### Sender / Converter Form\n*form.php* allow you compose messages using convenient dynamic drowndown menu. resulting message is then shown in the message box.\nYou can also do the reverse action : type any text in the message box, and it will dynamically decode it.\nFinally  you can also send the message to the gateway.\n\n![Form screenshot](/images/form.png)\n\n\n### Command Line Script\nHere is the *mysensors_bin.php* help.\n\n\tsoif@server:~# ./mysensors_bin.php -h\n\tUsage: \n\t\tmysensors_bin.php [-p port] [-a] [-g] [-v] [-h] ADDRESS COMMAND\n\t\n\t\t-p port \t: set the gateway TCP port if not 5003\n\t\t-a\t\t: send an ACK\n\t\t-g \t\t: get answer\n\t\t-v \t\t: verbose (show message sent to gateway)\n\t\t-h \t\t: show this help\n\t\n\t\tADDRESS\t: (required) Gateway IP address or SerialPort to use\n\n\t\tCOMMAND\t\t: (required) is one of the following commands:\n\t\t\t- presentation NODE CHILD TYPE\n\t\t\t- set NODE CHILD TYPE PAYLOAD\n\t\t\t- req NODE CHILD TYPE\n\t\t\t- internal NODE CHILD TYPE\n\n\t\t\tUsing the following parameters :\n\t\t\t- NODE \t\t: Node ID\n\t\t\t- CHILD\t\t: Child Sensor ID\n\t\t\t- TYPE\t\t: Sub Type\n\t\t\t- PAYLOAD\t: value to send\n\tExamples:\n\t\tmysensors_bin.php -g 192.168.0.240 internal 0 0 I_VERSION\n\t\tmysensors_bin.php -p 5002 192.168.0.240 presentation 5 1 V_TEMP\n\t\tmysensors_bin.php -a 192.168.0.240 set 12 0 V_STATUS 0\t\n\t\tmysensors_bin.php COM1 set 12 0 V_STATUS 1\t\n\n\n## Disclaimer\n- Currently only the Ethernet Gateway is supposed to work. **The Serial Gateway if just a draft**, for somebody willing to test it and implementing correctly (Push  your PR!).\n- Missing some detailed documentation about the MySensors messages protocol, some features may not work as expected (ie: the *req* command was not tested). So I won't be responsible if you'd burn your house or kill a cat by using this software! ;-)\n\n\n## Contributions\nContributions are welcome ! Please fork this repo at GitHub and submit your PR to the **develop** branch.\n\n\n## Licence\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoif%2Fmysensors_php_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoif%2Fmysensors_php_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoif%2Fmysensors_php_api/lists"}