Page 1 sur 1

[Résolu] MQTT broker - windows

Publié : 20 janv. 2017, 21:33
par seblang
Bonsoir

après plein de recherches, d'essai j'ai finalement trouvé!
donc pour les personnes qui comme moi ont un domoticz qui tourne sur windows et qui souhaite utiliser les connexions mqtt voila la solution :

Téléchargez hivemq a l'adresse http://www.hivemq.com/downloads/
Dezippez le fichier où vous voulez et allez modifier le fichier config.xlm comme suit :
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="hivemq-config.xsd">

<listeners>
<tcp-listener>
<port>1883</port>

<bind-address>127.0.0.1</bind-address>
</tcp-listener>
<websocket-listener>
<port>9001</port>

<bind-address>127.0.0.1</bind-address>
<path>/mqtt</path>
<subprotocols>
<subprotocol>mqttv3.1</subprotocol>
<subprotocol>mqtt</subprotocol>
</subprotocols>
<allow-extensions>true</allow-extensions>
</websocket-listener>
</listeners>
<mqtt>
<max-client-id-length>65535</max-client-id-length>
<retry-interval>10</retry-interval>
</mqtt>
<throttling>
<max-connections>-1</max-connections>
<max-message-size>268435456</max-message-size>
<outgoing-limit>0</outgoing-limit>
<incoming-limit>0</incoming-limit>
</throttling>
<general>
<update-check-enabled>true</update-check-enabled>
</general>

</hivemq>
Esnuite
Editez le fichier mqtt.connect.js et modifiez la ligne :
client = new Paho.MQTT.Client(location.hostname,9001, '/mqtt', 'monitor_'+Date.now().toString().match(/\d{5}$/));
et voila le reste (config domoticz identique a tuto page 1)

et voila en espérant que cela serve a quelqu'un

Re: MQTT broker - windows

Publié : 31 janv. 2017, 15:08
par vil1driver
Salut,

et si tu ne défini pas de dossier, est ce que le code original de connexion fonctionne ?

Code : Tout sélectionner

<path>/</path>
ou

Code : Tout sélectionner

<path></path>

Code : Tout sélectionner

client = new Paho.MQTT.Client(location.hostname, 9001, '', 'monitor_'+Date.now().toString().match(/\d{5}$/));

Re: MQTT broker - windows

Publié : 31 janv. 2017, 15:57
par seblang
salut vil1driver


avant de rajoute justement cela ne marchai pas .........c'est leservice technique hivemq qui m'a conseillé cela
a plus