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

[Solved / Archived] wittypi4 UWI strange output

8 Posts
3 Users
0 Likes
322 Views
(@unosonic)
Posts: 0
Active Member Customer
Topic starter
 

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

WittiPi UWI garbled output

while wittPi.sh show these values:

wittyPi.sh 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
(@unosonic)
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
(@admin)
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
(@unosonic)
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?

1698670858-Screenshot-2023-10-30-at-13-58-03-Witty-Pi-4.png
 
Posted : 30/10/2023 2:00 pm
(@admin)
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
(@unosonic)
Posts: 0
Active Member Customer
Topic starter
 

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

 output:

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
(@admin)
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
 QPSK
(@juergen-kuhnert)
Posts: 1
New Member Customer
 

Hello,

I have the same problem as unosonic.

WittyPi.sh 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, wittyPi.sh 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.