User Tools

Site Tools


mqtt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mqtt [2018-10-10 21:46] – [Displays] cazagenmqtt [2024-02-14 08:03] (current) – [Lighting] simon
Line 18: Line 18:
 mosquitto_pub -h mqtt.hacklab -t 'dali/g1/preset/harmony' -n # send an empty message mosquitto_pub -h mqtt.hacklab -t 'dali/g1/preset/harmony' -n # send an empty message
 </code> </code>
 +
 +===== Devices =====
 +[[private:mqtt_devices|MQTT Smart devices login/Documentation]]
  
 ===== Sensors ===== ===== Sensors =====
Line 88: Line 91:
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
-| environment/g1/extractor | 0=off, 1=on | Note that the radio link for this is patchy so may not work immediatelyDo not send multiple events to compensate as this should be done by the driver script instead. |+| environment/g1/extractor | 0=off, 1=on | [[https://github.com/edinburghhacklab/circuitpython_remote_relay|Controlled]] by {{:23-10-24_21-50-40_2656.jpg?linkonly|ESP32-S2 relay board}}. Debugging feedback availble on //debug/esp-487f307d5dad// |
 | environment/g1/heating | 0-30, off | Send a numeric value to set a target temperature for G1, off to turn the heating off | | environment/g1/heating | 0-30, off | Send a numeric value to set a target temperature for G1, off to turn the heating off |
 +| environment/g8/extractor/relay/0 | 0=off, 1=on | Wall extractor in workshop |
 +| environment/g14/heating | 0-30, off | Send a numeric value to set a target temperature for G14, off to turn the heating off |
 +| espurna/g1-ceiling-air-purifier/relay/0/set | 0=off, 1=on | G1 Ceiling Air purifier (Smart Air Sqair) |
  
 ===== Lighting ===== ===== Lighting =====
Line 101: Line 107:
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
 | dali/g1/preset/<preset> | (none) | preset=off/dim/bright/corners/movie/comfort/presentation/harmony/random or preset=<number> | | dali/g1/preset/<preset> | (none) | preset=off/dim/bright/corners/movie/comfort/presentation/harmony/random or preset=<number> |
-| dali/g1/set/<light-id> | 0-254 | light-id=0-17 or light-id=all | +| dali/g1/set/<light-id> | [[g1_lighting#dali_light_level_presets|0-254]] | light-id=[[g1_lighting#dali_addresses|0-17]], light-id=all, or light-id=social (just the end of the room with the kitchen) 
-| dali/g1/script | json-formatted script | |+| dali/g1/script | json-formatted script | <code>[["set", 5,0], ["delay",2000], ["set_all",254]]</code> will set light number 5 to zero, wait for 2 seconds, then set everything to 254|
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
 | display/g1/blacklights/relay/0/set | 0=off 1=on | Switch the G1 blacklight on/off | | display/g1/blacklights/relay/0/set | 0=off 1=on | Switch the G1 blacklight on/off |
 +| display/g1/big_fricking_bulb | 0=off 1=on 2=toggle | Switch the giant 5W LED bulb on/off |
  
 ===== Displays ===== ===== Displays =====
 +
 +==== Ferrograph Rhapsody LED Display ====
  
 The [[rhapsodydisplay|Ferrograph Rhapsody LED Display]] is configured to display a list of message chunks on it's main scrolling area. Use the //submessage// topic below to add a message to the scroller. Messages time out after 10 minutes, so resend the message every 1-5 minutes using the same //id//. The [[rhapsodydisplay|Ferrograph Rhapsody LED Display]] is configured to display a list of message chunks on it's main scrolling area. Use the //submessage// topic below to add a message to the scroller. Messages time out after 10 minutes, so resend the message every 1-5 minutes using the same //id//.
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
-| display/rhapsody/submessage | {"id": "<uniq-ref>", "message": "text..."} | Optional attributes: colour: red/yellow/green, priority: 1-100 (low values will be shown first, default=10). Max length 169 chars, 170+ crashes the script. |+| display/rhapsody/submessage | {"id": "<uniq-ref>", "message": "text..."} | Optional attributes: colour: red/yellow/green/multi, priority: 1-100 (low values will be shown first, default=10). Max length 169 chars, 170+ crashes the script (length limit is lower for multi-colour). |
 | display/rhapsody/raw | raw data | Send raw messages to Rhapsody display (not recommended) | | display/rhapsody/raw | raw data | Send raw messages to Rhapsody display (not recommended) |
 | display/rhapsody/reset | | Reset the Rhapsody display (only required if the display is corrupted) | | display/rhapsody/reset | | Reset the Rhapsody display (only required if the display is corrupted) |
  
-//Doorbot// is the wooden box by the door in G1, with two buttons and a 16x2 LCD:+==== Doorbot ==== 
 + 
 +The wooden box by the door in G1, with two buttons and a 16x2 LCD:
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
Line 130: Line 141:
 | display/doorbot/buttons/green/state | up, down | Sent by device, do not write | | display/doorbot/buttons/green/state | up, down | Sent by device, do not write |
  
-G1 LED strip:+==== G1 LED strip (the one that goes around the edge of the room) ====
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
Line 140: Line 151:
 The LEDs can also be addressed in real time via a UDP network protocol. See [[https://gist.github.com/timhawes/910ee6b5bf9c36833235b0e075f01cbf|this example]]. The LEDs can also be addressed in real time via a UDP network protocol. See [[https://gist.github.com/timhawes/910ee6b5bf9c36833235b0e075f01cbf|this example]].
  
-G1 Warning Turret:+==== G1 LED String ==== 
 + 
 +The one that goes across the ceiling in the middle of the room. 
 + 
 +These are running the WLED firmware, which is ridiculously comprehensive and can talk to basically everything. However, MQTT seems to have been disabled.  
 + 
 +There is a web interface at http://wled-ceiling-string.hacklab. 
 + 
 +<del>Full MQTT docs at https://github.com/Aircoookie/WLED/wiki/MQTT 
 + 
 +^ Topic ^ Payload ^ Notes ^ 
 +| display/g1/wled/$STRIP_NAME | 0-255, "ON", "OFF", or "T" |  "T" means toggle | 
 +| display/g1/wled/$STRIP_NAME/col | #RRGGBB | | 
 +|||STRIP_NAME can be replaced with "dangle" for the strip dangling in G1 or "all" for every strip running this firmware in G1|</del> 
 + 
 +==== G1 Warning Turret ====
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
Line 147: Line 173:
 | display/g1/turret/green| 0=off 1=on | Turns on the green band on the Turret light | | display/g1/turret/green| 0=off 1=on | Turns on the green band on the Turret light |
  
-NEC Digital Signage Display+==== NEC Digital Signage Display ====
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
-<del>display/nec/brightness</del> <del>[0-100]</del> <del>changes the brightness of the display to //n// percent</del> +| display/nec/image Image URL Display an image on the screen 
-| CURRENTLY BORKED ||| + 
-Shorekarn scrolling display (in G1 window)+ 
 +==== Shorekarn scrolling display (in G1 window) ====
  
 ^ Topic ^ Payload ^ Notes ^ ^ Topic ^ Payload ^ Notes ^
-| display/shorekarn/message | text | |+<del>display/shorekarn/message</del> <del>text</del> 
 +| Not currently set up ||| 
 + 
 +==== New Window display ==== 
 + 
 +^ Topic ^ Payload ^ Notes ^ 
 +| display/g1/windowled/text | text | seems to slow down render with large text| 
 +| display/g1/windowled/colour | r,g,b | comma separated string of red, green, and blue (0-255) Takes effect on next text change |   
 + 
 +==== G1 Projector ==== 
 + 
 +^ Topic ^ Payload ^ Notes ^ 
 +| display/g1/projector/on | empty | Turns on projector |  
 +| display/g1/projector/off | empty | Turns off projector |  
 +| display/g1/projector/channel | text | Changes channel of radio to one of hdmi, vga, or svideo |  
 + 
 +==== Chart ==== 
 + 
 +The blinky chart of the West of Scotland in G1. 
 + 
 +Note: Lighting mode may be overriden by hardware nya nya switch. 
 + 
 +^ Topic ^ Payload ^ Notes ^ 
 +| display/chart/mode | rainbow, normal | Engage nya nya rainbow mode, or normal light colours / patterns. |
  
  
 ===== Access Control ===== ===== Access Control =====
 +
 +Code for this can be found on ehl-vm-things:/srv/docker/py3scripts/entrance-handler
 +
 +The door is opened by a small ESP8266 and a relay connected to the intercom phone under the IRC terminal in G1
  
 | access/entrance/request | | Button has been pressed at the entrance //read only// | | access/entrance/request | | Button has been pressed at the entrance //read only// |
Line 172: Line 226:
 | sound/kill | empty message | Kills all queued and/or playing sounds |  | sound/kill | empty message | Kills all queued and/or playing sounds | 
 | <del>sound/voice/change</del> | <del>voice name</del> | <del>Changes the voice to the one specified</del> | <del>sound/voice/change</del> | <del>voice name</del> | <del>Changes the voice to the one specified</del>
 +| sound/time-out | seconds | Kill all playing sounds and remain silent for N seconds |
  
 Replace [room] with one of g1, g2, g8, g11, or all. Room names can also be combined. e.g. "g1-g2-g8" Replace [room] with one of g1, g2, g8, g11, or all. Room names can also be combined. e.g. "g1-g2-g8"
  
 Sound effects get annoying **fast**. Don't say we didn't warn you. Sound effects get annoying **fast**. Don't say we didn't warn you.
 +
 +===== MQTT -> IR =====
 +
 +Cazagen recently add a toy wiimote to G1 that allows for MQTT -> IR.
 +
 +It has the following commands.
 +
 +^ Topic ^ Payload ^ Notes ^
 +| ir/g1/amp/channel | pi, hdmi, mordred, table, laserdisc | Changes channel on amp to the chosen payload |
 +| ir/g1/amp | volumeup, volumedown, mute, poweron, poweroff, powertoggle | Transmits the obvious command | 
 +| ir/g1/laserdisc | poweron, poweroff, powertoggle |
 +| ir/g1/raw | | not implemented |
 +| ir/g1/globalcache | | not implemented |
 +| ir/g1/... | | not implemented |
  
 ===== JeeNode Radios ===== ===== JeeNode Radios =====
Line 252: Line 321:
 There are 50 pixels on our tree, so 50 RGB values should be sent in each frame. There are 50 pixels on our tree, so 50 RGB values should be sent in each frame.
  
 +===== G1 Amp =====
 +
 +^ Topic ^ Payload ^ Notes ^
 +| sound/g1/amp/channel | channel_name | channel name, all caps e.g. HDMI1/AUDIO1. Some macros are stored such as pi/table | 
 +| sound/g1/amp/power | on/off | |
 +| sound/g1/amp/volume | up/down | currently this fades up/down the volume by 5dBm, this could be made to set the volume to a specific number, but that could go wrong... |
 ===== Misc ===== ===== Misc =====
  
Line 259: Line 334:
 ===== TODO ===== ===== TODO =====
  
-  * Network devices +<del>  * Network devices</del>\\ 
-  * Door and window status +<del>  * Door and window status</del>\\ 
-  * Shorekarn scrolling LED sign +<del>  * Shorekarn scrolling LED sign</del>\\ 
-  * IRC bot+<del>  * IRC bot</del>\\
  
mqtt.1539208006.txt.gz · Last modified: 2018-10-10 21:46 by cazagen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki