MQTT and json problem

Domotique eric.berdah.domotique at gmail.com
Sat Feb 11 06:51:15 EST 2023



Hello,

thank’s for your help

in fact the solution is in few lines, I post it here in case others have the same problem:

newDescription contain by example  : {"Time":"2023-02-11T12:22:21","SI7021":{"Temperature":23.1,"Humidity":43.2,"DewPoint":9.9},"TempUnit":"C »}

and the script :

	set myRecord to parse json newDescription
	set mySensorRecord to |SI7021| of myRecord
	set value of (xUnit) to |Humidity| of mySensorRecord
	set value of (yUnit) to |Temperature| of mySensorRecord
	set value of (zUnit) to |DewPoint| of mySensorRecord


Eric


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20230211/cd9d9ba1/attachment.html>


More information about the XTensionList mailing list