Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Clear all

[Solved / Archived] wittypi4 UWI strange output

8 Posts
3 Users
Posts: 0
Active Member Customer
Topic starter

on my pi zero / wittypi4.13, the UWI webinterface shows puzzled output:

WittiPi UWI garbled output

while show these values: output

What's wrong here?
Thanks, U.

This topic was modified 8 months ago 4 times by unosonic
Posted : 26/10/2023 4:27 pm
Posts: 0
Active Member Customer
Topic starter

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. 

This post was modified 8 months ago by unosonic
Posted : 26/10/2023 5:45 pm
Posts: 362
Member Admin

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?

Posted : 30/10/2023 8:08 am
Posts: 0
Active Member Customer
Topic starter

I am looking at it with a browser (firefox and chrome). The result is always empty and/or mixed up values, see attachment. how can I better debug the output of the webserver?

Posted : 30/10/2023 2:00 pm
Posts: 362
Member Admin

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.


Posted : 30/10/2023 5:43 pm
Posts: 0
Active Member Customer
Topic starter

I've tested the api "manually" with a little script:


. /home/pi/uwi/wittypi4/
. /home/pi/uwi/common/
. /home/pi/uwi/common/

echo -n "systime: "
echo -n "rtctime: "
echo -n "outvoltage: "
echo -n "outcurrent: "
echo -n "battery: "
echo -n "pulsing: "
echo -n "led duration: "
echo -n "dummyload: "


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. 





Posted : 30/10/2023 10:39 pm
Posts: 362
Member Admin

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.

Posted : 31/10/2023 9:14 am
Posts: 1
New Member Customer


I have the same problem as unosonic. delivers reasonable values, but UWI not.

Due to the fact, that both SW´s using the same physical connection, the I2C should be OK.

If SDA and SCL are not well-connected, should have the same problem, delivering wrong values.

Posted : 28/12/2023 12:34 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.