MySensors Php API class + command line script + Form
-
As I needed a simple tool to test MySensors send/receive messages, I've created a basic php class, including a command line script , that can be used to send/receive mysensors messages directly to the Ethernet Gateway.
You can use it in your php controllers, or directly on the command line by tapping commands like:
./mysensors_bin.php 192.168.0.240 set 12 0 V_STATUS 1
This example send a command to the gateway at IP 192.168.0.240, to set the V_STATUS to 1, for Node 12, child 0...
The project is at GitHub, and your contributions are most welcome !
https://github.com/soif/MySensors_Php_APIBTW I did my best to understand how MySensors messages worked, but without more documentation, I may have missed some things. So test it, and feel free to commit PR to the develop branch !
HTH
-
Currently Working (develop branch) on a convenient form to convert/send messages .
It should certainly help developers to test their sensors/gateway
-
I've just posted version 1.1, including the form showed above.
Any current users ?
Comments?
-
Updated to v1.2 adding Serial gateway experimental support!
As I don't have any serial gateway to test, I can't figure if it work or not, but I've implemented all the needed components to make it work.
Would you please test if it work fine for you, and push some PR if some things need to be fixed for the serial connection.
If you had to modify the "PhpSerial" class, would you please also push it back to the original developer repoHTH
-
Great idea.
I am trying to run the form.php but "select type first" doesn't change. tested on chrome and IE
-
Seems like Chrome + IE does not like function argument default values in JS, while mozilla does.
I've just pushed v1.21 which fixes this bug.
git pull
-
@soif Great. I will test it tomorrow.
Thanks
-
If you dont use git just replace the form.php with the one at GitHub
Let me know if it works flawlessly (eth or serial?).
cheers
-
There is my php module for MajorDomo https://github.com/Shagrat2/majordomo-mysensor
His contain library for MYSensor phpMS.php, and to extend classes for Serrial & TCP (phpMSCom.php, phpMSTcp.php)
Suggested Topics
-
Welcome
Announcements • • hek