slash4you / karotz2mqtt

Configurable Karotz to MQTT gateway for Homeassistant integration.
9 stars 0 forks source link

Ears not moving #1

Open sanderant opened 3 years ago

sanderant commented 3 years ago

Hey thanks for this great integration. I was able to install it and it appears to be publishing the correct information, but the ears aren't moving from Home Assistant.

Is there a topic I can publish in MQTT Explorer to see if the mqtt portion is working correctly?

Thanks!

slash4you commented 3 years ago

Hi sanderant,

This MQTT proxy relies on a dbus proxy to control ears position, so can you check first that ears daemon has been started at boot time and is still alive :

-bash-4.1# ps -elf | grep ears-daemon
 1418 root       0:00 /usr/karotz/bin/immortaldog /var/run/karotz/ears.pid /usr/karotz/bin/ears-daemon
 1419 root       2:01 /usr/karotz/bin/ears-daemon

Then, you can manually move ears by publishing to the corresponding mqtt topic with a value within the range [15,22] : 15 is up, 22 is down. Depending on your setttings, the default topic shall be 'homeassistant/karotz_1/ear/right/position/set' for the right ear and 'homeassistant/karotz_1/ear/left/position/set' for the left ear.

Keep me informed,

Regards.

karotz2mqtt-snapshot-2021-02-25

slash4you commented 3 years ago

This is not the origin of your problem but I forgot to upload and describe another trick I had to do a few years ago to successfully control both ears. Your message has remembered to me my first painfull attempts. Indeed, ears-daemon provided with last violet rootfs ( 12.07.19.00 ) which was included into freerabbits-os is buggy. I do not remember exactly which one but with it I managed to successfully control only one ear, not the other one. That's why I had to replace it with a previous release provided with 11.12.21.00 rootfs, like this :

-bash-4.1# ls -l
lrwxrwxrwx    1 root     root            23 Jan 15  2017 ears-daemon -> ears-daemon.11.12.21.00
-rwxr-xr-x    1 root     root         26180 Jan 15  2017 ears-daemon.11.12.21.00
-rwxr-xr-x    1 root     root         27912 Jul 19  2012 ears-daemon.12.07.19.00

I have also uploaded this older release ( commit 0b064d7ff25e83afbf79f9d8b7002420bc847d1a )

Regards.

sanderant commented 3 years ago

Thanks, starting the ears daemon did the trick. I will download the updated ears-daemon and play with it tomorrow, and let you know if that works. Thanks for the quick fix!

sanderant commented 3 years ago

OK I restarted the rabbit and ears daemon didn't start. I checked and it wasn't in my startup.sh so I copied that line from the example in your docs, restarted and it worked. I thought I had the latest release, but maybe I didn't or somehow deleted it, not sure what happened.

Needless to say works great and thanks for your work on this. I have been looking at some of the other methods using REST like this: https://github.com/ClementNoiville/Home-Assistant-Karotz/blob/master/packages/openkartoz.yaml but there were too many hard coded assumptions for me to use as is.

I have two questions if you don't mind answering before you close this incident.

This won't interfere with the openkarotz web service will it? Do you have any other enhancements planned?

Thanks again!