diff --git a/server/config/brain/camera/answers.en.json b/server/config/brain/camera/answers.en.json index ea5ac241b6..478aea3787 100644 --- a/server/config/brain/camera/answers.en.json +++ b/server/config/brain/camera/answers.en.json @@ -1,15 +1,15 @@ [ { - "label": "camera.get-image-room.success", + "label": "camera.get-image.success", "answers": ["Here is what I see:"] }, { - "label": "camera.get-image-room.no-image-found", + "label": "camera.get-image.no-image-found", "answers": ["Sorry, I can't get a recent image."] }, { - "label": "camera.get-image-room.fail", + "label": "camera.get-image.fail", "answers": ["Sorry, something wrong happened while getting the camera"] } ] diff --git a/server/config/brain/camera/answers.fr.json b/server/config/brain/camera/answers.fr.json index 72cf5d36d5..7ca2c901d7 100644 --- a/server/config/brain/camera/answers.fr.json +++ b/server/config/brain/camera/answers.fr.json @@ -1,15 +1,15 @@ [ { - "label": "camera.get-image-room.success", + "label": "camera.get-image.success", "answers": ["Voilà ce que je vois:"] }, { - "label": "camera.get-image-room.no-image-found", + "label": "camera.get-image.no-image-found", "answers": ["Désolé, je n'ai pas trouvé d'image récente."] }, { - "label": "camera.get-image-room.fail", + "label": "camera.get-image.fail", "answers": ["Désolé, je n'ai pas réussi à récupérer cette image de caméra"] } ] diff --git a/server/config/brain/camera/questions.en.json b/server/config/brain/camera/questions.en.json index d4672a6517..4e52edc298 100644 --- a/server/config/brain/camera/questions.en.json +++ b/server/config/brain/camera/questions.en.json @@ -1,6 +1,11 @@ [ { - "label": "camera.get-image-room", - "questions": ["Show me a view of the camera in %room%", "Display camera image in %room%"] + "label": "camera.get-image", + "questions": [ + "Show me a view of the camera in %room%", + "Display camera image in %room%", + "Show me a view of the camera %device%", + "Display camera image of %device%" + ] } ] diff --git a/server/config/brain/camera/questions.fr.json b/server/config/brain/camera/questions.fr.json index f8ad054e0d..2d5c77d12d 100644 --- a/server/config/brain/camera/questions.fr.json +++ b/server/config/brain/camera/questions.fr.json @@ -1,6 +1,13 @@ [ { - "label": "camera.get-image-room", - "questions": ["Montre moi la caméra du %room%", "Montre moi le %room%", "Montre moi la caméra de la %room%"] + "label": "camera.get-image", + "questions": [ + "Montre moi la caméra du %room%", + "Montre moi le %room%", + "Montre moi la caméra de la %room%", + "Montre moi %device%", + "Montre moi la caméra %device%", + "Montre moi %device%" + ] } ] diff --git a/server/lib/brain/index.js b/server/lib/brain/index.js index 288771fbd9..77c87b329e 100644 --- a/server/lib/brain/index.js +++ b/server/lib/brain/index.js @@ -19,6 +19,7 @@ const Brain = function Brain() { this.namedEntities = { room: new Map(), scene: new Map(), + device: new Map(), }; }; diff --git a/server/lib/device/camera/camera.command.js b/server/lib/device/camera/camera.command.js index 468046e215..d21a9bcce1 100644 --- a/server/lib/device/camera/camera.command.js +++ b/server/lib/device/camera/camera.command.js @@ -10,19 +10,27 @@ const { NotFoundError } = require('../../../utils/coreErrors'); * light.command(message, classification, context); */ async function command(message, classification, context) { - let cameraImage; + const cameraImages = []; + const roomEntity = classification.entities.find((entity) => entity.entity === 'room'); + const deviceEntity = classification.entities.find((entity) => entity.entity === 'device'); + try { switch (classification.intent) { - case 'camera.get-image-room': - if (!roomEntity) { + case 'camera.get-image': + if (roomEntity) { + cameraImages.push(...(await this.getImagesInRoom(roomEntity.option))); + } else if (deviceEntity) { + cameraImages.push(await this.getImage(deviceEntity.option)); + } else { throw new NotFoundError('Room not found'); } - cameraImage = await this.getImageInRoom(roomEntity.option); - if (cameraImage) { - this.messageManager.replyByIntent(message, 'camera.get-image-room.success', context, cameraImage); + if (cameraImages.length) { + cameraImages.forEach((cameraImage) => { + this.messageManager.replyByIntent(message, 'camera.get-image.success', context, cameraImage); + }); } else { - this.messageManager.replyByIntent(message, 'camera.get-image-room.no-image-found', context); + this.messageManager.replyByIntent(message, 'camera.get-image.no-image-found', context); } break; default: @@ -30,7 +38,7 @@ async function command(message, classification, context) { } } catch (e) { logger.debug(e); - this.messageManager.replyByIntent(message, 'camera.get-image-room.fail', context); + this.messageManager.replyByIntent(message, 'camera.get-image.fail', context); } return null; } diff --git a/server/lib/device/camera/camera.getImageInRoom.js b/server/lib/device/camera/camera.getImagesInRoom.js similarity index 75% rename from server/lib/device/camera/camera.getImageInRoom.js rename to server/lib/device/camera/camera.getImagesInRoom.js index 8e367fc0ed..f4b3b5f83d 100644 --- a/server/lib/device/camera/camera.getImageInRoom.js +++ b/server/lib/device/camera/camera.getImagesInRoom.js @@ -5,11 +5,11 @@ const { DEVICE_FEATURE_CATEGORIES } = require('../../../utils/constants'); /** * @description Get image in room. * @param {string} roomId - Id of the room. - * @returns {Promise} Resolve with the image. + * @returns {Promise} Resolve array with images. * @example - * getImageInRoom('f0dea887-d14f-4344-a57b-795c16e0abda'); + * getImagesInRoom('f0dea887-d14f-4344-a57b-795c16e0abda'); */ -async function getImageInRoom(roomId) { +async function getImagesInRoom(roomId) { const oneHourAgo = new Date(new Date().getTime() - 1 * 60 * 60 * 1000); const deviceFeatures = await db.DeviceFeature.findAll({ attributes: ['last_value_string'], @@ -34,13 +34,9 @@ async function getImageInRoom(roomId) { }, }); - if (deviceFeatures.length === 0) { - return null; - } - - return deviceFeatures[0].last_value_string; + return deviceFeatures.map((deviceFeature) => deviceFeature.last_value_string); } module.exports = { - getImageInRoom, + getImagesInRoom, }; diff --git a/server/lib/device/camera/index.js b/server/lib/device/camera/index.js index 644a2cdbf6..1a31dffc4d 100644 --- a/server/lib/device/camera/index.js +++ b/server/lib/device/camera/index.js @@ -2,7 +2,7 @@ const { command } = require('./camera.command'); const { setImage } = require('./camera.setImage'); const { getImage } = require('./camera.getImage'); const { get } = require('./camera.get'); -const { getImageInRoom } = require('./camera.getImageInRoom'); +const { getImagesInRoom } = require('./camera.getImagesInRoom'); const { INTENTS } = require('../../../utils/constants'); const { getLiveImage } = require('./camera.getLiveImage'); @@ -12,14 +12,14 @@ const Camera = function Camera(stateManager, messageManager, eventManager, servi this.eventManager = eventManager; this.serviceManager = serviceManager; this.deviceManager = deviceManager; - this.eventManager.on(INTENTS.CAMERA.GET_IMAGE_ROOM, this.command.bind(this)); + this.eventManager.on(INTENTS.CAMERA.GET_IMAGE, this.command.bind(this)); }; Camera.prototype.command = command; Camera.prototype.setImage = setImage; Camera.prototype.getImage = getImage; Camera.prototype.get = get; -Camera.prototype.getImageInRoom = getImageInRoom; +Camera.prototype.getImagesInRoom = getImagesInRoom; Camera.prototype.getLiveImage = getLiveImage; module.exports = Camera; diff --git a/server/lib/device/device.create.js b/server/lib/device/device.create.js index 5391a4a124..ae412c0a0a 100644 --- a/server/lib/device/device.create.js +++ b/server/lib/device/device.create.js @@ -82,6 +82,8 @@ async function create(device) { if (deviceInDb === null) { deviceInDb = await db.Device.create(device, { transaction }); } else { + this.brain.removeNamedEntity('device', deviceInDb.identifier, deviceInDb.name); + actionEvent = EVENTS.DEVICE.UPDATE; oldPollFrequency = deviceInDb.poll_frequency; @@ -107,6 +109,8 @@ async function create(device) { deviceToReturn.features = deviceToReturn.features || []; deviceToReturn.params = deviceToReturn.params || []; + this.brain.addNamedEntity('device', deviceToReturn.selector, deviceToReturn.name); + // if we need to create features const newFeatures = await Promise.map(features, async (feature) => { // if the device feature already exist diff --git a/server/lib/device/device.init.js b/server/lib/device/device.init.js index dca3f06761..c4a113e8d4 100644 --- a/server/lib/device/device.init.js +++ b/server/lib/device/device.init.js @@ -35,6 +35,7 @@ async function init(startDeviceStateAggregate = true) { const plainDevices = devices.map((device) => { const plainDevice = device.get({ plain: true }); this.add(plainDevice); + this.brain.addNamedEntity('device', plainDevice.selector, plainDevice.name); return plainDevice; }); if (startDeviceStateAggregate) { diff --git a/server/lib/device/index.js b/server/lib/device/index.js index 09c5dd44d5..ab8faf2bc3 100644 --- a/server/lib/device/index.js +++ b/server/lib/device/index.js @@ -43,6 +43,7 @@ const DeviceManager = function DeviceManager( roomManager, variable, job, + brain, ) { this.eventManager = eventManager; this.messageManager = messageManager; @@ -51,6 +52,7 @@ const DeviceManager = function DeviceManager( this.roomManager = roomManager; this.variable = variable; this.job = job; + this.brain = brain; this.STATES_TO_PURGE_PER_DEVICE_FEATURE_CLEAN_BATCH = 1000; this.WAIT_TIME_BETWEEN_DEVICE_FEATURE_CLEAN_BATCH = 100; diff --git a/server/lib/gateway/gateway.forwardMessageToOpenAI.js b/server/lib/gateway/gateway.forwardMessageToOpenAI.js index b743a18e12..c97419d2ab 100644 --- a/server/lib/gateway/gateway.forwardMessageToOpenAI.js +++ b/server/lib/gateway/gateway.forwardMessageToOpenAI.js @@ -1,7 +1,7 @@ const { Error429 } = require('../../utils/httpErrors'); const intentTranslation = { - SHOW_CAMERA: 'camera.get-image-room', + SHOW_CAMERA: 'camera.get-image', TURN_ON: 'light.turn-on', TURN_OFF: 'light.turn-off', GET_TEMPERATURE: 'temperature-sensor.get-in-room', @@ -44,6 +44,12 @@ async function forwardMessageToOpenAI({ message, previousQuestions, context }) { classification.entities = [{ entity: 'scene', option: sceneSelector, sourceText: response.scene }]; } + // add device entity + if (response.device) { + const deviceSelector = this.brain.getEntityIdByName('device', response.device); + classification.entities = [{ entity: 'device', option: deviceSelector, sourceText: response.device }]; + } + classification.intent = intentTranslation[response.type]; // Reply with OpenAI response diff --git a/server/lib/index.js b/server/lib/index.js index 98cb4f9de7..dac37bd763 100644 --- a/server/lib/index.js +++ b/server/lib/index.js @@ -66,7 +66,7 @@ function Gladys(params = {}) { const message = new MessageHandler(event, brain, service, stateManager, variable); const user = new User(session, stateManager, variable); const location = new Location(user, event); - const device = new Device(event, message, stateManager, service, room, variable, job); + const device = new Device(event, message, stateManager, service, room, variable, job, brain); const calendar = new Calendar(service); const scheduler = new Scheduler(event); const weather = new Weather(service, event, message, house); diff --git a/server/test/lib/device/camera/camera.command.test.js b/server/test/lib/device/camera/camera.command.test.js index 392b639b52..d5967a42bd 100644 --- a/server/test/lib/device/camera/camera.command.test.js +++ b/server/test/lib/device/camera/camera.command.test.js @@ -3,6 +3,7 @@ const { assert, fake } = require('sinon'); const Device = require('../../../../lib/device'); const StateManager = require('../../../../lib/state'); const Job = require('../../../../lib/job'); +const { DEVICE_FEATURE_CATEGORIES, DEVICE_FEATURE_TYPES } = require('../../../../utils/constants'); const event = new EventEmitter(); @@ -20,14 +21,14 @@ const RANDOM_IMAGE = 'image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg=='; describe('Camera.command', () => { - it('should respond with image from camera', async () => { + it('should respond with image from camera of room', async () => { const stateManager = new StateManager(event); const deviceManager = new Device(event, messageManager, stateManager, {}, {}, {}, job); const context = {}; await deviceManager.camera.command( message, { - intent: 'camera.get-image-room', + intent: 'camera.get-image', entities: [ { start: 25, @@ -45,7 +46,44 @@ describe('Camera.command', () => { }, context, ); - assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image-room.success', context, RANDOM_IMAGE); + assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image.success', context, RANDOM_IMAGE); + }); + it('should respond with image from camera', async () => { + const stateManager = new StateManager(event); + stateManager.setState('device', 'camera-1', { + features: [ + { + category: DEVICE_FEATURE_CATEGORIES.CAMERA, + type: DEVICE_FEATURE_TYPES.CAMERA.IMAGE, + last_value_changed: new Date().toISOString(), + last_value_string: RANDOM_IMAGE, + }, + ], + }); + const deviceManager = new Device(event, messageManager, stateManager, {}, {}, {}, job); + const context = {}; + await deviceManager.camera.command( + message, + { + intent: 'camera.get-image', + entities: [ + { + start: 25, + end: 31, + len: 7, + levenshtein: 0, + accuracy: 1, + entity: 'device', + type: 'enum', + option: 'camera-1', + sourceText: 'camera-1', + utteranceText: 'camera-1', + }, + ], + }, + context, + ); + assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image.success', context, RANDOM_IMAGE); }); it('should respond camera not found', async () => { const stateManager = new StateManager(event); @@ -54,7 +92,7 @@ describe('Camera.command', () => { await deviceManager.camera.command( message, { - intent: 'camera.get-image-room', + intent: 'camera.get-image', entities: [ { start: 25, @@ -72,7 +110,7 @@ describe('Camera.command', () => { }, context, ); - assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image-room.no-image-found', context); + assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image.no-image-found', context); }); it('should respond camera not found', async () => { const stateManager = new StateManager(event); @@ -81,11 +119,11 @@ describe('Camera.command', () => { await deviceManager.camera.command( message, { - intent: 'camera.get-image-room', + intent: 'camera.get-image', entities: [], }, context, ); - assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image-room.no-image-found', context); + assert.calledWith(messageManager.replyByIntent, message, 'camera.get-image.no-image-found', context); }); }); diff --git a/server/test/lib/device/camera/camera.getImageInRoom.test.js b/server/test/lib/device/camera/camera.getImageInRoom.test.js index 7579ffdcde..3a35c920cd 100644 --- a/server/test/lib/device/camera/camera.getImageInRoom.test.js +++ b/server/test/lib/device/camera/camera.getImageInRoom.test.js @@ -10,7 +10,7 @@ const job = new Job(event); const RANDOM_IMAGE = 'image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg=='; -describe('Camera.getImageInRoom', () => { +describe('Camera.getImagesInRoom', () => { it('should return image', async () => { const stateManager = new StateManager(event); const deviceManager = new Device(event, {}, stateManager, {}, {}, {}, job); @@ -26,7 +26,7 @@ describe('Camera.getImageInRoom', () => { ], }); await deviceManager.camera.setImage('test-camera', RANDOM_IMAGE); - const cameraImage = await deviceManager.camera.getImageInRoom('2398c689-8b47-43cc-ad32-e98d9be098b5'); - expect(cameraImage).to.equal(RANDOM_IMAGE); + const cameraImage = await deviceManager.camera.getImagesInRoom('2398c689-8b47-43cc-ad32-e98d9be098b5'); + expect(cameraImage[0]).to.equal(RANDOM_IMAGE); }); }); diff --git a/server/test/lib/device/device.create.test.js b/server/test/lib/device/device.create.test.js index 804e9c5ac8..f96531cd16 100644 --- a/server/test/lib/device/device.create.test.js +++ b/server/test/lib/device/device.create.test.js @@ -12,11 +12,16 @@ const db = require('../../../models'); const event = new EventEmitter(); const job = new Job(event); +const brain = { + addNamedEntity: fake.returns(null), + removeNamedEntity: fake.returns(null), +}; + describe('Device', () => { it('should create device alone', async () => { const stateManager = new StateManager(event); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); const newDevice = await device.create({ service_id: 'a810b8db-6d04-4697-bed3-c4b72c996279', name: 'Philips Hue 1', @@ -45,7 +50,7 @@ describe('Device', () => { ], }); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); const newDevice = await device.create({ id: '7f85c2f8-86cc-4600-84db-6c074dadb4e8', name: 'RENAMED_DEVICE', @@ -79,7 +84,7 @@ describe('Device', () => { it('should update device which already exist, update a feature and a param', async () => { const stateManager = new StateManager(event); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); const newDevice = await device.create({ id: '7f85c2f8-86cc-4600-84db-6c074dadb4e8', name: 'RENAMED_DEVICE', @@ -168,7 +173,7 @@ describe('Device', () => { ], }); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); await device.create({ id: '7f85c2f8-86cc-4600-84db-6c074dadb4e8', name: 'RENAMED_DEVICE', @@ -212,7 +217,7 @@ describe('Device', () => { ], }); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); const newDevice = await device.create({ id: '7f85c2f8-86cc-4600-84db-6c074dadb4e8', name: 'RENAMED_DEVICE', @@ -234,7 +239,7 @@ describe('Device', () => { it('should create device, one feature and one param', async () => { const stateManager = new StateManager(event); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); const newDevice = await device.create({ service_id: 'a810b8db-6d04-4697-bed3-c4b72c996279', name: 'Philips Hue 1', @@ -268,7 +273,7 @@ describe('Device', () => { params: [], }); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); await device.create({ id: 'f3525782-f513-4068-9f64-f3429756f99d', name: 'RENAMED_DEVICE', @@ -335,7 +340,7 @@ describe('Device', () => { params: [], }); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); await device.create({ id: 'f3525782-f513-4068-9f64-f3429756f99d', name: 'RENAMED_DEVICE', @@ -402,7 +407,7 @@ describe('Device', () => { params: [], }); const serviceManager = new ServiceManager({}, stateManager); - const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(event, {}, stateManager, serviceManager, {}, {}, job, brain); await device.create({ id: 'f3525782-f513-4068-9f64-f3429756f99d', name: 'RENAMED_DEVICE', @@ -467,7 +472,7 @@ describe('Device', () => { emit: fake.returns(null), on: fake.returns(null), }; - const device = new Device(fakeEvent, {}, stateManager, serviceManager, {}, {}, job); + const device = new Device(fakeEvent, {}, stateManager, serviceManager, {}, {}, job, brain); await db.DeviceFeatureState.create({ device_feature_id: 'ca91dfdf-55b2-4cf8-a58b-99c0fbf6f5e4', value: 10, diff --git a/server/test/lib/device/device.init.test.js b/server/test/lib/device/device.init.test.js index 06f5725570..7f8595e259 100644 --- a/server/test/lib/device/device.init.test.js +++ b/server/test/lib/device/device.init.test.js @@ -9,12 +9,16 @@ const event = { on: fake.returns(null), }; +const brain = { + addNamedEntity: fake.returns(null), +}; + describe('Device.init', () => { it('should init device', async () => { const stateManager = new StateManager(event); const service = {}; const job = new Job(event); - const device = new Device(event, {}, stateManager, service, {}, {}, job); + const device = new Device(event, {}, stateManager, service, {}, {}, job, brain); await device.init(true); assert.calledWith(event.emit, EVENTS.DEVICE.CALCULATE_HOURLY_AGGREGATE); diff --git a/server/test/lib/gateway/gateway.forwardMessageToOpenAI.test.js b/server/test/lib/gateway/gateway.forwardMessageToOpenAI.test.js index 676fec74b8..7ce2e75429 100644 --- a/server/test/lib/gateway/gateway.forwardMessageToOpenAI.test.js +++ b/server/test/lib/gateway/gateway.forwardMessageToOpenAI.test.js @@ -137,6 +137,28 @@ describe('gateway.forwardMessageToOpenAI', () => { intent: 'scene.start', }); }); + + it('should display camera from OpenAI', async () => { + gateway.gladysGatewayClient.openAIAsk = fake.resolves({ + type: 'SHOW_CAMERA', + answer: 'Voilà ce que je vois:', + room: null, + scene: null, + device: 'camera-1', + }); + const classification = await gateway.forwardMessageToOpenAI({ message, previousQuestions, context }); + expect(classification).to.deep.equal({ + entities: [ + { + entity: 'device', + option: '14a8ad23-78fa-45e4-8583-f5452792818d', + sourceText: 'camera-1', + }, + ], + intent: 'camera.get-image', + }); + }); + it('should send too many requests message', async () => { gateway.gladysGatewayClient.openAIAsk = fake.rejects(new Error429()); await gateway.forwardMessageToOpenAI({ message, previousQuestions, context }); diff --git a/server/test/services/philips-hue/light/light.configureBridge.test.js b/server/test/services/philips-hue/light/light.configureBridge.test.js index 7a86640f51..59e60138b9 100644 --- a/server/test/services/philips-hue/light/light.configureBridge.test.js +++ b/server/test/services/philips-hue/light/light.configureBridge.test.js @@ -1,4 +1,5 @@ const { assert, expect } = require('chai'); +const { fake } = require('sinon'); const EventEmitter = require('events'); const proxyquire = require('proxyquire').noCallThru(); const { MockedPhilipsHueClient } = require('../mocks.test'); @@ -16,7 +17,10 @@ const event = new EventEmitter(); const stateManager = new StateManager(event); const job = new Job(event); const serviceManager = new ServiceManager({}, stateManager); -const deviceManager = new DeviceManager(event, {}, stateManager, serviceManager, {}, {}, job); +const brain = { + addNamedEntity: fake.returns(null), +}; +const deviceManager = new DeviceManager(event, {}, stateManager, serviceManager, {}, {}, job, brain); const gladys = { device: deviceManager, diff --git a/server/utils/constants.js b/server/utils/constants.js index d58db5d0db..7ea7655260 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -365,7 +365,7 @@ const INTENTS = { DAY: 'intent.weather.day', }, CAMERA: { - GET_IMAGE_ROOM: 'intent.camera.get-image-room', + GET_IMAGE: 'intent.camera.get-image', }, SCENE: { START: 'intent.scene.start',