[mh] Nanoleaf Aurora crashes on latest master

Brian Rudy via misterhouse-users <[email protected]>
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <[email protected]>
Hi Howard,

I am seeing a strange issue when using the current master branch with 
Nanoleaf_Aurora that I hadn't seen prior to upgrading MH (I had been 
using the 4.2 branch but was using the latest Nanoleaf_Aurora.pm prior 
to this error appearing). Nanoleaf_Aurora runs fine all by itself, but 
if I POST some JSON to another (completely unrelated) custom Misterhouse 
CGI endpoint (/bin/alexa.pl that is ultimately serviced via 
http_server.pl) I get the following error from Nanoloeaf_Aurora.pm (note 
that I have debug set to 4):

/07/26/2020 15:11:09  [Aurora:1] get_data initiated//
//07/26/2020 15:11:09  [Aurora:1] Background Polling initiated//
//07/26/2020 15:11:09  [Aurora:1] Backgrounding 11782 command info, 
get_url -ua 
"http://192.168.69.20:16021/api/v1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/"//
//
//07/26/2020 15:11:10  Oops2: could not pulse break on: Interrupted 
system call//
//
//07/26/2020 15:11:10  [Aurora:1] Background poll info process completed//
//debug: file_data={"name":"Nanoleaf Light Panels 
50:42:08","serialNo":"xxxxxxxxxxxx","manufacturer":"Nanoleaf","firmwareVersion":"3.3.4","hardwareVersion":"1.6-2","model":"NL22","cloudHash":{},"discovery":{},"effects":{"effectsList":["Christmas 
Lights","Color Burst","Cops","Duo RED 
EDM","Fireworks","Flames","Forest","Higgs Boson","Inner Peace","Knight 
Rider","Meteor Shower","Nemo","Northern Lights","Paint 
Splatter","Patterned Beats","Pulse","Pulse Pop Beats","Rhythmic Northern 
Lights","Ripple","Romantic","Scanner","Shooting Stars","Snowfall","Sound 
Bar","Sound Bar Red","Streaking Notes","Triluminox Energy Crystal","Tron 
Legacy","Vader","Static Radiation"],"select":"Tron 
Legacy"},"firmwareUpgrade":{},"panelLayout":{"globalOrientation":{"value":0,"max":360,"min":0},"layout":{"numPanels":12,"sideLength":150,"positionData":[{"panelId":1,"x":149,"y":43,"o":180,"shapeType":0},{"panelId":3,"x":149,"y":129,"o":120,"shapeType":0},{"panelId":4,"x":75,"y":173,"o":60,"shapeType":0},{"panelId":5,"x":0,"y":129,"o":240,"shapeType":0},{"panelId":6,"x":74,"y":259,"o":240,"shapeType":0},{"panelId":7,"x":149,"y":303,"o":60,"shapeType":0},{"panelId":8,"x":149,"y":389,"o":120,"shapeType":0},{"panelId":9,"x":224,"y":259,"o":120,"shapeType":0},{"panelId":10,"x":224,"y":173,"o":180,"shapeType":0},{"panelId":11,"x":299,"y":129,"o":240,"shapeType":0},{"panelId":12,"x":299,"y":303,"o":300,"shapeType":0},{"panelId":13,"x":0,"y":303,"o":180,"shapeType":0}]}},"rhythm":{"auxAvailable":false,"firmwareVersion":"2.4.3","hardwareVersion":"1.4","rhythmActive":false,"rhythmConnected":true,"rhythmId":2,"rhythmMode":0,"rhythmPos":{"x":75.00154891541854,"y":0.0003980267930359105,"o":240.0}},"schedules":{},"state":{"brightness":{"value":50,"max":100,"min":0},"colorMode":"effect","ct":{"value":3000,"max":6500,"min":1200},"hue":{"value":0,"max":360,"min":0},"on":{"value":true},"sat":{"value":0,"max":100,"min":0}}}//
//debug: json_data={"name":"Nanoleaf Light Panels 
50:42:08","serialNo":"xxxxxxxxxxx","manufacturer":"Nanoleaf","firmwareVersion":"3.3.4","hardwareVersion":"1.6-2","model":"NL22","cloudHash":{},"discovery":{},"effects":{"effectsList":["Christmas 
Lights","Color Burst","Cops","Duo RED 
EDM","Fireworks","Flames","Forest","Higgs Boson","Inner Peace","Knight 
Rider","Meteor Shower","Nemo","Northern Lights","Paint 
Splatter","Patterned Beats","Pulse","Pulse Pop Beats","Rhythmic Northern 
Lights","Ripple","Romantic","Scanner","Shooting Stars","Snowfall","Sound 
Bar","Sound Bar Red","Streaking Notes","Triluminox Energy Crystal","Tron 
Legacy","Vader","Static Radiation"],"select":"Tron 
Legacy"},"firmwareUpgrade":{},"panelLayout":{"globalOrientation":{"value":0,"max":360,"min":0},"layout":{"numPanels":12,"sideLength":150,"positionData":[{"panelId":1,"x":149,"y":43,"o":180,"shapeType":0},{"panelId":3,"x":149,"y":129,"o":120,"shapeType":0},{"panelId":4,"x":75,"y":173,"o":60,"shapeType":0},{"panelId":5,"x":0,"y":129,"o":240,"shapeType":0},{"panelId":6,"x":74,"y":259,"o":240,"shapeType":0},{"panelId":7,"x":149,"y":303,"o":60,"shapeType":0},{"panelId":8,"x":149,"y":389,"o":120,"shapeType":0},{"panelId":9,"x":224,"y":259,"o":120,"shapeType":0},{"panelId":10,"x":224,"y":173,"o":180,"shapeType":0},{"panelId":11,"x":299,"y":129,"o":240,"shapeType":0},{"panelId":12,"x":299,"y":303,"o":300,"shapeType":0},{"panelId":13,"x":0,"y":303,"o":180,"shapeType":0}]}},"rhythm":{"auxAvailable":false,"firmwareVersion":"2.4.3","hardwareVersion":"1.4","rhythmActive":false,"rhythmConnected":true,"rhythmId":2,"rhythmMode":0,"rhythmPos":{"x":75.00154891541854,"y":0.0003980267930359105,"o":240.0}},"schedules":{},"state":{"brightness":{"value":50,"max":100,"min":0},"colorMode":"effect","ct":{"value":3000,"max":6500,"min":1200},"hue":{"value":0,"max":360,"min":0},"on":{"value":true},"sat":{"value":0,"max":100,"min":0}}}//
//07/26/2020 15:11:10  [Aurora:1] ERROR! JSON file parser crashed! Can't 
locate object method "property" via package "JSON::XS" at (eval 105) 
line 124.//
// at mh line 31//
//        main::__ANON__('Can\'t locate object method "property" via 
package "JSON::XS"...') called at (eval 105) line 124//
//JSON::Backend::XS::Supportable::_set_for_pp('decode', 
'JSON::XS=SCALAR(0x6a4d540)', '{"name":"Nanoleaf Light Panels 
50:42:08","serialNo":"xxxxxxxx...') called at (eval 105) line 153//
//JSON::Backend::XS::Supportable::_decode('JSON::XS=SCALAR(0x6a4d540)', 
'{"name":"Nanoleaf Light Panels 50:42:08","serialNo":"xxxxxxxx...') 
called at 
/home/brudy/projects/misterhouse/mrhouse/misterhouse-07262020/bin/../lib/Nanoleaf_Aurora.pm 
line 293//
//        eval {...} called at 
/home/brudy/projects/misterhouse/mrhouse/misterhouse-07262020/bin/../lib/Nanoleaf_Aurora.pm 
line 293//
//Nanoleaf_Aurora::process_check('Nanoleaf_Aurora=HASH(0x60ecd38)') 
called at mh line 1580//
//        main::run_hooks_('MainLoop_post') called at (eval 64) line 5//
//        main::MainLoop_post_hooks() called at mh line 1715//
//        main::check_for_action called at mh line 3782//
//        main::monitor_commands called at mh line 7787//
//
//
//07/26/2020 15:11:10  [Aurora:1] Communication Tracking object found. 
Updating from online to offline.../


After this error first appears, it seems to confuse Nanoleaf_Aurora 
because it happens every time poll_process completes after the time the 
initial error is shown. It seems like whatever http_server.pl is doing 
handling the JSON POST is interfering with Nanoleaf_Aurora's /poll_process/.


A full (obfuscated) log excerpt with http logging enabled as well is 
attached.

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
nanoleaf_aurora_errors.txt (text/plain, 10.4 KB)
socket data: port=http data=POST /bin/alexa.pl HTTP/1.1
Host: my.server.com
Content-Type: application/json
Authorization: Basic XXXXX=
User-Agent: PostmanRuntime/7.26.2
Accept: */*
Cache-Control: no-cache
Postman-Token: 342ff4af-d985-4a87-a2b7-0028b97285d1
Accept-Encoding: gzip, deflate, br
Content-Length: 822
Via: threatpulse
X-Forwarded-For: x.x.x.x
X-BlueCoat-Via: 5c1f36aff2b4537d
X-Forwarded-Proto: https
X-Forwarded-For: x.x.x.x

{
    "header": {
        "namespace": "Alexa.ConnectedHome.Control",
        "name": "TurnOnRequest",
        "payloadVersion": "2",
        "messageId": "d9daee07-2847-4fa1-920a-7680fd542de3"
    },
    "payload": {
        "accessToken": "xxxxxxx",
        "appliance": {
            "applianceId": "brians_desk_light",
            "additionalApplianceDetails": {
                "fullApplianceId": "$brians_desk_light"
            }
        }
    }
}.
socket: port=http data=POST /bin/alexa.pl HTTP/1.1
Host: my.server.com
Content-Type: application/json
Authorization: Basic XXXXX=
User-Agent: PostmanRuntime/7.26.2
Accept: */*
Cache-Control: no-cache
Postman-Token: 342ff4af-d985-4a87-a2b7-0028b97285d1
Accept-Encoding: gzip, deflate, br
Content-Length: 822
Via: threatpulse
X-Forwarded-For: x.x.x.x
X-BlueCoat-Via: 5c1f36aff2b4537d
X-Forwarded-Proto: https
X-Forwarded-For: x.x.x.x

{
    "header": {
        "namespace": "Alexa.ConnectedHome.Control",
        "name": "TurnOnRequest",
        "payloadVersion": "2",
        "messageId": "d9daee07-2847-4fa1-920a-7680fd542de3"
    },
    "payload": {
        "accessToken": "xxxxxxx",
        "appliance": {
            "applianceId": "brians_desk_light",
            "additionalApplianceDetails": {
                "fullApplianceId": "$brians_desk_light"
            }
        }
    }
}
----------
http: client_ip=192.168.69.1 a=family.
---------------------start http data------------------------
Request from Client: 192.168.69.1 Port: 18427
POST /bin/alexa.pl HTTP/1.1
Host: my.server.com
Content-Type: application/json
Authorization: Basic XXXXX=
User-Agent: PostmanRuntime/7.26.2
Accept: */*
Cache-Control: no-cache
Postman-Token: 342ff4af-d985-4a87-a2b7-0028b97285d1
Accept-Encoding: gzip, deflate, br
Content-Length: 822
Via: threatpulse
X-Forwarded-For: x.x.x.x
X-BlueCoat-Via: 5c1f36aff2b4537d
X-Forwarded-Proto: https
X-Forwarded-For: x.x.x.x

{
    "header": {
        "namespace": "Alexa.ConnectedHome.Control",
        "name": "TurnOnRequest",
        "payloadVersion": "2",
        "messageId": "d9daee07-2847-4fa1-920a-7680fd542de3"
    },
    "payload": {
        "accessToken": "xxxxxxx",
        "appliance": {
            "applianceId": "brians_desk_light",
            "additionalApplianceDetails": {
                "fullApplianceId": "$brians_desk_light"
            }
        }
    }
}
----------------------end http data-------------------------
------http: http_save_headers - Client Lookup--------
$VAR1 = [
          bless( \*Symbol::GEN59, 'IO::Socket::INET' ),
          '192.168.69.1',
          18427,
          undef,
          [
            {
              'User-Agent' => 'PostmanRuntime/7.26.2',
              'X-BlueCoat-Via' => '5c1f36aff2b4537d',
              'version' => '11',
              'Via' => 'threatpulse',
              'Accept' => '*/*',
              'X-Forwarded-Proto' => 'https',
              'X-Forwarded-For' => 'x.x.x.x',
              'Postman-Token' => '342ff4af-d985-4a87-a2b7-0028b97285d1',
              'Content-Length' => '822',
              'Accept-Encoding' => 'gzip, deflate, br',
              'Cache-Control' => 'no-cache',
              'Content-Type' => 'application/json',
              'Host' => 'my.server.com',
              'Authorization' => 'Basic XXXXX='
            }
          ]
        ];
-------http: http_save_headers - Client Lookup--------
http: http_save_headers client#: 0 req#: 0
http: socket close: 0 Client#: 0 Request#: 0
http: Header = POST /bin/alexa.pl HTTP/1.1

http: gr=/bin/alexa.pl ga= A=family format= ua=PostmanRuntime/7.26.2 v=11 h=POST /bin/alexa.pl HTTP/1.1
http POST query has 822 bytes of args
http POST buf={
    "header": {
        "namespace": "Alexa.ConnectedHome.Control",
        "name": "TurnOnRequest",
        "payloadVersion": "2",
        "messageId": "d9daee07-2847-4fa1-920a-7680fd542de3"
    },
    "payload": {
        "accessToken": "xxxxxxx",
        "appliance": {
            "applianceId": "brians_desk_light",
            "additionalApplianceDetails": {
                "fullApplianceId": "$brians_desk_light"
            }
        }
    }
} get_arg=
[http_server.pl]: posting json data
http POST get_arg=
http: gr=/bin/alexa.pl ga=
http: test_for_file running html_file for ./../web//bin/alexa.pl, ,
http: print html file=./../web//bin/alexa.pl arg= no_header=
http: processing file
Processing perl or CGI file: ./../web//bin/alexa.pl
http: html_file - eval file: alexa.pl
http: Got data lsop=0 cs=0 ip=192.168.69.1 p=18427
07/26/2020 15:11:09  [Aurora:1] get_data initiated
07/26/2020 15:11:09  [Aurora:1] Background Polling initiated
07/26/2020 15:11:09  [Aurora:1] Backgrounding 11782 command info, get_url -ua "http://192.168.69.20:16021/api/v1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/"

07/26/2020 15:11:10  Oops2: could not pulse break on: Interrupted system call

07/26/2020 15:11:10  [Aurora:1] Background poll info process completed
debug: file_data={"name":"Nanoleaf Light Panels 50:42:08","serialNo":"xxxxxxxxxxxx","manufacturer":"Nanoleaf","firmwareVersion":"3.3.4","hardwareVersion":"1.6-2","model":"NL22","cloudHash":{},"discovery":{},"effects":{"effectsList":["Christmas Lights","Color Burst","Cops","Duo RED EDM","Fireworks","Flames","Forest","Higgs Boson","Inner Peace","Knight Rider","Meteor Shower","Nemo","Northern Lights","Paint Splatter","Patterned Beats","Pulse","Pulse Pop Beats","Rhythmic Northern Lights","Ripple","Romantic","Scanner","Shooting Stars","Snowfall","Sound Bar","Sound Bar Red","Streaking Notes","Triluminox Energy Crystal","Tron Legacy","Vader","Static Radiation"],"select":"Tron Legacy"},"firmwareUpgrade":{},"panelLayout":{"globalOrientation":{"value":0,"max":360,"min":0},"layout":{"numPanels":12,"sideLength":150,"positionData":[{"panelId":1,"x":149,"y":43,"o":180,"shapeType":0},{"panelId":3,"x":149,"y":129,"o":120,"shapeType":0},{"panelId":4,"x":75,"y":173,"o":60,"shapeType":0},{"panelId":5,"x":0,"y":129,"o":240,"shapeType":0},{"panelId":6,"x":74,"y":259,"o":240,"shapeType":0},{"panelId":7,"x":149,"y":303,"o":60,"shapeType":0},{"panelId":8,"x":149,"y":389,"o":120,"shapeType":0},{"panelId":9,"x":224,"y":259,"o":120,"shapeType":0},{"panelId":10,"x":224,"y":173,"o":180,"shapeType":0},{"panelId":11,"x":299,"y":129,"o":240,"shapeType":0},{"panelId":12,"x":299,"y":303,"o":300,"shapeType":0},{"panelId":13,"x":0,"y":303,"o":180,"shapeType":0}]}},"rhythm":{"auxAvailable":false,"firmwareVersion":"2.4.3","hardwareVersion":"1.4","rhythmActive":false,"rhythmConnected":true,"rhythmId":2,"rhythmMode":0,"rhythmPos":{"x":75.00154891541854,"y":0.0003980267930359105,"o":240.0}},"schedules":{},"state":{"brightness":{"value":50,"max":100,"min":0},"colorMode":"effect","ct":{"value":3000,"max":6500,"min":1200},"hue":{"value":0,"max":360,"min":0},"on":{"value":true},"sat":{"value":0,"max":100,"min":0}}}
debug: json_data={"name":"Nanoleaf Light Panels 50:42:08","serialNo":"xxxxxxxxxxx","manufacturer":"Nanoleaf","firmwareVersion":"3.3.4","hardwareVersion":"1.6-2","model":"NL22","cloudHash":{},"discovery":{},"effects":{"effectsList":["Christmas Lights","Color Burst","Cops","Duo RED EDM","Fireworks","Flames","Forest","Higgs Boson","Inner Peace","Knight Rider","Meteor Shower","Nemo","Northern Lights","Paint Splatter","Patterned Beats","Pulse","Pulse Pop Beats","Rhythmic Northern Lights","Ripple","Romantic","Scanner","Shooting Stars","Snowfall","Sound Bar","Sound Bar Red","Streaking Notes","Triluminox Energy Crystal","Tron Legacy","Vader","Static Radiation"],"select":"Tron Legacy"},"firmwareUpgrade":{},"panelLayout":{"globalOrientation":{"value":0,"max":360,"min":0},"layout":{"numPanels":12,"sideLength":150,"positionData":[{"panelId":1,"x":149,"y":43,"o":180,"shapeType":0},{"panelId":3,"x":149,"y":129,"o":120,"shapeType":0},{"panelId":4,"x":75,"y":173,"o":60,"shapeType":0},{"panelId":5,"x":0,"y":129,"o":240,"shapeType":0},{"panelId":6,"x":74,"y":259,"o":240,"shapeType":0},{"panelId":7,"x":149,"y":303,"o":60,"shapeType":0},{"panelId":8,"x":149,"y":389,"o":120,"shapeType":0},{"panelId":9,"x":224,"y":259,"o":120,"shapeType":0},{"panelId":10,"x":224,"y":173,"o":180,"shapeType":0},{"panelId":11,"x":299,"y":129,"o":240,"shapeType":0},{"panelId":12,"x":299,"y":303,"o":300,"shapeType":0},{"panelId":13,"x":0,"y":303,"o":180,"shapeType":0}]}},"rhythm":{"auxAvailable":false,"firmwareVersion":"2.4.3","hardwareVersion":"1.4","rhythmActive":false,"rhythmConnected":true,"rhythmId":2,"rhythmMode":0,"rhythmPos":{"x":75.00154891541854,"y":0.0003980267930359105,"o":240.0}},"schedules":{},"state":{"brightness":{"value":50,"max":100,"min":0},"colorMode":"effect","ct":{"value":3000,"max":6500,"min":1200},"hue":{"value":0,"max":360,"min":0},"on":{"value":true},"sat":{"value":0,"max":100,"min":0}}}
07/26/2020 15:11:10  [Aurora:1] ERROR! JSON file parser crashed! Can't locate object method "property" via package "JSON::XS" at (eval 105) line 124.
 at mh line 31
        main::__ANON__('Can\'t locate object method "property" via package "JSON::XS"...') called at (eval 105) line 124
        JSON::Backend::XS::Supportable::_set_for_pp('decode', 'JSON::XS=SCALAR(0x6a4d540)', '{"name":"Nanoleaf Light Panels 50:42:08","serialNo":"Sxxxxxxx...') called at (eval 105) line 153
        JSON::Backend::XS::Supportable::_decode('JSON::XS=SCALAR(0x6a4d540)', '{"name":"Nanoleaf Light Panels 50:42:08","serialNo":"xxxxxxxx...') called at /home/brudy/projects/misterhouse/mrhouse/misterhouse-07262020/bin/../lib/Nanoleaf_Aurora.pm line 293
        eval {...} called at /home/brudy/projects/misterhouse/mrhouse/misterhouse-07262020/bin/../lib/Nanoleaf_Aurora.pm line 293
        Nanoleaf_Aurora::process_check('Nanoleaf_Aurora=HASH(0x60ecd38)') called at mh line 1580
        main::run_hooks_('MainLoop_post') called at (eval 64) line 5
        main::MainLoop_post_hooks() called at mh line 1715
        main::check_for_action called at mh line 3782
        main::monitor_commands called at mh line 7787


07/26/2020 15:11:10  [Aurora:1] Communication Tracking object found. Updating from online to offline...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.