I want to make some hardware using a arduino and Ethernet shield that collects information from switches connected to it and send it over MQTT to domoticz. I also want to make it's setup easy with the build in domoticz learn system.
How to send some information with MQTT is very straight forward. An using MQTTfx is manage to do so without problem.
But I would like to understand how the learn process works in domoticz, my idea is that if is send someting like this, domoticz would react on it and suggest an new device :
domoticz/in
{
"Battery" : 255,
"RSSI" : 12,
"description" : "Test",
"dtype" : "Lighting 1",
"id" : "67",
"idx" 5 : ,
"name" : "Button 2",
"nvalue" : 1,
"stype" : "X10",
"switchType" : "On/Off",
"unit" : 1
}
But that does not work, except if is send a out from domoticz (from a dummy switch) back then it says it already exists, in any other case it will timeout. I seem to be missing something here I think....
Is there somewhere a good manual, tutorial or example on how the learn process works.
How will a new device get its "idx" appointed for example or can i just let de device choose any and it that id limited in size ?
I have search a lot to find some information about it, but only with minimal success until now...
Thanks.
How does the "Learn Switch/Light" process work using MQTT
Moderator: leecollings
Re: How does the "Learn Switch/Light" process work using MQTT
AS far as I know, Domoticz will listen to its receiver(s) for a used transmitter when set in Learn Mode. So I think you need a physical button that sends a signal for Domoticz to learn.
Instead, you could manually add a switch and use most of the data that you push from MQTT to Domoticz. You don't need to supply an id, Domoticz will create one for you. And with that info you could create the message you want with MQTT.
Instead, you could manually add a switch and use most of the data that you push from MQTT to Domoticz. You don't need to supply an id, Domoticz will create one for you. And with that info you could create the message you want with MQTT.
Who is online
Users browsing this forum: No registered users and 1 guest