MQTT and json problem
James Sentman
james at sentman.com
Sun Feb 5 14:22:46 EST 2023
The absolute best thing to do is to send me the output from your devices along with what you’re trying to parse out of it and all the info you can think of about how you want to use them with XTension. I am definitely going to do direct Tasmota support the same way that I did direct ESPresense support. The only thing I’m lacking is some specifics about a place to start. The Tasmota stuff is very large and if I try to support everything at once it’s going to take a long time. If I can get to understand how you’re using it and what you need I can get at least a subset of it implemented much sooner.
That being said the problem you’re having with sending an enumerated value back is that you haven’t setup the Unit’s enumerated values list. This is separate from the special enumerations list that you have there for receiving. To send the message it uses the enumerations that you set in the Display tab of the Edit Unit Window.
> On Feb 5, 2023, at 1:27 PM, Emmanuel Bourreau <ebourreau at nordnet.fr> wrote:
>
> Hello,
> how do you parse the json record ?
> Which language do yo use ?
> Could you give the part of code you use to parse the json record ?
> Emmanuel
>
>> Le 5 févr. 2023 à 18:26, Domotique <eric.berdah.domotique at gmail.com <mailto:eric.berdah.domotique at gmail.com>> a écrit :
>>
>> Hello,
>>
>> I am trying to get my tasmota modules working with MQTT client.
>>
>> I encounter 2 problems:
>> the first is to be able to send an order (I receive them well) but I have the following error message when I try to order a unit.
>>
>> power: Enumerated Payload type selected, but no Unit Enumerations are configured. Cannot send payload.
>>
>> the stat/ topic is for receive the state of my switch
>> the cmnd/ topic is to send the command of my switch
>>
>> <Capture d’écran 2023-02-05 à 18.17.40.png>
>>
>>
>> the second problem : i don’t know how to parse a double level json record like this:
>>
>> {"Time":"2023-02-05T18:20:10","Uptime":"0T01:46:12","UptimeSec":6372,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"FamilyBusinessWifi","BSSId":"D8:47:32:62:0B:66","Channel":2,"Mode":"11n","RSSI":100,"Signal":-49,"LinkCount":1,"Downtime":"0T00:00:07 »}}
>>
>> i can parse the first part , but not the second "Wifi":{"AP":1,"SSId": "FamilyBusinessWifi ",,,,,}
Thanks,
James
James Sentman http://www.PlanetaryGear.org http://MacHomeAutomation.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20230205/b0702013/attachment.html>
More information about the XTensionList
mailing list