Phygrid Developers
Browse Topics
Edge Modules Integration / Phygrid Developers

Edge Modules Integration

This page describes how you can integrate your IoT Apps and Edge Modules to Grid Signals.

Today, only NodeJS-based modules are supported in our SDK. For python, c#, and other languages, you can use the Grid Signals REST API to integrate your modules.

Set-up

npm install @ombori/ga-modules@latest
or
yarn add @ombori/ga-modules@latest

Initialization

The @ombori/ga-module library automatically initializes grid signals upon invoking connect function.

import { connect, signals } from '@ombori/ga-module';
...
const module = await connect();

Event Tracking

import { connect, signals } from '@ombori/ga-module';
...
const module = await connect();

await signals.detectMood({ certainty: 80, mood: 'HAPPY' });

See Event Tracking page for more details.

createSession

An initial session is created on app start. You can invoke create session when you want to start a new session during runtime.

Usage

import { connect, signals } from '@ombori/ga-module';

...
  signals.createSession();
...

getInstanceProps

This will return the instance object of the session. Ideally, you don't need to get the instance props. This is provided for flexibility.

Usage

import { connect, signals } from '@ombori/ga-module';

...
  console.log(signals.getInstanceProps());
...

© 2024 · Phygrid. An Ombori company