Menu
$connectionSettings = (new ConnectionSettings) $mqtt = new MqttClient($server, $port, $client_id) Another was a change in the capitalisation of the MQTT client object and add some code to authenticate to my MQTT broker, because I have my MQTT broker secured with a user and password… Below the changes I made to get the authentication to work (incl the capitalisation when establishing the connection): use PhpMqtt\Client\ConnectionSettings I had to do some other modifications, the bracket mentioned by another user was one. Thx for this post, I have the same PWS and using the PHP script I managed to get the info into HA.
0 Comments
Leave a Reply. |