dariopb / ha-gosenseapp Goto Github PK
View Code? Open in Web Editor NEWApplication that uses the gosense library to discover and publish sensor information to HA via MQTT
Application that uses the gosense library to discover and publish sensor information to HA via MQTT
Normally it works perfectly and sends messages in the format of:
time="2019-10-13T06:13:35Z" level=info msg="LOG: time=13 Oct 19 06:13 +0000, data=\xa2777F2846\x02\x00\x01\xfa"
time="2019-10-13T06:13:35Z" level=info msg="ALARM: time=13 Oct 19 06:13 +0000, mac: 777F2846, type: 2, battery: 100, signal: 79, state: 0, data=6400010001fa4f"
time="2019-10-13T06:13:35Z" level=info msg="ALARM: 777F2846, state: 0"
Then randomly, sometimes multiple times per day it will just stop working. I check the docker logs and all I see is this:
time="2019-10-13T10:52:49Z" level=info msg="LOG: time=01 Jan 70 00:00 +0000, data=\xa2777F2846\x02\x01\x01\xfb"
Only LOG messages, no ALARM messages. Once I restart the docker container (hosted on a Raspberry Pi 3 on Raspbian Stretch) it works perfectly again.
Not sure how to debug this one right now, but I'm going to try tonight, just wanted to see if anybody else had come across it.
As I'm posting this I notice that the "time" for all the LOG messages 01 Jan 70. That's gotta be significant but I'm not sure in what way.
When trying to compile based on command in instructions:
cd cmd
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o gosenseapp
It produces the error:
import cycle not allowed
package github.com/dariopb/gosenseapp/cmd
imports github.com/dariopb/gosense
imports github.com/dariopb/gosense
imports github.com/dariopb/gosense
So there seems to be a package import a package already referenced. I however can't seem to find github.com/dariopb/gosenseapp/cmd and i only see one reference in github.com/dariopb/gosense. Perhaps I am missing something.
On every boot of HA, I get a bunch of errors from mqtt:
Logger: homeassistant.components.binary_sensor
Source: helpers/entity_platform.py:497
Integration: Binary sensor (documentation, issues)
First occurred: May 4, 2021, 1:43:39 AM (15 occurrences)
Last logged: May 4, 2021, 1:43:39 AM
Platform mqtt does not generate unique IDs. ID 7784XXXX already exists - ignoring binary_sensor.DEVICE_NAME
...
This is using yaml configuration as per /hasensors
endpoint. If you can help me figure out what the actual issue with the config is, then I'm more than happy to fix the endpoint code to generate it!
I'm running on a Raspberry Pi sending messages to my local MQTT broker. This is great, thanks for the app! I am not using HomeAssistant.
I would like to set a "friendly" name for my sensors instead of using the MAC address. When I tried to edit the config file and changed the name: entries to my friendly names, the container would not start.
I had to use following command to build the executable image for it to work with docker
cd cmd; env GOARCH=arm GOARM=5 CGO_ENABLED=0 GOOS=linux go build -o gosenseapp
Without it, the docker container gave following error:
docker run -it --rm --net host -v /home/pi/wyze/data/app.yaml:/app.yaml --privileged jd/gosense
standard_init_linux.go:211: exec user process caused "no such file or directory"
Is there any way to use a port other than 8080. Running this docker and specifying another port like below doesn't help as it still will always be port 8080.
sudo docker run -p 8989:8080 -d -it --rm --net host -v /home/user/gosenseapp/app.yaml:/app.yaml --privileged dariob/gosenseapp:latest
This causes conflicts with other applications running on server.
Hi, first of all, this is fantastic work!
Very small, easy on resources but very quick code. Fantastic job!
I noticed in logs that the PIR sensor is producing erratic messages. Battery goes from 100% to 0%.
Please let me know how I could troubleshoot this issue.
Thanks!
INFO[0962] ALARM: time=19 Jun 20 07:33 +0000, mac: 77A17BAB, type: 2, battery: 100, signal: 21, state: 0, data=64000100000815
INFO[0962] ALARM: 77A17BAB, state: 0
INFO[1032] ALARM: time=19 Jun 20 07:34 +0000, mac: 77A17BAB, type: 2, battery: 0, signal: 3, state: 1, data=00000001000003000000001500
INFO[1032] ALARM: 77A17BAB, state: 1
INFO[1043] LOG: time=19 Jun 20 07:34 +0000, data=�77A17BAB��
INFO[1043] ALARM: time=19 Jun 20 07:34 +0000, mac: 77A17BAB, type: 2, battery: 100, signal: 20, state: 1, data=64000101000914
INFO[1043] ALARM: 77A17BAB, state: 1
INFO[1083] LOG: time=19 Jun 20 07:34 +0000, data=�77A17BAB�
INFO[1083] ALARM: time=19 Jun 20 07:34 +0000, mac: 77A17BAB, type: 2, battery: 100, signal: 21, state: 0, data=64000100000a15
INFO[1083] ALARM: 77A17BAB, state: 0
INFO[1098] LOG: time=19 Jun 20 07:35 +0000, data=�77A17BAB���
INFO[1098] ALARM: time=19 Jun 20 07:35 +0000, mac: 77A17BAB, type: 2, battery: 100, signal: 21, state: 1, data=64000101000b15
INFO[1098] ALARM: 77A17BAB, state: 1
INFO[1138] LOG: time=19 Jun 20 07:35 +0000, data=�77A17BAB�
INFO[1138] ALARM: time=19 Jun 20 07:35 +0000, mac: 77A17BAB, type: 2, battery: 100, signal: 21, state: 0, data=64000100000c15
INFO[1138] ALARM: 77A17BAB, state: 0
INFO[1163] ALARM: time=19 Jun 20 07:36 +0000, mac: 77A17BAB, type: 2, battery: 0, signal: 3, state: 0, data=00010000000003000000011500
INFO[1163] ALARM: 77A17BAB, state: 0
INFO[1176] LOG: time=19 Jun 20 07:36 +0000, data=�77A17BAB��
INFO[1176] ALARM: time=19 Jun 20 07:36 +0000, mac: 77A17BAB, type: 2, battery: 100, signal: 21, state: 1, data=64000101000d15
INFO[1176] ALARM: 77A17BAB, state: 1
Hi, been loving gosenseapp. Been using it with homebridge and it works great. However I have noticed that the motion sensor will occasionally publish messages that makes no sense. Messages with nonsensical battery level and states. Sometimes the states will say 2, 3 or even 4. I have included the log output for those instances.
DEBU[0626] readRawHid: 39 bytes: [ 55aa5323190000016d7a3eee4dab3737383545454545020200000002000000020000004d0006de ]
DEBU[0626] Trying to parse: 39 bytes: [ 55aa5323190000016d7a3eee4dab3737383545454545020200000002000000020000004d0006de ]
DEBU[0626] ==> Sending ACK packet for cmd 5319
DEBU[0626] ====> sending: [Packet: Cmd:53ff, Payload: ACK[0019]]
DEBU[0626] Sending: aa555319ff026a
INFO[0626] ALARM: time=28 Sep 19 23:40 +0000, mac: 7785EEEE, type: 2, battery: 0, signal: 0, state: 2, data=00000002000000020000004d00
INFO[0626] ALARM: 7785EEEE, state: 2
and one for state 3
DEBU[3427] readRawHid: 39 bytes: [ 55aa5323190000016d7a69a9b5ab3737383545454545020400000003000006020000004e000736 ]
DEBU[3427] Trying to parse: 39 bytes: [ 55aa5323190000016d7a69a9b5ab3737383545454545020400000003000006020000004e000736 ]
DEBU[3427] ==> Sending ACK packet for cmd 5319
DEBU[3427] ====> sending: [Packet: Cmd:53ff, Payload: ACK[0019]]
DEBU[3427] Sending: aa555319ff026a
INFO[3427] ALARM: time=29 Sep 19 00:26 +0000, mac: 7785EEEE, type: 2, battery: 0, signal: 6, state: 3, data=00000003000006020000004e00
INFO[3427] ALARM: 7785EEEE, state: 3
Can you tell me what is causing this?
Line 45 in c6516a8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.