Help me Please!


#1

NODE_ENV=dev node index.js
Environment Selected: dev
Loading… device
device Loading… device > gpio +0ms
device Loading… device > heartbeat +12ms
device Loading… device > maintain +10ms
device Loading… device > malos +4ms
device Loading… device > network +2ms
device Loading… device > port +135ms
device Loading… device > sensor +3ms
device Loading… device > service +3ms
device Loading… device > system +5ms
device Loading… device > wifi +2ms
device Loading… device > driver > accelerometer +4ms
device Loading… device > driver > altitude +3ms
device Loading… device > driver > detection +4ms
device Loading… device > driver > gesture +4ms
device Loading… device > driver > gpio +3ms
device Loading… device > driver > gyroscope +5ms
device Loading… device > driver > humidity +3ms
device Loading… device > driver > ir +4ms
device Loading… device > driver > led +3ms
device Loading… device > driver > magnetometer +7ms
device Loading… device > driver > mic +2ms
device Loading… device > driver > pressure +11ms
device Loading… device > driver > recognition +5ms
device Loading… device > driver > temperature +283ms
device Loading… device > driver > uv +3ms
device Loading… device > driver > voice +3ms
device Loading… device > driver > zigbee +6ms
device Init Cmds Registered:> 15 accelerometer face demographics palm thumb-up fist pinch gpio gyroscope humidity magnetometer pressure recognition temperature uv +9ms
Loading… event
matrix Loading… event > app +4ms
matrix Loading… event > device +6ms
matrix Loading… event > firebase +4ms
matrix Loading… event > heartbeat +3ms
matrix Loading… event > sensors +3ms
matrix Loading… event > server +4ms
matrix Loading… event > service +4ms
matrix Loading… event > token +4ms
matrix Loading… event > util +2ms
matrix Loading… event > ves +2ms
Loading… service
matrix Loading… service > application +7ms
matrix Loading… service > auth +341ms
matrix Loading… service > component +3ms
matrix Loading… service > cypher +2ms
matrix Loading… service > firebase +4ms
matrix Loading… service > grpc +781ms
grpc GRPC:> malos : heartbeat +416ms
grpc GRPC:> vision : recognition +99ms
grpc GRPC:> vision : recognition_service +72ms
grpc GRPC:> vision : vision +28ms
grpc GRPC:> vision : vision_service +40ms
matrix Loading… service > lifecycle +1ms
matrix Loading… service > manager +3ms
matrix Loading… service > protobuf +14ms
proto malos : driver.proto +6ms
proto malos : hal.proto +89ms
proto malos : heartbeat.proto +7ms
proto malos : zwave_commands.proto +113ms
proto vision : recognition.proto +65ms
proto vision : recognition_service.proto +1ms
proto vision : vision.proto +16ms
proto vision : vision_service.proto +12ms
matrix Loading… service > stream +23ms
matrix Loading… service > token +7ms
matrix Loading… service > track +59ms
matrix Loading… service > tracking +3ms
matrix Loading… service > ves +3ms
matrix Loading… service > zeromq +3ms
matrix Debug: ,-engine,-Component*,-led,-gatt,-bleno,-bt-characteristic,-hci +56ms
matrix ====== config ===vvv +0ms
matrix { fakeApp: undefined,
matrix path:
matrix { root: ‘/home/pi/matrix-os/’,
matrix db:
matrix { device: ‘/home/pi/matrix-os/db/device.db’,
matrix config: ‘/home/pi/matrix-os/db/config.db’,
matrix user: ‘/home/pi/matrix-os/db/user.db’,
matrix service: ‘/home/pi/matrix-os/db/service.db’,
matrix pending: ‘/home/pi/matrix-os/db/pending.db’ },
matrix pendingFiles: ‘/home/pi/matrix-os/public/pending_files’,
matrix update: ‘/tmp/matrix-update/’,
matrix backup: ‘/tmp/matrix-backup/’,
matrix apps: ‘/home/pi/matrix-os/apps’,
matrix protos: ‘/home/pi/matrix-os/proto’,
matrix splash: ‘public/splash’,
matrix appLog: ‘/home/pi/matrix-os/apps/app.log’ },
matrix jwt: { secret: undefined },
matrix version: ‘0.15.0’,
matrix local: {},
matrix heartbeatInterval: 10000,
matrix spaceLimit: 5000000,
matrix splashInterval: 30,
matrix sensorRefresh: 2500,
matrix sensorSockets: true,
matrix socketCheckDelay: 1000,
matrix socketRefreshTimeout: 10,
matrix registrationUUID: ‘b1a6752152eb4d36e13e357d7c225466’,
matrix configurationUUID: ‘b1a6752152eb4d36e13e357d7c225467’,
matrix envs:
matrix { deviceSecret: ‘d1b5d16afeb91a03fc3ec0d22936bd23df3789ea53a6ec00d7b65aba2d102d53f1a26c7379f96360ed1229b948’,
matrix deviceId: ‘dfc4d3b15135’,
matrix nodeEnv: ‘dev’ },
matrix components: {},
matrix paths: { root: ‘/home/pi/matrix-os/config’ } }
+0ms
matrix ENV: dev API: https://dev-api.admobilize.com MXSS: http://dev-mxss.admobilize.com +89ms
matrix ENV: dev API: https://dev-api.admobilize.com MXSS: http://dev-mxss.admobilize.com +0ms
device device init: heartbeat +147ms
device driver init: accelerometer +48ms
device driver init: altitude +1ms
device driver init: detection +47ms
device driver init: gesture +1ms
device driver init: gpio +0ms
device driver init: gyroscope +1ms
device driver init: humidity +0ms
device driver init: ir +1ms
zeromq [zmq][registerComponent> led +1ms
device driver init: led +9ms
device driver init: magnetometer +2ms
device driver init: mic +1ms
device driver init: pressure +1ms
device driver init: recognition +33ms
device driver init: temperature +1ms
device driver init: uv +1ms
device driver init: voice +0ms
device driver init: zigbee +9ms
matrix Loader stopped +2ms
Not using device data from db, using MATRIX_DEVICE_ID and MATRIX_DEVICE_SECRET instead!
matrix event listener: app +149ms
matrix event listener: device +1ms
matrix event listener: heartbeat +1ms
matrix event listener: sensors +1ms
matrix event listener: server +1ms
matrix event listener: service +1ms
matrix event listener: token +1ms
matrix event listener: util +0ms
matrix event listener: ves +2ms
Starting as device: dfc4d3b15135
sdk Offline setup successful +5ms
sdk Checking API server… +6ms
sdk secret-> d1b5d16afeb91a03fc3ec0d22936bd23df3789ea53a6ec00d7b65aba2d102d53f1a26c7379f96360ed1229b948 +474ms
sdk [post] params: { url: ‘https://dev-api.admobilize.com/v2/device/token’,
form:
{ device_id: ‘dfc4d3b15135’,
device_secret: ‘d1b5d16afeb91a03fc3ec0d22936bd23df3789ea53a6ec00d7b65aba2d102d53f1a26c7379f96360ed1229b948’,
jwt_token: true },
json: true } +5ms
sdk [post] body: { status: ‘error’, status_code: 400, error: ‘Device not found.’ } +329ms
sdk Device Error { status: ‘error’, status_code: 400, error: ‘Device not found.’ } +8ms
API Error: 400 - Device not found.
Unable to setup online MOS, something went wrong (400) (Device Token Retrieval Error)
Bad Matrix Initialization Device Token Retrieval Error
sdk Loader stopped +7ms
sdk Loader stopped +2s
sdk DESTROYING +8ms
sdk Firebase wasn’t initialized +8ms
Cleanup complete…


#2

This device_id: dfc4d3b15135 doesn’t exist. Maybe you deleted? Register a new device and try again, it should work fine.


#3

First, thank you for reply.

I register another device again Id:d5f9c6fcac6a and the result is the same.

Any Sugestion.

Thanks!!


#4

You getting the same error?


#5

Hello,
I get two diferent errors now.
First when i Use MODE_ENV=dev the result is:
89d4fb19b6b308f99aa1f7e14 +447ms
sdk [post] params: { url: ‘https://dev-api.admobilize.com/v2/device/token’,
form:
{ device_id: ‘d5f9c6fcac6a’,
device_secret: ‘c1160b61aa5822ef556116564f8e6b66c03710d409df6c53d5ef8164f7fb415eb89d4fb19b6b308f99aa1f7e14’,
jwt_token: true },
json: true } +4ms
sdk [post] body: { status: ‘error’, status_code: 400, error: ‘Device not found.’ } +806ms
sdk Device Error { status: ‘error’, status_code: 400, error: ‘Device not found.’ } +12ms
API Error: 400 - Device not found.
Unable to setup online MOS, something went wrong (400) (Device Token Retrieval Error)
Bad Matrix Initialization Device Token Retrieval Error
sdk Loader stopped +13ms
sdk Loader stopped +2s
sdk DESTROYING +6ms
sdk Firebase wasn’t initialized +4ms
Cleanup complete…

When i Use MODE_ENV=rc the results is
Environment Selected: rc
Loading… device
Loading… event
Loading… service
Not using device data from db, using MATRIX_DEVICE_ID and MATRIX_DEVICE_SECRET instead!
Starting as device: d5f9c6fcac6a
Installed Apps: sensorTest, leddemo
Local Apps: HelloWorld.matrix, leddemo.matrix, sensorTest.matrix
Local / Installed Δ 1
MXSS Connected: https://mxss.admobilize.com
MALOS COMPONENTS :gear: IMU:20013 | Provides yaw/pitch/roll. Check Imu message (protocol buffer)
:gear: Humidity:20017 | Provides humidity and temperature. Check Humidity message (protocol buffer)
:gear: Everloop:20021 | Write-only. There are 35 leds. Values range from 0 to 255. Check message EverloopImage (protocol buffer)
:gear: Pressure:20025 | Provides barometer/altimeter and temperature. Check Pressure message (protocol buffer)
:gear: UV:20029 | Provides UV index. Check UV index message (protocol buffer). Also provides a string with the UV risk according to the OMS. See: https://www.epa.gov/sunsafety/uv-index-scale-0
:gear: MicArray_Alsa:20037 | Simple ALSA Driver for MATRIX Creator’s Microphone Array
:gear: Lirc:20041 | Write-read. Get list remotes and send commands via IR. In development
:gear: Servo:20045 | Write-read. Servo handler. In development
:gear: Gpio:20049 | Write-read. Gpio handler. In development

=<[^/^]>= [d5f9c6fcac6a] ready
[59b9a7923476ce01003e901d]


|/| || | |/ | / [o__o]
| | | | | | \ | _/_ v0.15.0
hb: sen> [] svc> []

But all the apps that i have installed dont work and any leds on.

Again, thank you for reply!!


#6

Hey @llangar when you use NODE_ENV=dev it’s normal to get the error “Device not found” because you have registered a device at the RC environment. Keep in mind that you should work in the environment you registered (or are using).
I see that the NODE_ENV=rc is fine, your MOS initialization works normally. So can you provide me more informations on how the apps are not working? Can you run with the debug flag? Like (via CLI) `DEBUG=* matrix start appname".


#7

Hey lucas this is my exit console in Mac running matrix-cli.

MacBook-Air-de-Ricard:~ ricardriveraginer$ DEBUG=* matrix start HelloWorld
cli Env: rc +0ms
cli Env: rc +0ms
⣷ sdk Token ok! +262ms
cli Firebase Init 59b9a7923476ce01003e901d d5f9c6fcac6a +1ms
firebase:util using rc / production firebase +0ms
⣷ firebase:util Firebase Auth Success +620ms
⢿ firebase:util [fb]installed-app> recogTest +358ms
firebase:util recogTest :white_check_mark: +0ms
firebase:util [fb]installed-app> sensorTest +3ms
firebase:util sensorTest :white_check_mark: +0ms
firebase:util [fb]installed-app> HelloWorld +1ms
firebase:util HelloWorld :white_check_mark: +1ms
firebase:util [fb]installed-app> leddemo +1ms
firebase:util leddemo :white_check_mark: +0ms
firebase:util [fb]installed-app> zigTest +2ms
firebase:util zigTest :white_check_mark: +1ms
firebase:util [fb]installed-app> level +1ms
firebase:util level :white_check_mark: +1ms
firebase:util done mapping app records +0ms
helpers Track Event app-start { aid: ‘HelloWorld’, did: ‘d5f9c6fcac6a’ } +1ms
Iniciando: HelloWorld d5f9c6fcac6a
⣯ firebase:app https://admobilize-production.firebaseio.com/users/59b9a7923476ce01003e901d/devices/d5f9c6fcac6a/apps apps aId: { ab08d05d365e:
{ createdAt: 1508168135632,
description: ‘MATRIX Starting Animation’,
icon: ‘https://storage.googleapis.com/dev-admobilize-matrix-apps/default.png’,
name: ‘HelloWorld’,
updatedAt: 1508168135632,
version: ‘1.0.2’ } } +160ms
start appId> ab08d05d365e +2ms
⡿ start Get current status: 59b9a7923476ce01003e901d>d5f9c6fcac6a>ab08d05d365e>inactive +147ms
Iniciando: HelloWorld
⣷ sdk Url {
sdk protocol: ‘wss’,
sdk slashes: true,
sdk auth: null,
sdk host: ‘mxss.admobilize.com’,
sdk port: null,
sdk hostname: ‘mxss.admobilize.com’,
sdk hash: null,
sdk search: null,
sdk query: null,
sdk pathname: ‘/’,
sdk path: ‘/’,
sdk href: ‘https://mxss.admobilize.com/’ } +4ms
sdk Trying Socket Connection: wss://mxss.admobilize.com/ +1ms
engine.io-client:socket creating transport “websocket” +0ms
engine.io-client:socket setting transport websocket +6ms
⣻ engine.io-client:socket socket receive: type “open”, data “{“sid”:“8fgFuG9OzmU-SrzMAACL”,“upgrades”:[],“pingInterval”:15000,“pingTimeout”:450000}” +355ms
engine.io-client:socket socket open +2ms
sdk Socket Connection: wss://mxss.admobilize.com/ +393ms
engine.io-client:socket flushing 1 packets in socket +1ms
sdk socket open +4ms
⣯ engine.io-client:socket socket receive: type “message”, data “{“channel”:“register-ok”,“payload”:{“ok”:true}}” +334ms
sdk Register ok +332ms
sdk [ss] { t: ‘app-start’,
deviceId: ‘d5f9c6fcac6a’,
p:
{ name: ‘HelloWorld’,
token: ‘O3LFJVV543YL7BERG6HBMWAMGYNJPM1DHCKNU2V3KGRW5AOW7O522CFKFJBFXAAB5E7LA5DORPWUFIAQNQZ2NEYF0Q83BEBO6TB5YBHQ29TO4AQMX4B8FK1NUWIIPL8Z99NTTDRVQRZ3QIAZ95WHX47ZZZ0343FMSRQSUWDJXRIG8EJMTZW5CYDEBBOO6HI18Z6ELQ8J’ } } +1ms
sdk [ss]> client-cmd { t: ‘app-start’,
deviceId: ‘d5f9c6fcac6a’,
p:
{ name: ‘HelloWorld’,
token: ‘O3LFJVV543YL7BERG6HBMWAMGYNJPM1DHCKNU2V3KGRW5AOW7O522CFKFJBFXAAB5E7LA5DORPWUFIAQNQZ2NEYF0Q83BEBO6TB5YBHQ29TO4AQMX4B8FK1NUWIIPL8Z99NTTDRVQRZ3QIAZ95WHX47ZZZ0343FMSRQSUWDJXRIG8EJMTZW5CYDEBBOO6HI18Z6ELQ8J’ } } +0ms
engine.io-client:socket flushing 1 packets in socket +3ms
engine.io-client:socket socket close with reason: “forced close” +2ms
sdk socket close +4ms
engine.io-client:socket socket closing - telling transport to close +1ms
Iniciada: HelloWorld

It seems to be ok but the matrix-creator don´t response no LED lights up and does absolutely nothing.
I worked with the previous version 0.14.1.

In any case, I repeat many thanks for the help!!


#8

can you show me your HelloWorld app code?


#9

pi@pi:~/matrix-os/apps/HelloWorld.matrix $ cat app.js
//35 Colors For Each LED
var colors = [
#ecff00’,
#c1ff00’,
#91ff00’,
#56ff00’,
#28ff00’,
#02ff00’,
#00ff1c’,
#00ff43’,
#00ff78’,
#00ffa7’,
#00ffd6’,
#00fff7’,
#00efff’,
#00c0ff’,
#008aff’,
#0052ff’,
#0024ff’,
#0001ff’,
#1b00ff’,
#4600ff’,
#7000ff’,
#a100ff’,
#cc00ff’,
#f000ff’,
#f000ff’,
#ff00bd’,
#ff008f’,
#ff004f’,
#ff0012’,
#ff0700’,
#ff2b00’,
#ff5c00’,
#ff9500’,
#ffcb00’,
#fff700’,
];

var colorFill = [];//Second array to slowly fill iris with color
var counter = 0;

setInterval(function(){
if(counter < 35){//Transfer colors over
colorFill[counter] = colors[counter];
counter++;
}
else{//Shift array for rotation effect
colorFill.unshift(colorFill[34]);
colorFill.pop();
}
matrix.led(colorFill).render();//Update current Lights
}, 15);

Is the AppStore app.