bendikwa / igrill

Hacking the iGrill (mini, V2, V3 & Pulse 2000)
MIT License
77 stars 38 forks source link

Pulse 2000 compatible #14

Closed PaulAntonDeen closed 4 years ago

PaulAntonDeen commented 4 years ago

Awesome work, thank! I have a Weber Pulse 2000 electric grill which has the temp probes built in. What data do I need to capture from my grill to integrate it in this code and make it work?

runestone74 commented 4 years ago

If you have an Android device you can scan for UUID codes with this app https://play.google.com/store/apps/details?id=com.macdom.ble.blescanner

runestone74 commented 4 years ago

My guess is that these two (or one) lines is needed for the internal temperature probe in igrill.py

Pulse 1000

PROBE5_TEMPERATURE = btle.UUID('06ef000A-2e06-4b79-9e33-fce2c42805ec') PROBE5_THRESHOLD = btle.UUID('06ef000B-2e06-4b79-9e33-fce2c42805ec')

Pulse 2000? havent seen these actual values, just an educated guess with C and D

PROBE6_TEMPERATURE = btle.UUID('06ef000C-2e06-4b79-9e33-fce2c42805ec') PROBE7_THRESHOLD = btle.UUID('06ef000D-2e06-4b79-9e33-fce2c42805ec')

PaulAntonDeen commented 4 years ago

The 4 probes are the same UUID as the standard igrill.

The main heating element temperatures and setpoint are communicated on UUID 6c91000a-58dc-41c7-943f-518b278ceaaa. The return example is 20 30 32 30 20 30 31 35 20 30 30 30 20 30 30 30 which can be converted HextoASCII into "020 015 000 000" which can be read as actual temp left element, right element. Temp setpoint left right.

Authentication is not working and thus I cannot read the probe temperatures so I need to figure out how to debug that, any tips?

bendikwa commented 4 years ago

Hi It would be cool to be able to support the pulse 2000, unfortunately, I don’t think I can help much. The original authentication code is from the first fork, https://github.com/onlywade/igrill and the updated authentication method was contributed by kins-dev: https://blog.kins.dev/2019/04/igrill-device-support-for-igrill-smoker.html So other than turning the debug logging on, and trying to see where it fails, I don’t have any good ideas.

PaulAntonDeen commented 4 years ago

Yeah I'm not experienced with Python so I'm figuring it out as I go through here. It gets stuck after sending key of all 0's (that is a message with debug on). It just never moves past that. The code i'm using for now is just exactly your code with this for the device.yaml:

` devices:

I have ordered a BLE sniffer (Adafruit Bluefruit) so maybe I can use that to figure out the authentication method.

bendikwa commented 4 years ago

That sound like the same issue as "Getting stuck at authenticating"

Have you tried to use bluetoothctl to pair the iGrill first? Or the trick in the readme: https://github.com/bendikwa/igrill#troubleshooting

PaulAntonDeen commented 4 years ago

Commenting out that line in the udev rules fixed the authentication, now to figure out how to read that main temperature :)

PaulAntonDeen commented 4 years ago

Got it to work :) I will work on prettying up the code and then create a pull request

PaulAntonDeen commented 4 years ago

Pull request #16

bendikwa commented 4 years ago

I have merged the PR to https://github.com/bendikwa/igrill/tree/pulse2000_support and refactored the code a bit. Can you test to see that it still works?

Does the Pulse 2000 have a battery indicator? Or should we remove that?

-Bendik

PaulAntonDeen commented 4 years ago

That code looks much nicer, thanks :) It does not have a battery but will report 100% whenever read, so it is safe to read. Just ignore it on the MQTT sensor level in HA. I will test it out today.

PaulAntonDeen commented 4 years ago

Tested, working great! You want to add this to the readme as an example of how to add the sensors in Home Assistant:

` sensor:

PaulAntonDeen commented 4 years ago

On a seperate thought, since it only publishes a probe temp when it is connected it means that the non-connected probe's stay at the temperature they had the last time they were connected making it harder to see which are reporting. Should we tweak the temp reporting from the probes to just send a 0 or . when the 65356 value is read from the probes?

bendikwa commented 4 years ago

Great! I'll merge the Pulse 2000 support to master.

Regarding your two other suggestions:

  1. I think that the Home Assistant information belongs in the Home Assistant forum. I dont actually use Home Assistant, so I will not be able to help with it. ;-)

  2. On the subject of non-connected probes, I guess it is the same as https://github.com/bendikwa/igrill/issues/6 ? I have actually just pushed an attempt on a fix for this to a branch, hope to get it merged to master today.

bendikwa commented 4 years ago

Merged to master