Open MrSiO opened 3 months ago
When the HA Integration is correctly set up (for example via auto discovery), it automatically tries to maintain the TCP socket the same way it would do with the Bluetooth socket. Additionally the first thing it does, when connecting via TCP is sending the connection info to the ESP32, so that the ESP32 is able to connect via Bluetooth. It also tries to reconnect, if the TCP and/or the Bluetooth connection gets lost. Therefore in an ideal scenario, you would only see it advertising for a short moment.
Why? Because its only advertising, when it isnt connected via Bluetooth. Which brings me to the first question: Did you make sure to remove/disable any other Divoom integration, that might take the limited Bluetooth connection? Because its possible that the original HA integration and the ESP32 Proxy are battling for the connection. The RECV 69
btw means, that its still trying to connect. RECV 96
would be, that the connection is lost. Both are handled by my HA integration (by waiting a little longer or trying to reconnect). And yes, these numbers were chosen intentionally by me 😉
Regarding the countdown-tool and why it did not show, I can only guess. It looks like you passed in the value 00.10
instead of 00:10
. While that wouldnt be a big problem for my code, it might be, that through HA it comes as float into my code (instead of string) and therefore it cannot parse the minutes and seconds out of it. \
The SEND code with the 46 in it you copied in here, is just the typical "get view" ping. The HA integration often sends this to make sure, the Bluetooth connection is still working, before sending the actual command. So, if you see these SEND
or RECV
lines with the 46 at the 4th or 5th position (depending on the direction), thats just the "get view" ping pong and not the actual command. The countdown command is the one with the 72 03 (72 for "set tool" and 03 for the tool "countdown").
Hi. Thx for your reply. Connection from HA to nodemcu looks ok. Everytime I call the service, I do see outputs from the terminal. Issue seem to be from the BT side. (I had a Wifi issue once but seems it was a one time glitch)
I did turn off any other devices previously peered with the Pixoo. In fact the discovery message never stops popping in terminal (confirming it's not connected to any other device). So the automatic BT connection initiated from the node MCU does not seem to work... Tried again just now, it only connects after Calling the service from HA. It seems to trigger the connection process and connects.
About the timer, the 00.10 was the actual way that I was using it trough my second HA integration so I did not think using the ESP32 would affect it (specially since it does work once in a while).
What simple test would you recommend using from HA Development? I'll keep it simple.
First thing first: If the NodeMCU should connect to Pixoo at startup, that's not working at this point. What test could help for troubleshooting / gather info?
Note: The only modifications I made to the project is setting my SSID & Password + my MQTT broker credentials. Everything else is by default.
Thx!!
UPDATE: I ordered WEMOS D1 MINI (esp32) to test with that hardware to see if it solves my issues.
Hi Dirk! I finally got the time to test this on NodeMCU last night!
I filled out the "config_local.h" file. Connected to wifi fine (same subnet as HA) Pixoo was discovered from your Integration (worked like a charm)
But at this point I'm running into issues.
I see the advertise in VS console but no automatic connect....
While seeing the advertisements, in HA Developpement mode, I call service (eg: timer / see image) and it (somtimes) works once (Pixoo shows timer) and get this in terminal:
If I try to send again the same timer a second time, I systematically get an Error in HA:
"Failed to call service notify.divoom_pixoo. Unknown error"
But in terminal I do see somthing is Sent..... but noting is displayed....
The only way I can get it to work one shot again (sometime) is to Reset the NODEMCU and try again in Developpement mode. Once I see the Advertises comming in, I call the Service from Developpement.... Then I see the Bluetooh logo appear on the Pixoo (but no timer displayed, this seems this initiates the BT connection but dosent display anything) and NodeMCU logs this to terminal:
And at the end, If I push my luck and try a few times in a row to send the timer from HA, I completely loose the NodeMCU (wifi drops / see image).
-=WORKING EXAMPLE THAT DID DISPLAY THE TIMER=-
-=NON-WORKING EXAMPLE THAT DID NOT DISPLAY THE TIMER=-
Thx!!