Comments (13)
Hi
There is generic ble scanner worker. Probably you can use it: https://github.com/zewelor/bt-mqtt-gateway/blob/master/workers/blescanmulti.py
https://github.com/zewelor/bt-mqtt-gateway/blob/master/config.yaml.example#L84
from bt-mqtt-gateway.
hello
thank you for the answer I looked and I did this:
`mqtt:
host: 192.168.1.140
port: 1883
#username: user
#password: password
#ca_cert: /etc/ssl/certs/ca-certificates.crt # Uncomment to enable MQTT TLS, update path to appropriate location.
#ca_verify: False # Verify TLS certificate chain and host, disable for testing with self-signed certificates, default to True
#client_cert: mosq_client.crt # If client_cert and client_key are specified, MQTT uses client certificate authentication instead of username + password
#client_key: mosq_client.key
topic_prefix: bt2mqtt # All messages will have that prefix added, remove if you dont need this.
client_id: bt-mqtt-gateway
availability_topic: lwt_topic
manager:
sensor_config:
topic: homeassistant
retain: true
topic_subscription:
update_all:
topic: homeassistant/status
payload: online
command_timeout: 35 # Timeout for worker operations. Can be removed if the default of 35 seconds is sufficient.
command_retries: 0 # Number of retries for worker commands. Default is 0. Might not be supported for all workers.
update_retries: 0 # Number of retries for worker updates. Default is 0. Might not be supported for all workers.
workers:
mysensors:
command_timeout: 35 # Optional override of globally set command_timeout.
command_retries: 0 # Optional override of globally set command_retries.
update_retries: 0 # Optional override of globally set update_retries.
args:
port: /dev/ttyUSB0
baudrate: 9600
topic_prefix: mysensors/out
miscale:
args:
mac: 00:11:22:33:44:55
topic_prefix: miscale
users: # Used for recognizing multiple people, as well as for decoding body metrics! (Optional)
Alex: # Name (used in MQTT to define a user topic)
weight_template: # The weight template that the user will be tracked by!
min: 70
max: 90
sex: male # Sex (male or female)
height: 185 # Height (in cm)
dob: 2000-01-11 # DOB (in yyyy-mm-dd format)
Olivia:
weight_template:
min: 30
max: 60
sex: female
height: 165
dob: 2000-02-22
update_interval: 1800
miflora:
args:
devices:
herbs: 00:11:22:33:44:55
topic_prefix: miflora
per_device_timeout: 6 # Optional override of globally set per_device_timeout.
update_interval: 300
blescanmulti:
args:
devices:
nut01: F0:2C:AC:84:4C:31
nut02: D3:E2:D7:F9:5E:D9
topic_prefix: blescan
available_payload: home
unavailable_payload: not_home
available_timeout: 0
unavailable_timeout: 60
scan_timeout: 10
scan_passive: true
update_interval: 60
`
It seems to give a few things but in my test I have 2 nut find 3 and I only see one on MQTT Explorer
When I do
sudo ./gateway.py
I have an error on the opening of the serial port ttyUSB0 that I cannot correct
Afterwards, during the deployment I change the path for the user
Then when I run the service I get this error again
So when restarting my VM there will no longer be the active service
thanks a lot for your help
from bt-mqtt-gateway.
In workers section of the config, leave only blescanmulti worker, delete everything else, if you don't want to use it ( you probably don't need anything else for now ).
from bt-mqtt-gateway.
sorry for the formatting of the code block there must be symbols in it badly recognized
yes I deleted or commented everything for future use like Miscale
on the other hand I do not understand the errors related to the serial port and the service which does not want to remain active.
if my VM is stopped and restart I lose bt2mqtt and I have to restart by hand
from bt-mqtt-gateway.
serial port is used AFAIK only by mysensors worker, from pasted config, looks like you got it still on. Delete it and it should run
from bt-mqtt-gateway.
Hello
Indeed I left my sensor
Removing more error is better :)
However, I can't get the service to activate.
from bt-mqtt-gateway.
Run it without service to get full logs.
from bt-mqtt-gateway.
I launched this
sudo ./gateway.py -d
from bt-mqtt-gateway.
Looks good. Not sure why service version doesn't start. I think you could try to add "-d" on the end of this line, maybe it will show some error: https://github.com/zewelor/bt-mqtt-gateway/blob/master/bt-mqtt-gateway.service#L9.
EDIT: Or maybe this: https://unix.stackexchange.com/questions/225401/how-to-see-full-log-from-systemctl-status-service
from bt-mqtt-gateway.
I started all over again I have this command which gives me
from bt-mqtt-gateway.
You probably missed this step:
sudo pip3 install -r requirements.txt
Also I would suggest try docker router, as it should be easier to work with and maintain.
from bt-mqtt-gateway.
good evening
I ordered it, it's weird!
I can't make it despite the advice
docker I don't have at all I only have VMs
behind this test I want to implement the solution on several pi zero to mesh the house better
from bt-mqtt-gateway.
I've looked at venv instructions and fixed them a bit. I'm not using this method so don't have much experience. If you want to mesh home with some bluetooth tags to see where is someone etc. I would recommend use some esp32 board with software like https://esphome.io/ or https://tasmota.github.io/docs/ or maybe something like this: https://home-assistant-guide.com/2021/09/09/is-espresense-the-successor-to-esp32-mqtt-room-weve-been-waiting-for/. Having few rpi zero is a headache to support them in long run. You got whole linux system running + possible problems with sdcard wearing after a lot of writes ( unless you configure os as read only ).
I would go with esphome route, you can probably use it with mqtt only without Home Assistant even.
from bt-mqtt-gateway.
Related Issues (20)
- node_id = mac.replace(":", "-") = AttributeError: 'dict' object has no attribute 'replace' HOT 1
- Does it work with ESPHome?
- Problem with negative temperature / signed values HOT 1
- Gateway not starting as systemctl service HOT 2
- solved: Type error HOT 1
- Clarify why this needs to be run in a virtual environment HOT 1
- null values from LYWSD03MMC HOT 5
- blescanmulti worker not publishing to MQTT
- Systemd Installation like in README does not work, service.sh might have superfluous sudo
- Error message if bt-mqtt-gateway is started as home assistant addon HOT 8
- Support for MQTT climate hold and away modes has been removed in HA. HOT 2
- Missing MQTT messages HOT 2
- Anyway to setup on qnap?
- Docker configure.yaml HOT 1
- maybe use eq3btsmart to modernize eq3 thermostat handling? HOT 2
- 100% cpu load from bluepy-helper HOT 2
- Linak Desk Set commands
- Please, Delete this issue
- README venv installation instructions are incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bt-mqtt-gateway.