Vote boxes

After a trip to Ikea they had simple voting system near the exits of the store. That got us to think so we made a box that we would place at the exit of session to allow guests to rate the session. We simply ask if the user “loved it” , “was neutral about it” or “hated it”

For the hardware we use esp8266 nodemcu running esphome much like the speaker lights. The vote boxes connects to the staff wifi and will report the votes using mqtt to node red. We count a love it as +1, neutral as 0 and hated as -1 to give us a final vote.

esphome:
  name: ballroomavote
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: 'x'
  password: 'x'
  manual_ip:
   static_ip: x.x.x.x
   gateway: x.x.x.x
   subnet: 255.255.255.0
# Enable logging
logger:
ota:
  password: 'x'
sensor:
  - platform: wifi_signal
    name: "balllroomAvote WiFi Signal Sensor"
    update_interval: 60s
switch:
  - platform: gpio
    pin: D2
    name: "vote LED"
    id: voteled

binary_sensor:
  - platform: gpio
    pin:
      number: D3
      mode: INPUT_PULLUP
    name: "pos  Button"
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - switch.toggle: voteled
        - delay: 2ms
        - switch.toggle: voteled
        - mqtt.publish:
             topic: vote/A
             payload: "pos"


  - platform: gpio
    pin:
      number: D6
      mode: INPUT_PULLUP
    name: "natural  Button"
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - switch.toggle: voteled
        - delay: 2ms
        - switch.toggle: voteled
        - mqtt.publish:
             topic: vote/A
             payload: "natural"


  - platform: gpio
    pin:
      number: D5
      mode: INPUT_PULLUP
    name: "neg  Button"
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - switch.toggle: voteled
        - delay: 2ms
        - switch.toggle: voteled
        - mqtt.publish:
             topic: vote/A
             payload: "neg"

mqtt:
  broker: x.x.x.x
  keepalive: 15s
  username: x.x.x.x
  password: x.x.x.x