No still no data from the tilt.
I just checked the
docker logs brewblox_tilt_1 -f
and the communication error is still there.
No still no data from the tilt.
I just checked the
docker logs brewblox_tilt_1 -f
and the communication error is still there.
Ah, checked config, and you need to edit docker-compose.yml, and add to the tilt service:
command: --mqtt-port=2001
(If 2001 is the https port).
Then run brewblox-ctl up.
I added the mqqt port and the connection fault is now gone if in the tilt log. But still no tilt data in the graph…
pi@raspberrypi:~/brewblox $ docker logs brewblox_tilt_1 -f
2020/07/14 12:21:07 WARNING brewblox_tilt Calibration file not found: /share/SGCal.csv . Calibrated values won't be provided.
2020/07/14 12:21:07 WARNING brewblox_tilt Calibration file not found: /share/tempCal.csv . Calibrated values won't be provided.
2020/07/14 12:21:07 INFO brewblox_service.service Service name: tilt
2020/07/14 12:21:07 INFO brewblox_service.service Service info: v1.0.2-59-g7629bed @ Sat Jun 27 12:19:18 UTC 2020
2020/07/14 12:21:07 INFO brewblox_service.service Service config: {'host': '0.0.0.0', 'port': 5001, 'output': None, 'name': 'tilt', 'debug': False, 'eventbus_host': 'eventbus', 'eventbus_port': 5672, 'mqtt_protocol': 'wss', 'mqtt_host': '172.17.0.1', 'mqtt_port': 2001, 'mqtt_path': '/eventbus', 'history_topic': 'brewcast/history', 'state_topic': 'brewcast/state', 'lower_bound': 0.5, 'upper_bound': 2}
2020/07/14 12:21:07 INFO brewblox_service.mqtt Starting <EventHandler for wss://172.17.0.1:2001/eventbus>
2020/07/14 12:21:07 INFO brewblox_tilt Started TiltScanner
2020/07/14 12:21:08 INFO brewblox_tilt Found Tilt: Black
What are your graph settings?
You can also check incoming data by adding the following config to docker-compose.yml:
history:
command: --debug
(this overrides the history service in shared).
You can then check the history logs with
docker-compose logs --follow history
It will print whenever it receives data.
If that doesn’t work out, please run brewblox-ctl log.
I did this on the raspberry pi and on my NAS. On the Pi it works. I can see the logging:
pi@raspberrypi:~/brewblox $ docker-compose logs --follow history
Attaching to brewblox_history_1
history_1 | /usr/local/lib/python3.7/site-packages/aioinflux/compat.py:12: UserWarning: Pandas/Numpy is not available. Support for 'dataframe' mode is disabled.
history_1 | warnings.warn(no_pandas_warning)
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.service Service name: history
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.service Service info: 0.9.0-117-g83cf68c @ Tue Jun 16 19:15:17 UTC 2020
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.service Service config: {'host': '0.0.0.0', 'port': 5000, 'output': None, 'name': 'history', 'debug': True, 'eventbus_host': 'eventbus', 'eventbus_port': 5672, 'mqtt_protocol': 'mqtt', 'mqtt_host': 'eventbus', 'mqtt_port': None, 'mqtt_path': '/eventbus', 'history_topic': 'brewcast/history', 'state_topic': 'brewcast/state', 'broadcast_exchange': 'brewcast.history', 'write_interval': 5, 'poll_interval': 5}
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/api/doc/swagger.json
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/static/swagger
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [HEAD] /history/static/swagger
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/api/doc
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/_debug/publish
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/_debug/subscribe
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/_debug/query
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [HEAD] /history/ping
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/ping
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/query/objects
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/query/values
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/query/last_values
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [POST] /history/query/configure
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [HEAD] /history/sse/values
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/sse/values
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [HEAD] /history/sse/last_values
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/sse/last_values
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [HEAD] /history/_service/status
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Endpoint [GET] /history/_service/status
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_service.scheduler.TaskScheduler'>] <TaskScheduler>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.amqp.EventListener'>] <EventListener for eventbus>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.amqp.EventPublisher'>] <EventPublisher for "eventbus">
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_service.mqtt.EventHandler'>] <EventHandler for mqtt://eventbus:1883>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.influx.QueryClient'>] <QueryClient>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.influx.InfluxWriter'>] <InfluxWriter brewblox>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.sse.ShutdownAlert'>] <ShutdownAlert>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.relays.AMQPDataRelay'>] <AMQPDataRelay None>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.relays.MQTTDataRelay'>] <MQTTDataRelay None>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.service Feature [<class 'brewblox_history.relays.MQTTRetainedRelay'>] <MQTTRetainedRelay>
history_1 | 2020/07/14 13:18:54 DEBUG asyncio Using selector: EpollSelector
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <TaskScheduler>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.scheduler Scheduled <Task pending coro=<TaskScheduler._cleanup() running at /usr/local/lib/python3.7/site-packages/brewblox_service/scheduler.py:34>>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <TaskScheduler>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <EventListener for eventbus>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.scheduler Scheduled <Task pending coro=<RepeaterFeature.__repeat() running at /usr/local/lib/python3.7/site-packages/brewblox_service/repeater.py:63>>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <EventListener for eventbus>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <EventPublisher for "eventbus">
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <EventPublisher for "eventbus">
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <EventHandler for mqtt://eventbus:1883>
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt Starting <EventHandler for mqtt://eventbus:1883>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <EventHandler for mqtt://eventbus:1883>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <QueryClient>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <QueryClient>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <InfluxWriter brewblox>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.scheduler Scheduled <Task pending coro=<RepeaterFeature.__repeat() running at /usr/local/lib/python3.7/site-packages/brewblox_service/repeater.py:63>>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <InfluxWriter brewblox>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <ShutdownAlert>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <ShutdownAlert>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <AMQPDataRelay None>
history_1 | 2020/07/14 13:18:54 INFO brewblox_history.amqp Deferred event bus subscription: [<# @ brewcast.history>]
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <AMQPDataRelay brewcast.history>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <MQTTDataRelay None>
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt listen(brewcast/history/#)
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt subscribe(brewcast/history/#)
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <MQTTDataRelay brewcast/history/#>
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features --> startup <MQTTRetainedRelay>
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt listen(brewcast/state/#)
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt subscribe(brewcast/state/#)
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt subscribe(brewcast/request/state)
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt listen(brewcast/request/state)
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.features <-- startup <MQTTRetainedRelay>
history_1 | 2020/07/14 13:18:54 INFO brewblox_history.amqp <EventListener for eventbus> now listening
history_1 | 2020/07/14 13:18:54 DEBUG aioinflux 204: No Content
history_1 | 2020/07/14 13:18:54 INFO brewblox_history.influx Connected <InfluxWriter brewblox>
history_1 | 2020/07/14 13:18:54 DEBUG aioinflux 200: CREATE DATABASE "brewblox"
history_1 | 2020/07/14 13:18:54 INFO aioamqp.protocol Recv open ok
history_1 | 2020/07/14 13:18:54 DEBUG aioamqp.channel Channel is open
history_1 | 2020/07/14 13:18:54 INFO brewblox_history.amqp Connected <EventListener for eventbus>
history_1 | 2020/07/14 13:18:54 INFO brewblox_history.amqp Declaring event bus subscription <# @ brewcast.history> on <aioamqp.channel.Channel object at 0x7583ca90>
history_1 | 2020/07/14 13:18:54 DEBUG aioamqp.channel Exchange declared
history_1 | 2020/07/14 13:18:54 DEBUG aioamqp.channel Queue declared
history_1 | 2020/07/14 13:18:54 DEBUG aioamqp.channel Queue bound
history_1 | 2020/07/14 13:18:54 DEBUG brewblox_service.mqtt Applying subscribe for ['brewcast/history/#', 'brewcast/state/#', 'brewcast/request/state']
history_1 | 2020/07/14 13:18:54 INFO brewblox_service.mqtt <EventHandler for mqtt://eventbus:1883> connected
history_1 | 2020/07/14 13:18:55 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:18:57 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:18:59 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:00 DEBUG brewblox_history.influx Pushed 2 points to database
history_1 | 2020/07/14 13:19:00 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:01 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:02 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:03 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:04 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:05 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:06 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:06 DEBUG brewblox_history.influx Pushed 6 points to database
But on the NAS I get an error when I run the command to see the log
Dennis@NASSIE:~/brewblox$ docker-compose logs --follow history
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
I did notice that port 1883 is used in the log. Does it matter that my NAS is a MQTT broker itself on port 1883. I use this to connect my lights too google.
You may need to run sudo docker-compose logs --follow history
.
Have you rebooted your NAS after installing brewblox?
The 1883 port is only used inside the docker network. You can run sudo docker-compose logs --follow eventbus
to check - it will immediately exit with an error if it has a port conflict.
I did not rebooted my NAS. Just did it to be sure.
sudo docker-compose logs --follow history
history_1 | WARNING: no logs are available with the 'db' log driver
I think that’s a setting configured by some other docker container on your system.
You could add the following to the history service in docker-compose.yml:
logging:
driver: json-file
options:
max-size: "10m"
run brewblox-ctl up after editing the file.
I added the extra code to the history service and now I can run sudo docker-compose logs --follow history. Below the ouput. It doesn’t look like something from the tilt.
history_1 | 2020/07/14 16:12:07 DEBUG brewblox_history.relays MQTT: spark-herms = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:13 DEBUG brewblox_history.relays MQTT: spark-vergisten = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:13 DEBUG brewblox_history.influx Pushed 2 points to database
history_1 | 2020/07/14 16:12:13 DEBUG brewblox_history.relays MQTT: spark-herms = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:18 DEBUG brewblox_history.relays MQTT: spark-vergisten = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:19 DEBUG brewblox_history.influx Pushed 2 points to database
history_1 | 2020/07/14 16:12:19 DEBUG brewblox_history.relays MQTT: spark-herms = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:24 DEBUG brewblox_history.relays MQTT: spark-vergisten = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:25 DEBUG brewblox_history.influx Pushed 3 points to database
history_1 | 2020/07/14 16:12:26 DEBUG brewblox_history.relays MQTT: spark-herms = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:30 DEBUG brewblox_history.relays MQTT: spark-vergisten = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:31 DEBUG brewblox_history.influx Pushed 2 points to database
history_1 | 2020/07/14 16:12:32 DEBUG brewblox_history.relays MQTT: spark-herms = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:35 DEBUG brewblox_history.relays MQTT: spark-vergisten = {'ActiveGroups/active/0': 0, '...
history_1 | 2020/07/14 16:12:37 DEBUG brewblox_history.influx Pushed 2 points to database
history_1 | 2020/07/14 16:12:38 DEBUG brewblox_history.relays MQTT: spark-herms = {'ActiveGroups/active/0': 0, '...
if I run sudo docker-compose logs --follow eventbus I get the same error as before
sudo docker-compose logs --follow history
history_1 | WARNING: no logs are available with the 'db' log driver
spark-herms and spark-vergisten are expected to be publishing data?
You seem to be hopping between your Pi and your NAS. Which one houses what, and where are these logs from?
You can also add the logging code for the eventbus
service in docker-compose.yml if you wish to view logs.
PI: only reading data from the tilt.
NAS: run brewblox and read tilt graph data from mqtt bus
spark-herms and spark-vergisten are the sparks I have. I just reinstalled brewblox on my NAS they are now called spark-one and spark-two again.
The log from me latest post is from the NAS.
I think the installation on the PI is fine now. It reads data from the tilt and it pushes it to the database. The problem is now I think that somehow the brewblox installation on the NAS doesnt read/receive the tilt data.
Log from the PI:
history_1 | 2020/07/14 13:19:36 DEBUG brewblox_history.influx Pushed 4 points to database
history_1 | 2020/07/14 13:19:37 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:38 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:39 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
history_1 | 2020/07/14 13:19:40 DEBUG brewblox_history.relays MQTT: tilt = {'Black/Temperature[degF]': 74...
If I run brewblox-ctl log on my NAS I get an error for the uploading the log to the web. I attached the log here: brewblox.log (33.7 KB)
Log from NAS:
Dennis@NASSIE:~/brewblox$ brewblox-ctl log
INFO Log file: /volume1/homes/Dennis/brewblox/brewblox.log
INFO Writing Brewblox .env values...
Password:
INFO Writing service logs...
INFO Writing docker-compose configuration...
INFO Writing Spark blocks...
INFO Uploading brewblox.log to termbin.com...
/bin/sh: nc: command not found
Command 'cat brewblox.log | nc termbin.com 9999' returned non-zero exit status 127.
I think I’m understanding the setup here a bit better.
The situation now is that you have separate Brewblox installs on both the NAS and the Pi. Both have their own independent history database. The Tilt on the Pi is currently sending data to the history database on the Pi, while you want to collect it on the NAS.
To get to the desired situation, edit the Tilt service on the Pi, and add a command setting:
command: --mqtt-host=NAS_IP_ADDRESS --mqtt-port=NAS_HTTPS_PORT
Afterwards, you can strip down the configuration on the Pi to only run the Tilt service, but first let’s get it to work that the Tilt service on the Pi pushes data to the NAS database.
Yes that was the problem. It works now. Thanks a lot for the support!!
If you want to make logging work with brewblox-ctl log
, add the following to your docker-compose.yml
:
services:
spark-one:
[your spark config]
logging:
driver: "json-file"
mdns:
logging:
driver: "json-file"
eventbus:
logging:
driver: "json-file"
influx:
logging:
driver: "json-file"
datastore:
logging:
driver: "json-file"
history:
logging:
driver: "json-file"
traefik:
logging:
driver: "json-file"
ui:
logging:
driver: "json-file"
Synology uses a different logging engine for their graphical docker app. unfortunately it is either brewblox-ctl or Synology’s docker app that can read the logs.
Just a warning for everybody that considders installing the preview DSM7, brewblox doesnt work after the installation. Docker and Python3 can’t be installed anymore (for now). Maybe there are more issues but I can’t say now. So if you’re planning to install the update you should wait
For those that installed Brewblox on Synology how did you connect the Spark controller to the Synology box? My Synology box is on the opposite side of the house of my fermentation chamber. Is it possible to run usb that far?
Also is there a benefit for the Brewblox over the BrewPi?
Just use WiFi instead of USB.
Brewblox has a lot of more features and improvements, it’s definitely worth the upgrade.
I’m working on getting Brewblox installed on my Synology box but when I try to run brewblox-ctl setup I get the following error.
JoelMoore@STELLA:~$ brewblox-ctl setup
Usage: __main__.py [OPTIONS] COMMAND [ARGS]...
Try '__main__.py --help' for help.
Error: No such command 'setup'.
Many commands only work if your current directory is a Brewblox directory.
I ran this before the setup command.
brewblox-ctl install --no-docker-user --no-reboot
Command is about to: Create Brewblox directory; install system dependencies; reboot.
Do you want to continue? (yes, no, verbose, dry-run) [press ENTER for default value 'yes']y
Do you want to install with default settings? [Press ENTER for default value 'yes']
INFO Docker is already installed.
INFO Installing apt packages...
apt: invalid flag: update
Usage: apt <apt and javac options> <source files>
where apt options include:
-classpath <path> Specify where to find user class files and annotation processor factories
-cp <path> Specify where to find user class files and annotation processor factories
-d <path> Specify where to place processor and javac generated class files
-s <path> Specify where to place processor generated source files
-source <release> Provide source compatibility with specified release
-version Version information
-help Print a synopsis of standard options; use javac -help for more options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
-A[key[=value]] Options to pass to annotation processors
-nocompile Do not compile source files to class files
-print Print out textual representation of specified types
-factorypath <path> Specify where to find annotation processor factories
-factory <class> Name of AnnotationProcessorFactory to use; bypasses default discovery process
See javac -help for information on javac options.
You’ll have to say no
to default settings, and not install apt packages. apt
is the Debian/Ubuntu package manager, and is not available on Synology.
The other problem should then be solved: brewblox-ctl install
stopped here with an error, and never created the brewblox/ directory.
brewblox-ctl setup
should be run inside the brewblox directory.
Thank you. That worked. Now I need to wait until my current Helles is done fermenting to get everything transitioned over.
Thanks,
Joel