-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updating repo #54
Open
Ozzyminted
wants to merge
53
commits into
anmaped:master
Choose a base branch
from
Ozzyminted:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
updating repo #54
Changes from 52 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
1c8fbc2
Add missing space that was causing an error
Cabalist 9e3ca0a
Merge pull request #1 from anmaped/master
medevil84 2a08a79
AppVeyor support
nschimme becc907
Add stats about ccache
nschimme 9cb890d
Fix path
nschimme 06397e5
Install ccache
nschimme 93a653a
Use sudo
nschimme 0202e01
docker.md
eteixido1 1142650
Update troubleshooting.md
eteixido1 eeac504
Update troubleshooting.md
eteixido1 c3a39a0
Bin files for MQTT
eteixido1 61031ac
mqtt.conf example
eteixido1 14672a9
mqtt-control & mqtt-status autostart
eteixido1 57e52d7
mqtt-control & mqtt-status autostart
eteixido1 a81f06e
mqtt-control & mqtt-status controlscripts
eteixido1 b61fa98
mqtt scripts
eteixido1 3dacef1
MQTT bin files
eteixido1 9cdb873
mqtt.conf file
eteixido1 13fd988
Delete busybox
eteixido1 7cfd1f9
Delete mosquitto_pub
eteixido1 2745cf0
Delete mosquitto_pub.bin
eteixido1 e726ade
Delete mosquitto_sub
eteixido1 fb7a00b
Delete mosquitto_sub.bin
eteixido1 590aae1
Delete mqtt-control
eteixido1 c46fed5
Delete mqtt-status
eteixido1 a01f7dc
Delete mqtt.conf
eteixido1 9784e3d
Delete mosquitto_pub-OLD
eteixido1 41047bd
Delete mosquitto_sub-OLD
eteixido1 d3ea60c
it's not necessari
eteixido1 7214fcd
it's not necessary
eteixido1 f1aad89
20190830-bin
eteixido1 d6bf737
20190830-autostart
eteixido1 153fa09
20190830-mqtt.conf
eteixido1 19d9b30
20190830-controlscripts mqtt-control mqtt-status
eteixido1 313be8a
20190830-scripts mqtt
eteixido1 920334b
20190830-script common_function.sh
eteixido1 58c5b77
mqtt configuration info
eteixido1 4273393
Delete getimage
eteixido1 f22df1b
Delete mosquitto_pub.bin
eteixido1 1599336
Delete mosquitto_sub.bin
eteixido1 f1b8f1b
Changed mqtt binaries for Openfang existing ones
eteixido1 9737742
changing binaries needed
eteixido1 704b75d
Typo fix
deftdawg 81b1a73
Update LICENSE
sundarnagarajan 7578134
Merge pull request #2 from eteixido1/patch-1
Ozzyminted 17e8eca
Merge pull request #4 from Cabalist/master
Ozzyminted 7953783
Merge pull request #5 from deftdawg/patch-1
Ozzyminted 58eeaf8
Merge pull request #6 from eteixido1/patch-2
Ozzyminted 4698794
Merge pull request #7 from eteixido1/master
Ozzyminted 2d7c661
Merge pull request #8 from medevil84/master
Ozzyminted 2311cd5
Merge pull request #12 from sundarnagarajan/master
Ozzyminted e17c1ae
Merge pull request #11 from nschimme/master
Ozzyminted f5177a3
Merge pull request #15 from anmaped/master
Ozzyminted File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: '{build}' | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
services: | ||
- docker | ||
|
||
image: Ubuntu | ||
|
||
environment: | ||
APPVEYOR_SAVE_CACHE_ON_ERROR: true | ||
CCACHE_DIR: /home/appveyor/.buildroot-ccache | ||
|
||
cache: | ||
- /home/appveyor/.buildroot-ccache | ||
|
||
init: | ||
- echo _NPROCESSORS_ONLN=$(getconf _NPROCESSORS_ONLN) | ||
|
||
install: | ||
- ps: $env:package_version = ("$(git rev-parse --short HEAD)").trim() | ||
- ps: Update-AppveyorBuild -Version "$env:package_version-$env:APPVEYOR_BUILD_NUMBER" | ||
- sh: sudo apt install ccache | ||
|
||
before_build: | ||
# Enable buildroot ccache | ||
- ccache --set-config=max_size=1.0G | ||
- ccache -s | ||
- sed "s/# BR2_CCACHE is not set/BR2_CCACHE=y/" config/buildroot.config > /tmp/buildroot.config | ||
- mv /tmp/buildroot.config config/buildroot.config | ||
- echo $(grep BR2_CCACHE config/buildroot.config) | ||
# Construct buildroot image | ||
- docker build -f ./Dockerfile -t openfang/container . | ||
|
||
build_script: | ||
# Run build within buildroot container | ||
- docker run --name openfang -v /home/appveyor/.buildroot-ccache:/root/.buildroot-ccache openfang/container sh /root/openfang/buildopenfang.sh | ||
|
||
after_build: | ||
# Extract artifacts from container for upload | ||
- docker cp openfang:/root/openfang/fs/opt/autoupdate.sh . | ||
- docker cp openfang:/root/openfang/toolchain*.tar.xz . | ||
- docker cp openfang:/root/openfang/images*.tar.xz . | ||
|
||
artifacts: | ||
- path: autoupdate.sh | ||
name: Autoupdate Script | ||
- path: toolchain*.tar.xz | ||
name: Toolchain | ||
- path: images*.tar.xz | ||
name: Images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
/opt/controlscripts/mqtt-control |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
/opt/controlscripts/mqtt-status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################ | ||
# edit this file and move it to /opt/config/mqtt.conf # | ||
############################################################ | ||
|
||
export LD_LIBRARY_PATH='/thirdlib:/lib:/opt/lib' | ||
|
||
# Options for mosquitto_sub & mosquitto_pub | ||
USER=mosquitto-user | ||
PASS=mosquitto-pass | ||
HOST=mosquitto-host-broker | ||
PORT=1883 | ||
|
||
# Define a location | ||
LOCATION="Home" | ||
|
||
# Define device name | ||
DEVICE_NAME="mijia-open-1" | ||
|
||
# Define the base topic used by the camera | ||
# send a message to myhome/openfang/set with the payload help for help. | ||
# Results will be placed in myhome/openfang/${command} or topic/openfang/error - so please subscribe topic/openfang/# for testing purposes | ||
TOPIC="$LOCATION/$DEVICE_NAME" | ||
|
||
# Define an autodiscovery prefix, if autodiscovery is desired: | ||
# AUTODISCOVERY_PREFIX="homeassistant" | ||
|
||
# Define additional options for Mosquitto here. | ||
# For example --cafile /opt/config/DST_Root_CA_X3.pem --tls-version tlsv1 | ||
# or use a special id to connect to brokers like azure | ||
MOSQUITTOOPTS="" | ||
|
||
# Add options for mosquitto_pub like -r for retaining messages | ||
MOSQUITTOPUBOPTS="" | ||
|
||
# Send a mqtt statusupdate every n seconds | ||
STATUSINTERVAL=30 | ||
|
||
# Publish and update the light dependant resistor (LDR) status or not. The | ||
# default value if the variable is not set is to send it. This might be useful | ||
# for owners of devices that lack the hardware sensor to avoid publishing | ||
# rubbish. | ||
SENDLDR="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
PIDFILE="/run/mqtt-control.pid" | ||
|
||
if [ ! -f /opt/config/mqtt.conf ]; then | ||
echo "You have to configure mqtt first. Please see /opt/config/mqtt.conf.dist for further instructions" | ||
fi | ||
|
||
status() | ||
{ | ||
pid="$(cat "$PIDFILE" 2>/dev/null)" | ||
if [ "$pid" ]; then | ||
kill -0 "$pid" >/dev/null && echo "PID: $pid" || return 1 | ||
fi | ||
} | ||
|
||
start() | ||
{ | ||
if [ -f $PIDFILE ]; then | ||
echo "MQTT Control already running"; | ||
else | ||
. /opt/config/mqtt.conf | ||
if [ -z ${AUTODISCOVERY_PREFIX+x} ]; | ||
then echo "MQTT autodiscovery is not enabled"; | ||
else | ||
echo "MQTT autodiscovery is enabled - now publishing initial configurations"; | ||
/opt/scripts/mqtt-autodiscovery.sh | ||
fi | ||
echo "Starting MQTT - Control" | ||
/opt/bin/busybox nohup /opt/scripts/mqtt-control.sh &>/dev/null & | ||
echo "$!" > "$PIDFILE" | ||
fi | ||
} | ||
|
||
stop() | ||
{ | ||
pid="$(cat "$PIDFILE" 2>/dev/null)" | ||
if [ "$pid" ]; then | ||
kill "$pid" && rm "$PIDFILE" | ||
killall mosquitto_sub 2>/dev/null | ||
killall mosquitto_sub.bin 2>/dev/null | ||
fi | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
start | ||
else | ||
case $1 in start|stop|status) | ||
$1 | ||
;; | ||
esac | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
PIDFILE="/run/mqtt-status.pid" | ||
|
||
if [ ! -f /opt/config/mqtt.conf ]; then | ||
echo "You have to configure mqtt first. Please see /opt/config/mqtt.conf.dist for further instructions" | ||
fi | ||
|
||
status() | ||
{ | ||
pid="$(cat "$PIDFILE" 2>/dev/null)" | ||
if [ "$pid" ]; then | ||
kill -0 "$pid" >/dev/null && echo "PID: $pid" || return 1 | ||
fi | ||
} | ||
|
||
start() | ||
{ | ||
if [ -f $PIDFILE ]; then | ||
echo "MQTT-Status already running"; | ||
else | ||
echo "Starting MQTT-Status" | ||
/opt/bin/busybox nohup /opt/scripts/mqtt-status-interval.sh &>/dev/null & | ||
echo "$!" > "$PIDFILE" | ||
fi | ||
} | ||
|
||
stop() | ||
{ | ||
pid="$(cat "$PIDFILE" 2>/dev/null)" | ||
if [ "$pid" ]; then | ||
kill "$pid" && rm "$PIDFILE" | ||
fi | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
start | ||
else | ||
case $1 in start|stop|status) | ||
$1 | ||
;; | ||
esac | ||
fi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't understand this note! Please remove it or turn it more explicit. Note that the docker image contains the available toolchain.