Back to Smartcitizen.me

API outputs

I notice that the API is showing that my fully charged battery is flat: “bat”:0,

I suspect that this is just the way it’s been coded and that I should be seeing “bat”:100, rather than 0. Can that be changed?

Hi,
I’ve tested with our kit n°333 and there is no problem :

http://api.smartcitizen.me/v0.0.1/6e0428e19cf2bff1a9c05d14d0400bf4/lastpost.json
http://smartcitizen.me/devices/view/333

Could you give us your device id or a link to it that we can check it more in details ?
thanks
Alex

Alex it’s device 476.

I looked this morning as it’s been plugged in all night and I did have bat:100. However, when I turned the power off it showed bat:0 and did for a while. I can’t get today’s data out of the api for some reason but I guess you’ll be able to. When you do, please look for a temperature spike at about the same time as the battery goes to zero.

Now, when I turn the power back on, I go from bat:98.2 to bat:0 again. I guess that at some point it’ll go to bat:100

Hi Cie
I’ve checked now both api and website and your battery is fully charged all the time.
It’s seems the latest firmware update fixed the problem.
Could you confirm ?

Alex I’ve left it plugged in for days now, so it is registering fully charged. But I’ve just unplugged it, and I’ll gather some data today so that you can see what I mean.

Here you are https://www.dropbox.com/s/sk6qwn4bp6ml66w/476battery.json

This shows the battery discharging, then showing bat:0 whilst it charges, then bat:100 once it’s charged.

I can’t connect to my serial port right now, but I’m sure that it shows levels whilst it’s being charged. Anyway, you have the data :slight_smile:

Thanks for testing it. I can clearly see the error.
I’ll check the data conversion to see if there is any problem from the server side. But I’m afraid the problem come from the SCK (software or hardware, I don’t know). If you can access the serial port, could you copy past what the debug say?
best

Whilst charging the serial port shows:

updates = 1
Posted to Server!
Old connection active. Closing…
SCK Sleeping


Temperature: 026008 C RAW
Humidity: 35160 % RAW
Light: 00000783 lx
Battery: 000 %
Solar Panel: 0000000000 V
Carbon Monxide: 0000230193 kOhm
Nitrogen Dioxide: 46.653 kOhm
Noise: 00000013 mV
Wifi Spots: 1
UTC: 2014-2-19 19:41:19


So it does look to be the SCK that needs looking at.