A write up of the Kettle protocol: http://www.awe.com/mark/blog/20140223.html
composer require loft-digital/phikettle
The Kettle can be discovered on your local network using Nmap, default kettle port number and local IP range:
nmap -p 2000 --open 192.168.3.0/24
It can also be discovered with IP scanner script using kettle discovery request:
\PhiKettle\Config::D_REQUEST. The Kettle will respond with
Example file: basic-listener.php
A Kettle object is created using the kettle's local IP address and default port of
After that, the status request message is sent to a kettle stream and a response from the kettle is subsequently handled in a stream listener.
$ php ./examples/basic-listener.php
Example file: socket-server.php
A Socket server is created on a localhost and is listening on port
1336. It accepts 2 commands:
off. After a command is run, the kettle action is triggered and response is handled in kettle stream listener.
Run socket server:
$ php ./examples/socket-server.php
$ telnet localhost 1336 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Kettle commands: - boil - off
Enter your command and press
boil => Kettle was boiled off => Kettle was turned off
Contributions, suggestions and fixes are more than welcome.
General contribution guidelines apply:
- Fork the repository
- Create a feature/hotfix branch off of master
- Run PHPUnit tests (
- Commit and push the branch
- Make a pull request
- If you're unsure on whether your contribution will be required then please file an issue first and we can discuss it.