Yeah I have 3 sensors hooked up (the starter kit). I was seeing some lag when using your container too so it might be something about my hassio setup / machine / the fact that there a bunch of other hubs in proximity to the Wyze hub or something random.
I think you’re right though, it’s not super noticeable unless you’re looking for it
EDIT: I tried the original python app again and I’m seeing the same lag. So its gotta just be my machine.
Did you get it to work? Yes, there is an http endpoint listening on port 8080 and when you hit the http://xxxx:8080/sensors/scan endpoint, it will put the dongle in pairing state for 30secs. If you press the button in the sensor during that time you should get back the new paired sensor (the call won’t return during those 30 secs until it pairs or times out).
Yes I got it mostly working once i figured out the port.
I had some issues getting it to log into my mqtt broker, I was running sort of in a test environment at my office so I don’t know if it will translate when I attempt to set up when I get home. I have a 2 brokers bridged to test out something else and was able to use the other broker which has anonymous r/w access.
Seems very responsive, I’ll test some more tomorrow.
Thanks. There was a bug in the code setting the password (thanks @brmo! for spotting it) , that might be the reason you couldn’t connect to your authenticated mqtt broker :(. I fixed it and it should be working now. Please docker pull the image before you try again.
just pulled the new image and now working with the authenticated mqtt broker! Happy this was a bug as I was running out of ideas as to why it wasn’t working!
Thanks for putting this together, it seems to be working very well. have you had any luck getting the device_class into the discovery message?
FWIW I got this working on HASSOS by using the ssh-terminal addon and disabling protection mode. I created a gosenseapp folder with a blank app.yaml file inside my config folder. I then started it from the terminal:
Glad it is working for you!
Yes, device_class is working (next version you’ll be able to configure the class to report for the devices). What I still didn’t get is how to change the icons for the “parameters” (like battery and signal strength)…
I’m looking into making it an add-on as well (reason I didn’t do it yet is because my setup is raw ha, no hassio).
I think the delay is that the sensor is very sensitive, it shows as closed until the magnet is about an inch away. and will go back to closed as soon as it’s within that range.
Eh I think thats still a little faster than the python component. I’ll investigate later today. I’ll probably release it sooner so people can play with.
I know its a lot to ask but I’m also interested in having people who have gosense working comparing speeds in sensor updates! Unfortunately both of them cannot be active at once as only one can read and write to the device at once which prevents side by side comparisons.
So I think at this point I’m gonna pause development on it since I can’t really figure out why. @dariopb let me know if you need help turning it into an add on. I recently made one like 1 week ago so I’m pretty familiar with it.
Thank you, that is what I have done and given it similiar permissions to my zwave/zigbee stick. The problem I am running into is my Home Assistant instance is a docker and I am passing the wyze sense hub into the docker container. In my logs I am getting this:
2019-07-20 16:16:33 ERROR (MainThread) [custom_components.wyzesense.binary_sensor] 'NoneType' object is not iterable
Traceback (most recent call last):
File "/config/custom_components/wyzesense/binary_sensor.py", line 612, in async_setup_platform
gateway.Start()
File "/config/custom_components/wyzesense/binary_sensor.py", line 486, in Start
for x in sensors:
TypeError: 'NoneType' object is not iterable