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
alge 0
Hi!
I'm making a virtual device for my Marantz stereo system. I have a HC2 running 3.6 firmware. (I'll share the virtual device with the world when it's working nicely.
Please login or register to see this image.
/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> It uses a simple telnet protocol which is a bit unstable if you have multiple connections to it - which happens once in while. So usually I'll send "SI?\r" and get for example "SIAUXD\r" back (according to the protocol), but sometimes the responses get a bit tangled up, which makes the communication a bit error prone.The buttons on the virtual device are working nicely, including volume slider and balance slider. But the main loop has a tendency to just hang after a while, and the only way I've found to get it working again from a hung state is to either save the configuration through the UI, or to power cycle the HC2. Does the debug buffer fill up and cause problems due to fibaro:debug? Will a crash due to accessing nil values cause the virtual device to stop responding like this? As a workaround - is there any way to trigger what happens when I save the device, which gets it un-stuck?
Does anyone have any good debug tips for this kind of situation? Also... Is there any API documentation for the 3.6 HC2? It would be good to know what the errors codes one gets from various Net.FTcpSocket function calls, for example.
Current code:
Please login or register to see this code.
18 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.