The target system is an installation of Raspberry Pints on Debian 11 with the option chosen to enable MQTT. What that does behind the scenes I don't know.I don't know how you have set up your target system
Based on the log output of Alpha 6, I'm inclined to agree with you. To test, I spun up a Debian 11 VM and followed the instructions you gave (correcting the typo in the systemctl commands which had only one t in mosquitto). The test succeeded; the "hello world" message was received (both from the same host and from a different host on my LAN) and printed.My best, uneducated guess, is that you've not gotten past step 1.
2023-04-27T20:53:06Z V: KegScreen TV: JSON file written.
2023-04-27T20:53:06Z N: UPTIME: Started with no history.
2023-04-27T20:53:06Z N: Deserialized version information.
2023-04-27T20:53:06Z N: Started Keg Cop version 1.2.1-Alpha.6/1.2.1-Alpha.6 (mqtt) [d4d3916].
2023-04-27T20:53:06Z V: Taplist.io: secret or venue not set, skipping send. ('' / '')
2023-04-27T20:53:11Z V: MQTT: Initializing connection to broker: 192.168.1.154 on port: 1883
2023-04-27T20:53:11Z V: MQTT: Connecting.
2023-04-27T20:53:32Z V: Disconnected from MQTT.
2023-04-27T20:53:32Z V: MQTT: Initializing connection to broker: 192.168.1.154 on port: 1883
2023-04-27T20:53:32Z V: MQTT: Connecting.
2023-04-27T20:53:54Z V: Disconnected from MQTT.
2023-04-27T20:53:54Z V: MQTT: Initializing connection to broker: 192.168.1.154 on port: 1883
2023-04-27T20:53:54Z V: MQTT: Connecting.
2023-04-27T20:54:08Z V: KegScreen reporting not enabled, skipping (Temp Report).
2023-04-27T20:54:15Z V: Disconnected from MQTT.
2023-04-27T20:54:15Z V: MQTT: Initializing connection to broker: 192.168.1.154 on port: 1883
2023-04-27T20:54:15Z V: MQTT: Connecting.
2023-04-27T20:54:36Z V: Disconnected from MQTT.
2023-04-27T20:54:36Z V: MQTT: Initializing connection to broker: 192.168.1.154 on port: 1883
2023-04-27T20:54:36Z V: MQTT: Connecting.
2023-04-27T20:54:53Z V: Sending /api/v1/info/secret/.
2023-04-27T20:54:53Z V: Sending /api/v1/info/tempcontrol/.
2023-04-27T20:54:53Z V: Sending /api/v1/info/sensors/.
2023-04-27T20:54:53Z V: Sending /api/v1/info/theme/.
2023-04-27T20:54:59Z V: Sending /api/v1/info/secret/.
2023-04-27T20:54:59Z V: Sending /api/v1/info/thisVersion/.
2023-04-27T20:54:59Z V: Sending /api/v1/info/thatVersion/.
2023-04-27T20:54:59Z V: Sending /api/v1/info/tempcontrol/.
2023-04-27T20:54:59Z V: Disconnected from MQTT.
2023-04-27T20:54:59Z V: MQTT: Initializing connection to broker: 192.168.1.154 on port: 1883
2023-04-27T20:54:59Z V: MQTT: Connecting.
2023-04-27T20:54:59Z V: Sending /api/v1/info/theme/.
2023-04-27T20:54:59Z V: Processing PUT to /api/v1/action/clearcalmode/.
2023-04-27T20:54:59Z V: Processing secret header.
2023-04-27T20:54:59Z N: Secret Check: [X-KegCop-Secret]:(651B5AE000001823) is valid.
2023-04-27T20:54:59Z V: Flowmeter Config Save: Saving configuration.
2023-04-27T20:54:59Z V: Flowmeter Config Save: Configuration saved.
2023-04-27T20:55:08Z V: KegScreen reporting not enabled, skipping (Temp Report).
2023-04-27T20:55:13Z V: Processing put to /api/v1/config/settings/.
2023-04-27T20:55:13Z N: Settings Update: [rpintshost]:(192.168.1.165) applied.
2023-04-27T20:55:13Z N: Settings Update: [rpintsport]:(1883) applied.
2023-04-27T20:55:13Z N: Settings Update: [rpintsusername]:(RaspberryPints) applied.
2023-04-27T20:55:13Z N: Settings Update: [rpintspassword]:(password) applied.
2023-04-27T20:55:13Z N: Settings Update: [rpintstopic]:(kegcop) applied.
2023-04-27T20:55:13Z V: Keg Cop Save: Saving configuration.
2023-04-27T20:55:13Z V: Keg Cop Save: Configuration saved.
2023-04-27T20:55:13Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:55:13Z V: MQTT: Connecting.
2023-04-27T20:55:21Z V: Disconnected from MQTT.
2023-04-27T20:55:21Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:55:21Z V: MQTT: Connecting.
2023-04-27T20:55:42Z V: Disconnected from MQTT.
2023-04-27T20:55:42Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:55:42Z V: MQTT: Connecting.
2023-04-27T20:56:04Z V: Disconnected from MQTT.
2023-04-27T20:56:04Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:56:04Z V: MQTT: Connecting.
2023-04-27T20:56:08Z V: KegScreen reporting not enabled, skipping (Temp Report).
2023-04-27T20:56:25Z V: Disconnected from MQTT.
2023-04-27T20:56:25Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:56:25Z V: MQTT: Connecting.
2023-04-27T20:56:48Z V: Disconnected from MQTT.
2023-04-27T20:56:48Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:56:48Z V: MQTT: Connecting.
2023-04-27T20:57:08Z V: KegScreen reporting not enabled, skipping (Temp Report).
2023-04-27T20:57:10Z V: Disconnected from MQTT.
2023-04-27T20:57:10Z V: MQTT: Initializing connection to broker: 192.168.1.165 on port: 1883
2023-04-27T20:57:10Z V: MQTT: Connecting.
2023-04-27T20:57:31Z V: Disconnected from MQTT.
I don't know what you are talking about! (I'm sure that developer thought he was being real cute)correcting the typo in the systemctl commands which had only one t in mosquitto
That's what it looks like. A good connection looks like this (which just came off my system):But the console log on Alpha 6 makes it look like it's not making the connection
2023-04-27T21:23:39Z V: MQTT: Initializing connection to broker: mule.local on port: 1883
2023-04-27T21:23:44Z V: MQTT: Resolved mDNS broker name: mule.local (10.0.0.6)
2023-04-27T21:23:47Z V: MQTT: Connecting.
2023-04-27T21:23:47Z N: MQTT: Connected to MQTT, session: false
1.2.1-Alpha.6 (mqtt) [552d0ab]?
Which version did you load?Hi, after few days of work, the taps were reseted to default
Someone also saw such problem?
Alfa 6Which version did you load?
Can i help to collect some logs, but tell me howOkay, good to know. Sad for me, but still good to know. I will have to do the nuclear option and keep a backup of that file. I just need to figure out how to detect the failure we are experiencing.
It might get fixed by moving to LittleFS, but it might just take a bunch of time to move to LittleFS and get no return on my investment.
You can tell me what sort of restart it was before it lost its mind. You should be able to see this in the /uptime.csvCan i help to collect some logs, but tell me how
https://docs.kegcop.com/en/main/api/index.htmlCan somebody please send me example how to use put method for taps?
I managed how to use get, but put i dont know how to use.
Ok, i will checkYou can tell me what sort of restart it was before it lost its mind. You should be able to see this in the /uptime.csv
I saw this documentation, trying to put, nothing happens
Use the serial log (or telnet), and you may see an error that gives you some information.I saw this documentation, trying to put, nothing happens
Somehow I'd missed that possibility earlier--that makes checking the logs a lot easier.or telnet
...and the MQTT password, and credentials for any other services you're publishing to. But agree that:Well, the only password you get there is the Keg Cop AP password.
the problem is letting someone on your WiFi
Yea please!I am considering leaving it, but making it configurable.
Hi,Type it in as your url like: http://kegcop.local/uptime.csv
Depending how you are set up it may display or just download it.
Are you Windows, Mac or Linux?
this is output of uptime.csvYou can tell me what sort of restart it was before it lost its mind. You should be able to see this in the /uptime.csv
You can either use Telnet (which will obviously not help if there is a crash), or you can plug in the same data cable you used to flash the software and use something like PuTTY to connect to the serial port.I am using windows, how i can collect serial log?
It would be helpful if this happens again for you to identify the approximate time.i think when the issue happened it was coldboot
.. which are troublesome but they do not look like they caused your issue.2023-04-25T10:56:16Z, ESP_RST_PANIC, START_WARMBOOT, 3467
2023-04-25T16:15:52Z, ESP_RST_PANIC, START_WARMBOOT, 19168
2023-04-25T16:49:55Z, ESP_RST_PANIC, START_WARMBOOT, 2029
2023-04-26T05:47:29Z, ESP_RST_PANIC, START_WARMBOOT, 46609
Thanks for the answer, is it possible to connect with putty with ip? What port i should use to connect? And what username and password?You can either use Telnet (which will obviously not help if there is a crash), or you can plug in the same data cable you used to flash the software and use something like PuTTY to connect to the serial port.
There are a large number of articles and videos on how to do this. The baud rate you will use is 115200.
It would be helpful if this happens again for you to identify the approximate time.
These are crashes:
.. which are troublesome but they do not look like they caused your issue.
This is a description of the start reason codes. The cold boot is where the board was powered off (unplugged.)
Yes, via Telnet (port 22.) There is no authentication.is it possible to connect with putty with ip? What port i should use to connect? And what username and password?
HiUse the serial log (or telnet), and you may see an error that gives you some information.
When a PUT is sent to the /api/v1/config/taps/ endpoint, it cycles the received payload through:
Since it never outputs any "Processing [%s] (%s) pair" debug, it never received any. What payload are you sending?
- handleTapPost()
- handleTapCal()
- handleSetCalMode()
You're over-doing it a little. The API takes one tap at a time. Here is the code I use to generate the payload:This is my JS code
Ok, so this is your data looks:You're over-doing it a little. The API takes one tap at a time. Here is the code I use to generate the payload:
https://github.com/lbussy/keg-cop/b...6e2f3a07382/data_source/settings.js#L603-L630
Yes.Ok, so this is your data looks:
That's for the Tap report (out), not posting data in.this is litle different from the documentation
according to documentation there should be imperial (true/false), and no tpalistioTap
Was there any difference in the log? That code is what I am using right now and it works. Are you also adding the secret to the headers?anyway, i tried to use the format above and also no result
The log is the same as beforeYes.
That's for the Tap report (out), not posting data in.
Was there any difference in the log? That code is what I am using right now and it works. Are you also adding the secret to the headers?
https://github.com/lbussy/keg-cop/b...6e2f3a07382/data_source/settings.js#L866-L874
ok,You need to get the secret, and add it to the header as above.
https://github.com/lbussy/keg-cop/b...ceab7c63890783f225092/data/kegcop_pre.js#L395
It's not exactly "secret," it's more to prevent strange things from happening with some security software that randomly does things. Rather than fix it in my environment, I decided to fix it in everyone's.
when i getting secret by this command http://kegcop.local/api/v1/info/secret/The log should show something now about the secret?
Enter your email address to join: