Project

General

Profile

Actions

Bug #639

closed

iot.c code is all wrong

Added by Hammel over 5 years ago. Updated over 5 years ago.

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

100%

Estimated time:
Severity:
01 - Critical

Description

The original iot.c code in piboxd expected devices to send a bunch of data that piboxd would handle. But the new REST API doesn't need that. Instead it just needs to do the following:
  1. Check if the ipaddr of the requester is already registered.
    1. If so, return non-200 code
  2. If not registered then
    1. gen UUID
    2. build url back to device
    3. curl to the device URL

That's it. The rest of the processing goes through the REST API and nodejs. Much simpler than what I have in piboxd now, whose only job now is to handle multicast "pings" (re: finding each other) from Jarvis and IoT devices.


Related issues

Related to Sensors - Feature #610: Implement lightsw IoT deviceClosedHammel04 Mar 2018

Actions
Actions #1

Updated by Hammel over 5 years ago

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

This is done now, though I think I checked in the fixes against RM #610. I stripped the old code out because it tried to do things that actually belong to the imrest server. That reduced the iot.c code to just acking the multicast discovery requests.

Tested against the imlightsw code and works.

Committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF