Can a Node Send json?
dpcr last edited by dpcr
Please forgive my ignorance but I have searched and searched and not found what I was looking for. Please help.
I am making an RFID garage door opener (another) using the MIFARE Classic tags and a MySensors Node. It differs in that I am using the tags to store the tag holder name and encryption keys A & B (I know the generic MIFARE classic encryption has been hacked). What I am trying to do is send the card holders name, time scanned, time access granted or denied to Domoticz. I initially tried a text sensor (V_TEXT) but it only held 16 characters. However using json I can enter up to 40 easily. I can't use the Domoticz logs because from what I have found they only hold their log for several days at the max. I would rather have a dedicated log just for the garage door RFID system.
My question is, is there a way to send a json command through the mysensors network to my Ethernet gateway then onto Domoticz which is on a Pi on the same network.
Here is a the json format that Domoticz accepts:
I don't think it will be possible, because it is the gateway that handles the communication with the controller. Have you tried with V_CUSTOM type?
dpcr last edited by
@gohan No I haven't, I'll give it a try. Thanks.
@dpcr Remember the API page, you have plenty to play with
kontrollable last edited by
The maximum payload size is 25 bytes!
So there are some limitations.
@dpcr You cannot ignore the character limit in MySensors by using a different V_ type. You either have to split the information in pieces that can be handled or have the controller do the handling for you.
Also Domoticz uses the S_CUSTOM type in a very specific way.
scripting in Domoticz is easy in Lua. What I would suggest is to build your tag 'database' in Domoticz (eg. a sensor for each tag) and handle logging from LUA.
dpcr last edited by
@AWI Thanks for all your information, it gives me some direction. So from what I have read it sounds like MySensors can't send a json command to Domoticz.