Open mcgear opened 1 year ago
I went through the code, and based on lines 173-177 of mod.ts in the AzureFunctionsWorker definition, it seems like the following code should do the trick:
async function handler(context: AzureFunctionsContext) {
context.log(`Telemetry item received: ${context.bindings.deviceTelemetry}`);
// context.log(JSON.parse(context.bindings.deviceTelemetry));
context.bindings!.signalRMessages = [
{
target: 'telemetry',
arguments: [JSON.parse(context.bindings.deviceTelemetry)],
},
];
However, non of my signalR listeners are working.
Any thoughts on this? am i doing it right?
I tried following some related documentation elsewhere, but could not get the signalr output binding working. Can you please let me know how i should be setting outputs to get them working? Here is an example of what i am trying: https://github.com/fathym-deno/iot-ensemble-device-data/blob/integration/functions/deviceTelemetry.ts