Category:IoT

From i3Detroit
(Redirected from IoT)
Jump to: navigation, search

We have begun an initiative to simplify the management of i3's space and infrastructure. The first step is bringing as much of the shut down procedure into a single button as possible. As it evolves things like networked thermostats that behave how we want, building out the new half of the space without having to wire lightswitches everywhere, putting the EV charger on the network for logging, and implementing SpaceAPI or SpaceDirectory all become possible (maybe even a version of RFID entry system). This page is made up of content moved from the #home-automation channel in slack.

IoT kiosk screen w/ partial shutdown list


Firmware explanation

Most of the devices we have installed run a version of Tasmota that has been either had the settings tweaked before uploading or had a pin map added to the available options. Remember to bounce the power between flashing over serial and the first OTA attempt. Some of them are our own code creation using a template written by Mark Furland and mimic the MQTT format of the Tasmota devices for consistency. The repository is here: [1]

List of Equipment

to get the IP address of each device, run this command

sudo nmap -sP 10.13.0.0-255 | grep -v "Host" | tail -n +3 | tr '\n' ' ' | sed 's|Nmap|\nNmap|g' | grep "MAC Address" | perl -pe 's/.*report for (?:([^ ]*) \()?((?:[0-9]{1,3}\.?){4})\)? MAC Address: ([A-Z0-9:]*).*/$1 $2 $3/'

Has individual page

Equipment IP MAC Hostname Authorization Owner(s) Status
Atmosphere sensors 10.13.107.59, 10.13.107.134, 10.13.107.222 68:C6:3A:D6:3A:92, 68:C6:3A:D6:3D:9A, B4:E6:2D:3B:18:78 commons-ground-sensor-cluster, commons-ceiling-sensor-cluster, fablab-sensor-cluster No i3Detroit Usable but repair needed
16 segment mqtt display 10.13.107.123 18:FE:34:99:B0:49 16-segment-display No i3Detroit Running
433 RF bridge 10.13.107.36 60:01:94:8F:34:3D infrastructure-433-rf-reciever No i3Detroit Running
Air Compressor 10.13.107.45, 10.13.107.195 2C:3A:E8:1D:2B:50, 5c:cf:7f:bd:72:ae air-compressor.i3detroit.local, infrastructure-compressor-valve No i3Detroit Running
Air compressor request buttons 10.13.107.34, 10.13.107.142, 10.13.107.205 ec:fa:bc:0e:ab:d4, 2c:3a:e8:32:8c:d6, ec:fa:bc:0e:ab:8a air-compressor-request-ID.i3detroit.local No i3Detroit Running
CNC light 10.13.107.75 5C:CF:7F:42:91:92 cnc-light No i3Detroit Running
CNC vent 10.13.107.132 2C:3A:E8:08:03:AF cnc-vent No i3Detroit Running
Chandeliers 10.13.107.74, 10.13.107.27 5C:CF:7F:1B:D4:60, 5C:CF:7F:1C:37:3E accent-chandelier-ID No Mike Fink Running
Classroom sign 10.13.107.73 5C:CF:7F:B4:DA:79 classroom-sign No i3Detroit Running
Commons Ceiling Fans 10.13.107.108 60:01:94:86:C8:3D commons/east-ceiling-fans-2109 No i3Detroit Running
Commons Light Switches 10.13.107.39, 10.13.107.225 18:FE:34:FA:3E:1F, 5C:CF:7F:FA:46:A8 commons-light-switches No i3Detroit Running
Disco Ball 10.13.107.131 2C:3A:E8:07:AC:86 discoBall-3206 No i3Detroit Running
Disco Spotlights 10.13.107.236 5c:cf:7f:bb:06:c2 commons-accent-disco-spotlights No i3Detroit Running
Disco Button 10.13.107.25 5C:CF:7F:FA:42:D6 disco-button No i3Detroit Running
Fab Lab Vent Button 10.13.107.71 18:fe:34:d2:33:85 fablab-control-buttons No i3Detroit Running
Fab Lab Vent Fan 10.13.107.110 5C:CF:7F:1B:CF:DC fablab-vent No i3Detroit Running
Fablab Chiller 10.13.107.77 5C:CF:7F:92:2C:CB fablab-chiller No i3Detroit Running
Glass door 10.13.107.92 5C:CF:7F:04:E3:DD glass-door-reporter No i3Detroit Running
IoT Kiosk No i3Detroit Running
LED Matrix Display 10.13.107.69 5C:CF:7F:0C:28:C8 led-matrix-controller No i3Detroit Running
Large bathroom fan 10.13.107.116 60:01:94:86:C9:FC large bathroom vent fan No i3Detroit Running
Large bathroom light 10.13.107.183 60:01:94:86:BD:3D large bathroom light No i3Detroit Running
Large bathroom motion sensor 10.13.107.95 EC:FA:BC:0E:B6:D1 large-bathroom-motion-sensor No i3Detroit Running
Laser Zone Ceiling Fan 10.13.107.52 60:01:94:86:BB:C0 ceilingFan-7104 No i3Detroit Running
Laser Zone Vent Fan 10.13.107.121 5C:CF:7F:1C:42:64 laser-zone-vent-fan No i3Detroit Running
Lights See https://github.com/i3detroit/Automatic-IoT-module-programming/blob/master/tas.tsv many many No i3Detroit Running
Machine Shop Motion Sensor 10.13.107.241 5C:CF:7F:84:AE:34 machine-shop-motion-sensor.i3detroit.local No i3Detroit Running
Machine Shop Ceiling Fan 10.13.107.137 2C:3A:E8:07:B2:B6 machine-shop-ceiling-fan No i3Detroit Running
Machine Shop Light Switches 10.13.107.64,10.13.107.23 2C:3A:E8:1D:2A:26, 2C:3A:E8:1D:2B:3A machine-shop-switches-west.i3detroit.local, machine-shop-switches-south.i3detroit.local No i3Detroit Running
Media Lab Lights 10.13.107.196 60:01:94:86:7C:5B media-lab-lights.i3detroit.local No i3Detroit Running
Middle east light switches 10.13.107.76, 10.13.107.35 2C:3A:E8:1D:2A:32, 5C:CF:7F:FA:43:27 middle-east-light-switches-south, middle-east-light-switches-north No i3Detroit Running
Office Thermostat 10.13.107.38 5C:CF:7F:63:3C:24 office-thermostat No i3Detroit Running
OpenEVSE 10.13.107.80 2C:3A:E8:35:D9:7C ESP_35D97C No i3Detroit Running
Paint Box 10.13.107.199 5C:CF:7F:BD:86:A1 commons-paint-box No i3Detroit Running
Small bathroom motion sensor 10.13.107.155 EC:FA:BC:0E:A7:58 small-bathroom-motion-sensor No i3Detroit Running
South vent 10.13.107.12 5C:CF:7F:42:93:CF commons-south-vent No i3Detroit Running
Traffic Light 10.13.107.56 18:FE:34:FA:3C:8E commons-traffic-light No i3Detroit Running
Water Cooler - MOJO Denali 10.13.107.17 ec:fa:bc:0e:af:c2 water-cooler-flow-meter No i3Detroit Running
Weld Zone Light Button 10.13.107.152 18:FE:34:98:61:6B weld-light-button.i3detroit.local No i3Detroit Running
Mcclellan 10.13.0.26 08:00:27:7e:08:1e mcclellan Yes i3Detroit Running

Needs page written

  • laser cutters (POW)
  • bumblebee status lights 10.13.107.90
  • bumblebee timer 10.13.107.81
  • bumblebee chiller 10.13.107.114
  • wolverine status lights 10.13.107.246
  • wolverine timer 10.13.107.85
  • wolverine chiller 10.13.107.231
  • laser blast gate monitor 10.13.107.203
  • front door funnel 10.13.107.37
  • hallway light switches 10.13.107.167, 10.13.107.174
  • large bathroom vent fan 10.13.107.116
  • weld zone tank sensors 10.13.107.57
  • small bathroom light switch 10.13.107.79

Add Equipment Link

Equipment Page Form

MQTT Hierarchy

The hierarchy of our MQTT layout is mostly physical by design. It should be possible to publish/subscribe to more and more general sections of messages if you want to monitor different areas or control them. The <type> section came from Tasmota, previously we had wanted to put that at the end instead of the beginning which may have some MQTT benefits.

Right now the hierarchy we aspire to is:

   <infoType>/<location>/<course-zone>/
                                       <zone>/<item>/<modifier>
                                       <itemType>/<itemSubType>/<modifier>
  • <infoType> can be "cmnd", "tele", or "stat".
  • <location> is just "i3" for now but could encompass remote locations like people's houses or other hackerspaces.
  • <course-zone> is the coarse delineation of location, outside, inside, openhab
  • <zone> is the fine delineation of location, and could refer to areas that are physically important but not a zone as defined by i3's structure.
  • <item> is the name of one device that is being controlled, this should not be the same across two different pieces of hardware to avoid collisions.
  • <itemType> is type of item, like lights
  • <itemSubType> is the subtype of a type, like for lighs, emergency-lights, or for fans, ceiling-fans.
  • <modifier> is the command given, or the status being reported (examples include POWER, STATE, RESULT, display, delay).


MQTT Debugging Notes

  • To view the MQTT log, use mosquitto_sub -v -t "#" on Mcclellan or mosquitto_sub -h 10.13.0.22 -v -t '#' remotely.
    • The lines of form "tele/i3/inside/lights/015/STATE {"Time":...." are regular status pulls against the MQTT members, not command records.
  • MQTT log with timestamps: mosquitto_sub -v -t '#' | xargs -d$'\n' -L1 bash -c 'date "+%Y-%m-%d %T.%3N $0"'

Automation Software

HomeAssistant

Main Page:HomeAssistant

Home Assistant is a home automation hub for connecting many IoT devices together into one system controlled by a web GUI.

OpenHAB (out of date)

Main Page:OpenHab

We are no longer using OpenHAB, we have moved to HomeAssistant

OpenHab2 is a centralized method to manage multiple IoT devices from a Web GUI.

ToDo

Please contact Evan Allen or Mark Furland for details on any of these

All issues tracked here: https://github.com/i3detroit/custom-mqtt-programs/issues Moving to that in progress

Write up, not hardware

  • clean up wiki articles on all the things

Network in general

  • Expand iot subnet, need to decide on new IP scheme. 10.13.107.0/24 is current IOT, 10.13.0.0/24 is current user. 107 is vlan id.
  • Static leases for IoT items so the IP addresses can be filled out in the wiki
  • Configure the router so the map pi can talk to the main network from the iot network

Misc.

Dash buttons 24-28 are set up but don't have things attached yet.

HomeAsistant

https://github.com/i3detroit/homeassistant-config/issues