-
Notifications
You must be signed in to change notification settings - Fork 62
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
unclear how to get HomeAssistant to discover sensor #79
Comments
Do you see anything in Home assistant like: Personally, I'd just leave the With EspruinoHub working you'd expect to see You could check Maybe you could check and see if you're getting any One issue I do see is that
Also I'm not 100% sure if EspruinoHub currently forwards 0xFFFF to Home Assistant (although it should at least forward temperature). You could try changing 0xFFFF to 0x2a58 (which comes up as 'analog') and see if that helps |
Gordon, I don't see anything in Home assistant like you show (I'm looking on the 'Overview' page). On the rpi.local:1888/status page, I see the doorbell (a beautiful piece of engineering): I suspected I needed to set my homeassistant to look for the mqtt broker on the rpi.local, so I set it in homeassitant's configuarion.yaml: ...restarted everything, it connects, and mqtt server shows: ...but no 'discovery'. I guess I can figure out how to code it into my configuration.yaml, something like this was working on a previous version of this repo:
...but I can't get it to work just now. I thought I'd report to you, in case there's something I'm missing. And also to say, thank you for your suggestions above about the code, and so much for your time, energy and patience while looking into these issues - you're a techno-saint! |
Hmm - that is strange. If EspruinoHub is set up as you say it should really be producing Mine says something like:
Perhaps if you're not getting |
Hi gordon, I am getting [MQTT] Connected:
{"data":162} is the number of times I've pressed the button! :-D ...Homeassistant says it can see the doorbell:
...but it doesn't appear in the 'http://homeassistant:8123/lovelace/default_view' overview page. No new sensors or anything like a doorbell there. |
What is you run:
And then you press the button? Do you see anything appearing other than just your It looks suspiciously like your mqtt prefix is So is it possible you changed anything else? Like modifying the line |
...didn't change anything else as far as I remember... looks like mqqtt json is true:
|
..adding to the above, does it matter that I set http proxy to true, and get the error '[HTTPProxy] Bleno.startAdvertising Error: Command Disallowed' - does that mean I am not using http proxy? |
Thanks - that's odd though - now you get I just tried your config file here and it works as I'd expect - creating events like Is it possible you're just connecting to the wrong MQTT server? The values you see for
I think so. You could just disable that for now and see if it helps - I guess it's possible that the error breaks something else? |
Set Http proxy to false in ~/EspruinoHub/config.json
In HomeAssistant, I get:
..but no new sensors in the Overview page. |
Ok, so that's new is it? Earlier I'd mentioned:
It looks like that is your problem now. It seems that Please can you |
Ah yes, I hadn't had a moment to change the code on the puck. I stash my config.json, git pull, move back my config and restart the espruinohub. All good! On Homeassistant, I now see: ea:17:b5:fb:1f:8c_data_doorbell ...and in devices:
|
Well, that's more promising!
I think these are related... Please could you do the
and
Which matches what's in I guess it's possible that your modified prefix of
Interestingly you're getting Having said that, I would imagine you can rename them in Home Assistant? |
...etc, no mention of doorbells. (I left it for 5 mins..!)
I use metrics2mqtt which gives labels such as "MyHostName Virtual Memory" and the measurements and units. It doesn't require any additional config in homeassistant! I highly recommend it. |
Ahh - actually, you need |
Espruino status page shows:
HomeAssistant shows: |
Ok, that seems a lot more reasonable! Although it seems that maybe the doorbell Puck wasn't running any code when you ran the command? Please can you try removing the |
Great - thanks for letting me know! I just filed an issue to fix the underlying problem properly: #80 |
I'm trying to set up a Puck.js v2 to use as a doorbell. I'm looking at the notes here and in home assistant.
I've got the raspberry pi runnig the espruino/EspruinoHub to connect to HomeAsisstant:
Apr 22 19:13:04 enviro EspruinoHub[16341]: [MQTT] Connected
and I can see some MQTT messages in HomeAssistant, listening to doorbell/#
Message 41 received on doorbell/presence/xx:xx:xx:xx:73:d9 at 7:22 PM:
1
(that's not my... device by the way.. I don't know what that is)
But I can't get the automatic discovery to work.
My puck is set to do this:
and my config.js is set to to do this:
... I'm slightly confused as to how to proceed. Any help gratefully received! I've putting tried all manner of keywords into the 'mqtt_prefix' line, homeassistant/ sensor/ etc. What am I doing wrong?
The text was updated successfully, but these errors were encountered: