Difference between revisions of "MQTT"

From Hackerspace ACKspace
Jump to: navigation, search
m (typo)
m (mention of custom firmware, add github project, small textual updates)
Line 4: Line 4:
 
|Members=xopr
 
|Members=xopr
 
|Description=Space  empty? Power off!
 
|Description=Space  empty? Power off!
 +
|GitHub=mqtt_spaceAPI
 
}}
 
}}
 
== synopsis ==
 
== synopsis ==
Line 10: Line 11:
 
The idea is to gradually add them to every power strip so we can:
 
The idea is to gradually add them to every power strip so we can:
 
# measure (over)current
 
# measure (over)current
# switch them off centrally if the space is closed
+
# switch them off centrally if the space is closed (or notify the user that they are still on).
  
It currently runs the famous [https://github.com/arendst/Sonoff-Tasmota/ Tasmota] firmware.
+
It currently runs a modified version of the famous [https://github.com/arendst/Sonoff-Tasmota/ Tasmota] firmware (the modification allows dangerous GPIO whist using the energy measurement).
  
 
'''NOTE''': the switch is built in a box with an external toggle switch. This switch has potentially 240v on its contacts so '''don't open it and touch the contacts when it is plugged in!'''
 
'''NOTE''': the switch is built in a box with an external toggle switch. This switch has potentially 240v on its contacts so '''don't open it and touch the contacts when it is plugged in!'''
 +
Also ''don't connect both serial and mains''; things will break.
  
You can toggle it via wifi on [http://h1r-2067.lan h1r-2067.lan] (subject to change)
+
You can toggle it via wifi on [http://h1r-2067.lan h1r-2067.lan] (subject to change), or by issuing a <code>mosquitto_pub -h &lt;mqtt_ip&gt; -t "cmnd/h1r/POWER" -m "TOGGLE"</code>
  
 
== todo ==
 
== todo ==
* add custom firmware to the Pow versions so that an external switch can be used in conjunction with the power measurement
+
* add MQTT [[server]] that the switches can connect to, together with the  [[space state]]
* add MQTT server that the switches can connect to, together with the  [[space state]]
+
* make MQTT connect to [[spaceAPI]] and [[Power]] page
* make MQTT connect to [[spaceAPI]] and [[Power]] page  
+
* add MOAR sensors
* add MOAR sonoffs
+
* MOAR sonoffs

Revision as of 10:55, 22 January 2019

Project: MQTT
Featured: No
State Active
Members xopr
GitHub mqtt spaceAPI
Description Space empty? Power off!
Picture
No project picture! Fill in form Picture or Upload a jpeg here

synopsis

There is a sonoff Pow wifi switch in the space, connected to a powerstrip near the soldering table (in a brown plastic case with a toggle switch on top of it).

The idea is to gradually add them to every power strip so we can:

  1. measure (over)current
  2. switch them off centrally if the space is closed (or notify the user that they are still on).

It currently runs a modified version of the famous Tasmota firmware (the modification allows dangerous GPIO whist using the energy measurement).

NOTE: the switch is built in a box with an external toggle switch. This switch has potentially 240v on its contacts so don't open it and touch the contacts when it is plugged in! Also don't connect both serial and mains; things will break.

You can toggle it via wifi on h1r-2067.lan (subject to change), or by issuing a mosquitto_pub -h <mqtt_ip> -t "cmnd/h1r/POWER" -m "TOGGLE"

todo

  • add MQTT server that the switches can connect to, together with the space state
  • make MQTT connect to spaceAPI and Power page
  • add MOAR sensors
  • MOAR sonoffs