Labels

Sunday, August 30, 2020

IP Power Strip #02 - How the IP Power Strip will work in the network

I am looking to make the IP Power Strip as useful in my network as is possible.  I should be able to use the IP Power Strip outside of the normal turn on/off my HomeLab and extend it to things like control lights during Christmas and Halloween.  What I am doing is turning power on and off.  Throughout the year it makes sense that I would use the units in the HomeLab, but these units would also have a use elsewhere.  I am rather interested in integrating it with my HA-IOT network and use the MQTT server that already resides there.

For the Master container, I visualize the following:

  • it should be able to be "programmed" with control sequences to a certain point through MQTT messages
  • I should be able to issue different sets of controller sequences "programs" so that the IP Power Strip can be controlled independently depending on the context
  • I should be able to issue a list of IP Power Strip containers (IP addresses) to the Master container so that it knows the locations
  • I should be able to effect a controlled sequence when tasked by an MQTT message
  • I should be able to simply indicate a vacation mode and have the Master container do the rest
  • I should be able to poll the Master container to reveal the current status of the IP Power Strips and what they are controlling
  • The Master container should be able to respond to heartbeat messages in context

For the Slave container, I visualize the following:

  • I should be able to have the Slave container come up issuing heartbeat messages to the Master container to indicate the status
  • The slave container should be able to be controlled via MQTT messages for a single change or multiple changes
  • The slave container should be able to be controlled via MQTT messages to stop/start issuing heartbeat messages

For the InterfaceProxy container, I visualize the following:

  • This container is how we interface to the actual equipment, it is a proxy by reason that there may be other already built IP Power Strips, or power like systems that we want to integrate into the IP Power Strip system
  • The InterfaceProxy container should be controlled by a RESTful interface, with json coding
  • The only container that would interface would be the Slave container, on the other side is hardware
  • The InterfaceProxy should receive unique IDs and be able to respond to a request for number of "ports" as well as initial setup and current setup for the "ports".  Initial setup defines how the "ports" come up from a hot start
  • Notice that the InterfaceProxy can also serve as a test container which can be metered and check for correct sequences at the low end

For the Shutdown container, I visualize the following:

  • I should be able to have the Shutdown container come up issuing heartbeat messages to the Master container to indicate the status
  • The Shutdown container should be able to be controlled via MQTT messages to start a shutdown on the computer where it resides
  • The Shutdown container should be able to be controlled via MQTT messages to stop/start issuing heartbeat messages