/bcf-usb-gateway

Firmware for BigClown USB Gateway

Primary LanguageCMIT LicenseMIT

BigClown Logo

Firmware for BigClown USB Gateway

Travis Release License Twitter

This repository contains firmware for BigClown USB Gateway.

Firmware Programming

dfu-util -s 0x08000000:leave -d 0483:df11 -a 0 -D firmware.bin

More information about dfu here

Firmware for node is here https://github.com/bigclownlabs/bcp-generic-node

MQTT

Commands can be sent only to nodes powered by the power module, or usb-gateway.

LED

  • On
    mosquitto_pub -t "node/{id}/led/-/state/set" -m true
    
  • Off
    mosquitto_pub -t "node/{id}/led/-/state/set" -m false
    
  • Get state
    mosquitto_pub -t "node/{id}/led/-/state/get" -n
    

Relay on Power module

  • On

    mosquitto_pub -t 'node/{id}/relay/-/state/set' -m true
    

    Hint First aid: If the relay not clicked, so make sure you join 5V DC adapter to Power Module

  • Off

    mosquitto_pub -t 'node/{id}/relay/-/state/set' -m false
    
  • Get state

    mosquitto_pub -t 'node/{id}/relay/-/state/get' -n
    

Relay module

  • On
    mosquitto_pub -t "node/{id}/relay/0:0/state/set" -m true
    mosquitto_pub -t "node/{id}/relay/0:1/state/set" -m true
    
  • Off
    mosquitto_pub -t "node/{id}/relay/0:0/state/set" -m false
    mosquitto_pub -t "node/{id}/relay/0:1/state/set" -m false
    
  • Get state
    mosquitto_pub -t "node/{id}/relay/0:0/state/get" -n
    mosquitto_pub -t "node/{id}/relay/0:1/state/get" -n
    

Led Strip on Power module

Beware, it works only on remote nodes.

  • Brightness, the value is in percent of the integer:
    mosquitto_pub -t 'node/{id}/led-strip/-/brightness/set' -m 50
    
  • Color, standart format #rrggbb and non standart format for white component #rrggbb(ww)
    mosquitto_pub -t 'node/{id}/led-strip/-/color/set' -m '"#250000"'
    mosquitto_pub -t 'node/{id}/led-strip/-/color/set' -m '"#250000(80)"'
    
  • Compound, format is [number of pixels, fill color, ... ], example rainbow effect
    mosquitto_pub -t 'node/{id}/led-strip/-/compound/set' -m '[20, "#ff0000", 20, "#ff7f00", 20, "#ffff00", 20, "#00ff00", 20, "#0000ff", 20, "#960082", 24, "#D500ff"]'
    

LCD module

Beware, it works only usb-gateway

  • Write text, supported font size [11, 13, 15, 24, 28, 33], default font is 15
    mosquitto_pub -t "node/{id}/lcd/-/text/set" -m '{"x": 5, "y": 10, "text": "BigClown"}'
    mosquitto_pub -t "node/{id}/lcd/-/text/set" -m '{"x": 5, "y": 40, "text": "BigClown", "font": 28}'
    

Radio

Works, but it can change
```
mosquitto_pub -t 'node/{id-gateway}/radio/-/nodes/get' -n
mosquitto_pub -t 'node/{id-gateway}/radio/-/node/add' -m '"836d1983184c"'
mosquitto_pub -t 'node/{id-gateway}/radio/-/node/remove' -m '"836d1983184c"'
```

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤  by BigClown Labs s.r.o. in Czech Republic.