Closed mcfanda closed 7 years ago
Hi @mcfanda, Not that I know. For what reason do you need this?
Hi @mcfanda, you could try the following:
1.) load the instance via (replace 42 with your instance id): GET http://YOUR_IP:8083/ZAutomation/api/v1/instances/42
, resulting in:
{
"data": {
"instanceId": "0",
"moduleId": "MQTT",
"active": true,
"title": "MQTT",
"params": {
"clientId": "zway",
"host": "localhost",
"port": "1883",
"topicPrefix": "zway",
"topicPostfixStatus": "status",
"topicPostfixSet": "set",
"publications": [ ]
},
"id": 35,
"creationTime": 1481005986
},
"code": 200,
"message": "200 OK",
"error": null
}
2.) take the content of data from the first request as body for following request (replace 42 with your instance id):
PUT http://localhost:8083/ZAutomation/api/v1/instances/42
{
"instanceId": "0",
"moduleId": "MQTT",
"active": true,
"title": "MQTT",
"params": {
"clientId": "zway",
"host": "localhost",
"port": "1883",
"topicPrefix": "zway",
"topicPostfixStatus": "status",
"topicPostfixSet": "set",
"publications": [ ]
}
}
This restarts the module.
Thanks. I'm going to try. I need it because it seems that the module stops every now and then. I'm try to debug the reason. Since I'm setting up home assistant together with z-way, the house is full of mqtt topics and clients. Some of them seems to kill the module.
Thanks @pathec and @mcfanda!
Could you try PR #10? It might be that you're receiving timeouts. I'll test the PR this weekend and then merge it to master.
Yes, i'll do and let you know
I've tired, but I got this fatal: Remote branch latest not found in upstream origin
@mcfanda I've just merged the PR into master, can you try it again?
Hi is there a way to restart the module from HTTP request (curl) or command line? thanks