[Solved] wittypi4 UWI strange output
the links in my post are not working, however they are correct. please choose right-click -> open in new tab if want to take a look... also trying to attach the images.
strange thing is that some of the output of UWI is ok for a second (when using auto refresh), but then get overwritten again with nonsense values.
It is better to debug it on web browser and see what data is returned from UWI's mini web server.
Is there a scenario that can always reproduce this issue?
Considering UWI server gets these data from Witty Pi's software, which are read from I2C bus, there is rather big chance that SDA and SCL pins are not well connected.
Debugging the data rendered on web page needs technical skills, and it would be very difficult if you don't have experience before.
You may set Debug=1 in the uwi.conf configuration file, and then check uwi.log (they are all in the uwi directory), and hopefully you can find some useful information here.
I've tested the api "manually" with a little script:
#!/bin/bash . /home/pi/uwi/wittypi4/api.sh . /home/pi/uwi/common/common.sh . /home/pi/uwi/common/gpio-util.sh echo -n "systime: " api_get_sys_time echo -n "rtctime: " api_get_rtc_time echo -n "outvoltage: " api_get_output_voltage echo -n "outcurrent: " api_get_output_current echo -n "battery: " api_get_battery_status echo -n "pulsing: " api_get_pulsing_interval echo -n "led duration: " api_get_led_duration echo -n "dummyload: " api_get_dummy_load_duration
systime: 2023-10-30 22:30:16 CET rtctime: 2023-10-30 22:30:16 CET outvoltage: 5.24 outcurrent: 0.08 battery: discharging pulsing: 4 seconds led duration: 100 dummyload: 0
I've tested all api_get_* methods and they deliver correct output. Doesn't look like a connection problem to me..It looks like a web UI problem. Values are not sorted correctly into their respective rows/columns. Browser console doesn't show an error or malfunction either.
It is not likely to be a software bug, otherwise we should be able to reproduce it easily.
Many users have used UWI in their projects and I can't imagine they said nothing if this issue is also visible to them.