Project

General

Profile

Actions

Bug #672

closed

deviceGet() needs to validate request by decoding it

Added by Hammel about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Software
Target version:
Start date:
02 Sep 2018
Due date:
% Done:

100%

Estimated time:
Severity:
02 - High

Description

Currently the deviceGet() function in imlightsw doesn't validate the request by decoding it, to make sure the sender is actually the monitor it's paired to.

This requires adding a decodeMessage() alternative to encodeMessage(), as imlightsw has not decoded any messages from the monitor yet.


Related issues

Related to Iron Man - Feature #669: Add cron job to retrieve device state in monitor.ClosedHammel23 Aug 2018

Actions
Actions #1

Updated by Hammel about 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

This is getting very close. The monitor now supports the /query/devices API and sends POST /query/device to each sensor to get updated information. And the sensor gets/decrypts the request and looks to be sending back a JSON response packet with it's current state (but just state right now). However, this message does not appear to be showing up at the monitor as a response to it's POST request. I'm probably either not really sending it or it's not actually being extracted on the monitor side from the response packet.

Actions #2

Updated by Hammel about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Everything is working here now. A query to a device causes the device to send back it's current configuration data which the monitor simply uses to replace the old data.

Verified on hardware. All code committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF