Hey @koffienl the thing is: the USB cable is not disconnected, every other switch is working without issues. Also there are no double taps done, it’s just a slider. But even if I set a rule with a dummy switch to set the dimmer to a specified value it gives a timeout. I can turn it on (or off) one time, then it crashes. Already running 0.0.6 dev version with mqtt enabled and connected
-
Announcement: ESPimaticRF coming soon
-
Everything the ESP outputs on serial, is displayed on the screen when debugging is enabled. That’s why you should try and see if there’s some weird message
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Debugging is enabled, nothing visible in Pimatic logs. Will try your suggestion for the debugging as soon as possible. Thanks!
-
@koffienl done some testing while creating a log. You can download a snippet of the log at https://justpaste.it/1euum
As you can see the system disconnects a few times after sending a signal, after the reconnection at 19:39 there are only timeouts when trying to flip a switch. Only solution at that point is rebooting the pi.
Any idea what to do?
-
Your ESP crashes on 19:30:58.131, and after that a lot.
What ESP do you use? How is the Pi powered?Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
It’s a nodeMCU v3 (http://s.aliexpress.com/nMrymyQb?)
The pi is powered with a 2.5A power supply. -
For testing purposes I did the following in the last hour:
- Changed power supply with lab power supply
- swapped all cables between power supply, pi and nodeMCU
- flashed another nodeMCU with espimaticrf 0.0.6
Results: the same as with the previous setup, nodemcu keeps crashing when trying to switch the dimmer device resulting in timeouts.
Then I connected the “old” arduino nano, repositioned the pi closer to the dimmer (normally there’s a distance of about 25 meters between the pi/arduino combo and the dimmer so the dimmer is not receiving anything) and the dimmer works without failures. But this is not an option because then I cannot connect my smartmeter to the pi from that position
No clue what to do next…
-
I really don’t think it would help at all, but could you try changing the USB power setting on the pi?
To be clear, the dimmer that’s always causing the issue is “dimmer1 id:9605078 unit:1” correct? How do you send the on/off/dimm ? From a rule or just from the dimmer device?Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
You got me there haha: what do you mean with the USB power setting?
And indeed it is that (the only) dimmer device. Tried it both directly with the dimmer slider and with a rule and dummy switch. Results are the same. -
in
/boot/config.txt
set the following value:max_usb_current=1
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Done, result stays the same, homeduinorf crashes and reboots when trying to set a dim value. Strange thing is that it takes about 3 of these crashes before Pimatic starts giving timeout errors.
-
@djmvt did you reboot? Config.txt is parsed after a reboot.
-
@Gleno0h yes I did
-
@djmvt just to make sure your usb’s arnt swapping arou d could you do
dmesg | grep ttyUSB
and post that here? -
pi@pimatic:~ $ dmesg | grep ttyUSB
[ 6.100350] usb 1-1.2: ch341-uart converter now attached to ttyUSB0
[ 6.105334] usb 1-1.4: ch341-uart converter now attached to ttyUSB1Because both devices have the same name I’ve used /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 in the homeduino plugin to identify the nodemcu.
-
@djmvt uhhh shouldnt that be “cp210”?
What does
lsusb
output -
pi@pimatic:~ $ lsusb
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub -
@djmvt i could be stupid but i dont see the nodemcu?
You have 2 serial converters(arduino’s?) connected?
Maybe you could post an image of your setup? It should just be a usb cable connected to the nodemcu…
Also, for testinv purpose it would be great if you could use just one nodemcu.
-
@Gleno0h the nodemcu is visible as serial converter, the other one you see is a real serial converter connected to my smartmeter.
They both identify the same, that’s why I have to specify the exact path (by id) in the homeduino plugin. This afternoon I’ve tested with only the master nodemcu connected to the pi, no other stuff connected. But because of the distance between the pi and the dimmer I’m trying to reach this is only possible if I place the pi halfway in my house. That’s not an option because of the smartmeter
But for testing I did this this afternoon, didn’t make a difference, the nodemcu keeps disconnecting/crashing when trying to change the state of the dimmer. -
I’ve just ordered an extra nodemcu, now with CP2102 serial in stead of ch341. Will take a while until it reaches the Netherlands but then I can at least test if the different serial driver chip is causing the issues.