Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
Deivydas 1
Hello,
I'm writing an Quick App for controlling device using UDP protocol. It's seems to be working, but I have some additional questions.
1. I'm using @tinman QA lib for aes128. When I decrypt response from device I received json formated string with additionals spaces at the end:
{"t":"dev","cid":"111111","bc":"000000000000000000000000000000","brand":"gree","catalog":"gree","mac":"111111","mid":"10001","model":"gree","name":"12312312312","series":"gree","vender":"1","ver":"V1.2.1","lock":0}
OR
{"t":"bindok","mac":"111111","key":"12312312312","r":200}
And here is the problem, that if the spaces are at the end, I cannot do json.decode to get exactly value, any solution?
2. Can't understand why result return in function return nil value. When I debug it it have value, but how to return this value for other function?
Thanks
Please login or register to see this code.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.