-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing in Home Assistant #41
Comments
Hey @Post404, Please provide any issue you had or details that were missing from the description. I can certainly add more content to the README of this project. I've also recently hooked my SenseoWifi to HomeAssistant. The current firmware does not support Home Assistant auto discovery via MQTT but that is on my low prio todo list. Till then you can use the following configuration as a starting point: If you didn't already, activate the packages concept in Home Assistant's homeassistant:
...
packages: !include_dir_named packages Now add the following configuration file under input_boolean:
senseowifi_brew_normal:
name: "SenseoWifi Auslöser einfache Tasse brühen"
initial: off
icon: mdi:coffee
senseowifi_brew_double:
name: "SenseoWifi Auslöser große Tasse brühen"
initial: off
icon: mdi:coffee
switch:
- platform: mqtt
name: SenseoWifi Power
#
state_topic: "homie/senseo-wifi-rf21/machine/power"
state_on: "true"
state_off: "false"
#
command_topic: "homie/senseo-wifi-rf21/machine/power/set"
payload_on: "true"
payload_off: "false"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
sensor:
- platform: mqtt
name: SenseoWifi Brewed size
#
state_topic: "homie/senseo-wifi-rf21/machine/brewedSize"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
- platform: mqtt
name: SenseoWifi OpState
#
state_topic: "homie/senseo-wifi-rf21/machine/opState"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
binary_sensor:
- platform: mqtt
name: SenseoWifi Out-of-water
#
state_topic: "homie/senseo-wifi-rf21/machine/outOfWater"
payload_on: "true"
payload_off: "false"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
- platform: mqtt
name: SenseoWifi Brew
#
state_topic: "homie/senseo-wifi-rf21/machine/brew"
payload_on: "true"
payload_off: "false"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
- platform: mqtt
name: SenseoWifi Cup available
#
state_topic: "homie/senseo-wifi-rf21/machine/cupAvailable"
payload_on: "true"
payload_off: "false"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
- platform: mqtt
name: SenseoWifi Cup full
#
state_topic: "homie/senseo-wifi-rf21/machine/cupFull"
payload_on: "true"
payload_off: "false"
#
availability_topic: "homie/senseo-wifi-rf21/$state"
payload_available: "ready"
#value_template: "{{ value }}"
automation:
- id: "1611257531404"
alias: Regel SenseoWifi Auslöser normale Tasse brühen
trigger:
platform: state
entity_id: input_boolean.senseowifi_brew_normal
to: "on"
action:
- service: mqtt.publish
data:
topic: "homie/senseo-wifi-rf21/machine/brew/set"
payload: "1cup"
- id: "1611257531405"
alias: Regel SenseoWifi Auslöser große Tasse brühen
trigger:
platform: state
entity_id: input_boolean.senseowifi_brew_double
to: "on"
action:
- service: mqtt.publish
data:
topic: "homie/senseo-wifi-rf21/machine/brew/set"
payload: "2cup"
- id: "1611257531406"
alias: Regel SenseoWifi update beim Ausschalten
trigger:
platform: state
entity_id: binary_sensor.senseowifi_brew
to: "off"
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.senseowifi_brew_normal
- service: input_boolean.turn_off
data:
entity_id: input_boolean.senseowifi_brew_double Replace "senseo-wifi-rf21" by whatever your machine is called on the MQTT broker. Hope that helped. Please provide as much info back as you can |
This is excactly what I was looking for, thanks for that. I would have never been able to figure this out myself. I might have to take the Senseo appart again to check if everything is connected right. Or could it be something software sided? |
Take it one step at a time :)
"Are being received" is unclear to me. Check the debug topic for errors and in case of doubt check the source code to get a clearer picture of which conditions might stop execution. E.g. in order to brew coffee, a coffee mug must be present. |
I used testIO.cpp and it detected that the cup sensor is not present which is correct. Do I need to adjust something in the code for that? Also while in test mode it turned the Senseo On and Off. So at the very least the wires for that are correct. |
Thanks for your help! |
Great! Congrats! (Btw. be sure to add your voice to #42 😉 ) First of all: The cup sensor is super useful, so think about adding it. Of course, you don't have to. For that reason, I added a flag to disable the use of such a sensor. You must set/unset that flag during the initial setup (the process where you also set wifi password and MQTT credentials). Sorry, you need to reset your machine, there is no way to change the setting now. Resetting:
My machines have the reset push button in one of the holes on the bottom of the machine. Quite useful for when you ever need to reconnect it to a new network. |
Might as well just add the sensor and the reset button. It's not that much work at this point. Thanks for helping me out and also making me understand it better! |
Oke, I added the sensor. When in test mode the number is 1024 and changed to ~60 when placing my hand in front of it. I connected the sensor to A0, do I also need to wire it to D0? |
I think I found it out. The sensor i ordered was a TCRT5000 without any board. After checking the versions with the board I noticed that they also have a D0 pin. I'm guessing that if I use that one it will all just work. |
Received the sensor, installed the sensor and now it works perfectly! Again, thanks for all the help! |
I played around with the analog input but ended up just going with D0 for simplicity. Too bad you had to order a second time but seems like you got to a happy end. Great!! I would leave this ticket open as I need to document Home Assistant integration in README.md. Any other details you would suggest adding? |
Now that you mention it, I remember being stuck with the question: "Where exectly do I solder de cables on the senseo board?". |
@Post404 as the buttons and LEDs are in the other side of the PCB, I didn't even think about marking them :D you are of course right... |
Home Assistant example now in the README. You wouldn't happen to have a cooler configuration by now? |
Yes I do actually, I went full circle. I went back to visualising the Senseo in Homeassistant Lovelace. You'll need these images in your homeassistant "www" folder: https://we.tl/t-Zrkoq89kdD And put this code in a picture element card:
This should visualise every state even with some animation. So the cup will appear when placing it (with reflections on the senseo itself, so proud). The button light blinks correctly for every state. And when it starts brewing you see the coffee comming out and the cup starts to fill with the official Senseo coffee™. The only thing I still want to do is swap it out for a better 3D model of the Senseo. I also added an automation in Node-red to change a light of something else depending on the state. I've added comments in there so the adjustments to make it work for anybody else is a little easier but this is what I use: |
That's impressive! |
@Post404 I've built my own interactive lovelace controls and added a few additional entities and automations for various things. Have a look in the README. |
Thanks! I've added your UI underneath the visualisation, looks great! Also took the time to update and i'm now trying to create turn on and turn off tunes. It's fun allready, but the timing is a little bit different everytime. |
I'm now sending the tones 1 by 1 with some delay in-between creating some nice tunes. They are a little bit different every time and a delay below 200 ms doesn't always work. It would be really cool to be able to create custom tunes and send the whole tune in 1 command and then have the Senseo playing it. The limitation then would be the amount of tones available. 😁 |
As you are probably aware I've added the Lines 368 to 372 in 27e4713
To be honest, I don't feel it's worth it, after all, this thing is supposed to brew coffee :D What do you think? There are probably ready-to-use libraries out there for melodies. I'm not against accepting a pull request for the feature. Regarding the limitation of the tones: I was pragmatic here. With a few more implementation minutes you could accept an integer as the Lines 143 to 146 in 27e4713
Be aware that at least my buzzer is very dependent on the frequency. Some tones are barely audible.
Let me know in case you changed anything!
Yeah I'm afraid that won't work Btw did you see #45 Best! |
@Post404 if you want to give it a try: https://github.com/fabianoriccardi/melody-player/blob/master/examples/1_simple_play/1_simple_play.ino |
Thanks for your explanation. That make a lot of sense. I really had fun with making the tunes so far. At this point I'm so invested in this project and the level off overkill features is already so high that this doesn't stand out that much . And it has a high WAF, I don't even drink coffee myself. |
Haha nice :) Happy you enjoyed this! Please play around with tunes, who knows, maybe we can include them! I'll close this ticket but please open a new one to discuss tunes :) |
Everything in this project has been new for me, soldering, ordering a custom PCB, dealing with firmware. I am now at the point that i'm trying to implement it into Home Assistant. It is connected to the Wifi and to the MQTT broker.
I just don't know how to "translate" the OpenHAB config to Home Assistant. Is there any example available that I can see?
The text was updated successfully, but these errors were encountered: