Weber iGrill 2 integration with Lovelace UI

Did you find any way to resolve it? It looks like it doesn’t reconnect the bluetooth connection to the iGrill.

As to regards how to resolve it - I have a similar issue with an mqtt service on another pi failing to reconnect. I have nodeRed so used that to monitor heartbeats. When it hasn’t had a heartbeat for 10 minutes it ssh’s into the other device and restarts the service:

sudo /usr/bin/sshpass -p '<mypassword>' /usr/bin/ssh -o StrictHostKeyChecking=no <myuser>@192.168.1.<myip> "sudo systemctl restart mqttlights"

You’ll need to install sshpass to use this - and then you need to hardcode your credentials into the command. As everything is local I feel it’s a crappy but low risk solution. I’m sure you could use keys if you wanted to make it more secure.

So I guess you could get HA to shell out to the command line when you press a button or something…

I basically do what you describe: I set up a script to restart the service via a key-based SSH login.
I have an entry in the UI and only run it when necessary, i.e. when I turn the iGrill on and don’t get a temperature reading, rather than checking regularly.

Getting stuck at the "Authenticating… " when running ./monitor.py tried both of the suggestions in the readme.md but no luck. Anyone have any other suggestions? i see the pi making the mqtt connection to the server but no data is being transferred.

running on raspberry pi 3:
Raspbian Buster Lite
bendikwa/igrill
paho-mqtt 1.4.0
yamlreader 3.0.4
bluepy (https://github.com/IanHarvey/bluepy)
pycrypto 2.6.1
PyYAML 5.1.1

iGrill 2

running on Ubuntu Server 18.04:
Home Assistant 0.94.3
Mosquitto broker Hass.io Add On

thanks

1 Like

Same problem

Is the bluetooth from the pi pairing with the igrill 2 (does the blinking blue light go solid)?

Do you have at least one probe plugged into the igrill for testing?

Yes the Bluetooth blue light stops blinking and I have at least one probe plugged into the igrill

That worked for me!! Thank you very much.
Now I have another problem, i’m trying to run the script at boot but I don’t know what i need to insert in ‘<path_to_igrill_repo>/monitor.py’ and ‘<path_to_config_dir>’
Can someone help me?

It depends on where you install the igrill code (where you downloaded it to)

here is how mine igrill service starts at boot:

[Unit]
Description=igrill MQTT service
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=2
ExecStart=/usr/bin/python /home/pi/igrill/monitor.py -c /home/pi/igrill

[Install]
WantedBy=multi-user.target

my yaml configs are in the /home/pi/igrill directory (device.yaml, mqtt.yaml)

It is working like a charm!!
Thank you!!

1 Like

So i am having the same issue as jbak21
Im stuck on Authenticating

In mosquitto mqtt, I see that the connection seems to reach my mqtt server

1562550089: New client connected from 192.168.1.179 as b065009e-9ef2-405e-8e8c-af3ff6df282a (c1, k60, u’USERNAME’).
1562550180: Client b065009e-9ef2-405e-8e8c-af3ff6df282a has exceeded timeout, disconnecting.
1562550180: Socket error on client b065009e-9ef2-405e-8e8c-af3ff6df282a, disconnecting.

I guess it times out, i cant find why tho
I have a probe connected. My igrill 3 lights keep blinking also

Did you create a user within mqtt called USERNAME? That’s what the client is trying to use to connect to the broker and that is set in the igrill mqtt.yaml.

You can either update the mqtt.yaml with a valid user name and password that has been added to mqtt broker or you can remove and allow anonymous, which requires a config change to the mqtt broker.

This writeup describes the process well:

im running mine anonymously here are my configs:

Mosquitto Config:

{
  "logins": [],
  "anonymous": true,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "quiet_logs": true
}

mqtt.yaml:

#MQTT All values default to paho.mqtt.client defaults
mqtt:
  host:       'HASSIOIPHERE'                   # Optional default 'localhost'
  port:       1883                                    # Optional default '1883'
  keepalive:  60                                   # Optional default '60'
#  auth:                                               # Optional If included, username_pw_set() is called with user/password
#    username: 'user'                          # Required (when auth is present)
#    password: 'pass'                         # Optional
#  tls:                                                 # Optional If included, tls_set() is called with the following:  (default is paho.mqtt.client.tls_set() defaults)
#    ca_certs:                                      # Optional
#    certfile:                                      # Optional
#    keyfile:                                       # Optional
#    cert_reqs:                                     # Optional
#    tls_version:                                   # Optional
#    ciphers:                                       # Optional

just a complete guess, but since you have the cert and key identified in the mosquitto conf, do you need that in then yaml as well?

This is all I have in my mosquitto conf:

allow_anonymous false
password_file /etc/mosquitto/pwfile
listener 1883
log_type all
log_dest file /var/log/mosquitto/mosquitto.log

and this is my mqtt.yaml(username and password x’d out), my broker runs on a different pi than the igrill does:

#MQTT All values default to paho.mqtt.client defaults
mqtt:
  host:       '192.168.x.xxx'                   # Optional default 'localhost'
  port:       1883                                 # Optional default '1883'
  base_topic: 'bbq'                                # Optional default 'bbq'
  keepalive:  60                                   # Optional default '60'
  auth:                                            # Optional If included, username_pw_set() is called with user/password
    username: 'xxxxxxx'                               # Required (when auth is present)
    password: 'xxxxxxx'                        # Optional
#  tls:                                             # Optional If included, tls_set() is called with the following:  (default is paho.mqtt.client.tls_set() defaults)
#    ca_certs:                                      # Optional
#    certfile:                                      # Optional
#    keyfile:                                       # Optional
#    cert_reqs:                                     # Optional
#    tls_version:                                   # Optional
#    ciphers:                                       # Optional

I should also add, I am not running the homeassistant mosquitto broker, I installed it outside of HA

I’m fairly certain that I have everything installed and configured correctly, but I’m having a hell of a time connecting my iGrill to my Pi’s bluetooth. I’m running an RPI3 with Stretch (Python 2.7) and I keep getting the following error when trying to connect by bluetooth (through “bluetoothctl” command):

[bluetooth]# pair 70:91:8F:0E:4E:28
Attempting to pair with 70:91:8F:0E:4E:28
Failed to pair: org.bluez.Error.AuthenticationFailed

[bluetooth]# connect 70:91:8F:0E:4E:28
Attempting to connect to 70:91:8F:0E:4E:28
Failed to connect: org.bluez.Error.Failed

Its my understanding this error is because a PIN is required (presumably ‘0000’), but I’m never prompted for this code. I’ve searched a number of forums and I cannot figure this out. How is everyone else connecting to their iGrill? I also tried installing Blueman, which is a bluetooth GUI but haven’t had any luck there either.

This integration is really of interest to me for longer cooks on my smoker so I would love to get this working and could use some help!

Have tried the steps listed here:

I cannot remember exactly what I did, I see you tried pair and connect, but there are other commands you may need to run first based on this link.

I’ve tired everything in this article and then some, but I appreciate you sharing it. I suspect that there is either something wrong with my bluetooth driver or hardware or it’s an issue with Stretch. I’m going to try a different Pi that I have lying around and start fresh with Buster to see if I can get it working that way. I’ve read that others have had issues using Bluetooth with Stretch.

My bluetooth problems were solved when I installed Buster on a different Pi. The bluetooth connected on the first try. I don’t know if it was the Pi itself or Stretch, but either way I’m now able to connect my iGrill via bluetooth. I’m running into a new problem, however. Even though I believe I’ve set everything up correctly, the iGrill values are not flowing through to Home Assistant.

I’m able to authenticate ./monitor.py

pi@raspberrypi:~ $ cd /home/pi/igrill
pi@raspberrypi:~/igrill $ ./monitor.py
2019-07-13 21:15:35,064 MainThread INFO: log_level set to: INFO
2019-07-13 21:15:37,606 grill INFO: Authenticating…
2019-07-13 21:15:37,939 grill INFO: Authenticated

The MQTT broker connects to my Pi, but it just times out.

1563070537: New connection from 192.168.1.146 on port 1883.
1563070537: New client connected from 192.168.1.146 as auto-AB4A6C21-E6BE-69AF-8039-714FB26C3F7B (p2, c1, k60, u’pi’).
1563070626: Client auto-89D70885-51E7-FBF0-7794-C40FB1774DD7 has exceeded timeout, disconnecting.

Here’s my device.yaml on my iGrill Pi:

 devices:
   - name:       'grill'               
     type:       'igrill_v2'           
     address:    '70:91:8F:0E:4E:28'      
     topic:      'bbq/grill'     
     interval:   20

And here’s my sensor.yaml on my Home Assistant server:

 - platform: mqtt
   state_topic: "bbq/grill/probe1"
   name: "Probe 1"
   qos: 0
   unit_of_measurement: "°F"
 - platform: mqtt
   state_topic: "bbq/grill/probe2"
   name: "Probe 2"
   qos: 0
   unit_of_measurement: "°F"
 - platform: mqtt
   state_topic: "bbq/grill/probe3"
   name: "Probe 3"
   qos: 0
   unit_of_measurement: "°F"
 - platform: mqtt
   state_topic: "bbq/grill/probe4"
   name: "Probe 4"
   qos: 0

Despite being able to authenticate just fine and connect to my MQTT broker in Home Assistant, I don’t see any of the sensors flowing through the MQTT broker and of course none of the values are reporting in Home Assistant. Does anyone have any ideas? I’ve installed all of the prerequisite packages recommended, but some of them do have newer versions of a few packages that were listed here: https://github.com/bendikwa/igrill/blob/3bd766aa278a248ed0a4ca7f329db9163e6b6410/requirements.txt

Are you running the HA MQTT broker? I installed mosquito on the same PI that runs my HA. What does your MQTT config look like for the broker and the igrill client?

The logs you show looks like it is a different client disconnecting than the one that connected.