kakopappa / sinric

Amazon Alexa Smart home skill / Google Home Action for ESP8266 / ESP32 / Arduino
https://sinric.com
285 stars 166 forks source link

Exception 28: core dump and reboot: bug found in examples tv_codec_ir_example.ino #412

Open JerryAstro opened 4 years ago

JerryAstro commented 4 years ago

Hello, First I love your work! I setup and ran examples/tv_codec_ir_example.ino. Everything worked but 'AdjustVolume' line 289 and SkipChannels" line 303. The function would generate a Exception 28: with a core dump and reboot (viewed in Arduino IDE Serial Monitor). I traced the issue to line 294 "int volume = atoi(kcvolume)". The const char* kcvolume (line 292) points to a nullset and atoi would stack overflow on a nullset. To fix the problem I change line 292 to 'int Volume = json ["value"]["volume"] ;' and commented (//) line 294. The SkipChannels" line 303 had the same problem with the same fix. Now adjust volume and Skip Channel works with no errors.

Other minor issues are: 1) you should add a comment to line 66 "// TODO: Change to your sinric Devise ID. Your ID is displayed on sinric.com dashboard

2) the IDE would trip up on function calls that started with 'set'' (setChannel). It seems 'set' is a reserved word so I changed the function calls to "Set" (SetChannel).

3) when I 'Select Input' Alexa responds with "Sorry, REMOTE is not responding" but command works. I don't know why I get this response with this command.

4)I use REMOTE because Alexa gets confused with TV because I have a Fire TV Stick .

Thanks and keep up the good work Jerry