Comments (5)
So what I found is that the MQTT client will not send information to the MQTT broker when no probe is connected.
I did a little deep dive.
igrill.py, line 153:
temps[probe_num] = float(temp) if float(temp) != 63536.0 else "False"
/usr/local/lib/python2.7/dist-packages/paho/mqtt/publish.py, line 168:
payload : the payload to be published. If "" or None, a zero length payload will be published.
If you want the mqtt client to send a message with a payload with no probe connected, you should change line 153 into the following:
temps[probe_num] = float(temp) if float(temp) != 63536.0 else "None"
And that did the trick (see screenshot). Now I have to modify Home Assistent so it can handle this value.
To be continued
from igrill.
Works wonders! Tanks!
from igrill.
My guess is that it just shows the last value received. (Wherever you display the values)
When a probe is just removed it should be the same, as only new values are shown. If the displaying entity is never receiving a „unknown“ value it won’t display it by its own. A solution might be to send one „unknown“ state message after a period of time not receiving new values from the probe.
from igrill.
This was by design when I implemented it.
I am not using Home Assistent for this project (I am using Prometheus/Grafana), and changing this would brake my setup, but I will consider making behaviour for disconnected probes configurable in a future release.
from igrill.
Better late than never: ;-)
I have added a new feature for this now:
Device config now takes 2 new optional flags.
publish_missing_probes: False # Optional default False - Enable sending a value for non-connected probes
missing_probe_value: 'missing' # Optional default 'missing' - Value to send if publish_missing_probes is True
-Bendik
from igrill.
Related Issues (20)
- mqtt when using auth, username and password HOT 2
- Remove pycrypto and iGrill Keys From the Code HOT 5
- (Not) connected-Message HOT 2
- Stuck at Authenticating HOT 4
- reconnect when disconnected HOT 4
- Propane Sensor? HOT 5
- Dockerfile to Support Ease of Installation for Raspberry Pi HOT 2
- Pulse 2000 compatible HOT 15
- external mqtt server not working HOT 7
- iGrill won't connect HOT 12
- NooB doing something dumb I'm sure HOT 11
- Failed to connect to peripheral HOT 7
- Enhancement Request - Home Assistant Add-on HOT 2
- Multiple iGrill device connections not working correctly HOT 2
- Questions HOT 2
- Lighted knobs support? HOT 2
- Negative Temperatures HOT 1
- No Pub to Topic HOT 4
- Docker image stopped working on Raspberry PI OS after full-upgrade HOT 3
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 igrill.