Can a Node Send json?
-
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:
http://"Domoticz_IP":8080/json.htm?type=command¶m=udevice&idx="IDX_of_TextSensor"&nvalue=0&svalue=Hello World -
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?
-
The maximum payload size is 25 bytes!
So there are some limitations. -
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:
http://"Domoticz_IP":8080/json.htm?type=command¶m=udevice&idx="IDX_of_TextSensor"&nvalue=0&svalue=Hello World@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 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login