Closed deformedchild closed 2 years ago
Hello there. I never really expected anyone to stumble upon this so didn't really put much thought into documentation!
I don't use HACS but I purposefully based the design around MQTT auto-discovery. If you have that integration enabled and you can spin up a docker container with my server, you should be good.
Are you familiar with docker? I could show you what my docker-compose.yml
file looks like.
Hi unfortunately I am very much a failure when it comes to Linux and command prompt so no I'm not familiar with docker. I was also looking at using esphome as this has a ble option for esp32 it's all good thank you very much for replying. It was just something to Fiddle with with a new baby around.
Congratulations! :tada:
The way the project is currently written makes it a bad fit for HACS. It could be set up as an add-on instead but I don't use these either since they I can't use them with my Home Assistant setup.
Using an ESP32 could be an option, yes, though obviously not with this code. It would have to either rewritten (probably in C) or, maybe, one could program it in ESPHome using the MQTT and BLE components.
The hardest, IMO, part (which was figuring out what's being sent over BLE) is already done. Getting the sensors (on/off, speed, and mode) would probably be easy. Controlling it seems tricker. I saw there's a Binary BLE Output component in ESPHome but didn't see one for numbers. I wonder if that means you'd have to resort to using the C++ Custom Output component?
What do you use to run your Home Assistant? How did you install it?
I see I setup my hass with raspberry pi 4 with ha OS. Because of my complete inability to program I use node red for my automations and mash up a bit of stolen code when I need to do things that I can't work out how to do with the nodes available. When I get some time I'm going to look through the code and esphome and see if I can create something unholy
I found a spare SD Card and set up HA OS to see if I could get this up and running quick and dirty without having to make this an actual add-on.
The answer is yes, it's doable and I have it working.
Prerequisites:
Let me know if you need help with any of these. Once you get these installed, we can try the actual docker container setup.
Mate your a legend thank u so so much. I have all the things you have asked about.
Note that "Protection mode" (in the SSH add-on) needs to be disabled.
git clone https://github.com/chrisrosset/mamaroo-mqtt
cd mamaroo-mqtt
docker build -t mamaroo .
docker run -d --name mamaroo --restart=unless-stopped -v /var/run/dbus:/var/run/dbus mamaroo --broker localhost XX:XX:XX:XX:XX:XX
If everything goes well, you should should see new entities appear (2 selects and 1 switch) in Home Assistant.
I would love to see a video of it working if you manage to set it all up. :)
so no luck my only thought is where do i put the mqtt server login information. Also does the docker require exclusive access to the Bluetooth radio in my raspberry pi as I already have an addon using the Bluetooth for a number of temp sensors.
The "localhost" argument in the final command is the broker information. My script doesn't support any auth so the only broker info is the network location.
On Thu, Jun 2, 2022, 22:37 deformedchild @.***> wrote:
so no luck my only thought is where do i put the mqtt server login information
— Reply to this email directly, view it on GitHub https://github.com/chrisrosset/mamaroo-mqtt/issues/1#issuecomment-1145528512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAINLPTUMDC3MA4GU6UAL2TVNFVU7ANCNFSM5XJY7HCA . You are receiving this because you commented.Message ID: @.***>
Does this help at all
During handling of the above exception, another exception occurred:,
Traceback (most recent call last):,
File "/app/mamaroo_mqtt.py", line 240, in
The log is helpful and confirmed my suspicion. Turns out I skipped a step in replicating your setup and used my real MQTT broker instead of the one from the add-on. My bad, I'm sorry.
In my setup, I don't use username/password authentication but the official add-on requires it.
I'll have to make some changes to the code to support this.
sorry im being so much trouble but thank you so much for you help
Would it be possible for us to get on some sort of live chat to speed this process up? :)
What a legend got it working with the home assistant default build you need to add a password and username to the logon for the mosquitto
I've added support for user/pass auth and compiled the notes from this exchange into the project's README in case someone else ever stumbles upon this.
I've definitely stumbled upon it... working through setup of my MQTT broker to see if I can get this running or not (between work and feedings... XD).
I'm on HA Core though... so I don't have addons (only HACS) and am installing everything manually in docker. Will see if I can get it operating and report back on results.
Any chance you could set this up for hacs I would love have my mumaroo in Hass or a bit more in the read me on how to set it up thanks