Ribbit-Network / ribbit-network-frog-software

The software for the Ribbit Network Frog Sensor
https://www.ribbitnetwork.org/
MIT License
9 stars 8 forks source link

Local UI #22

Closed akhilgupta1093 closed 1 year ago

akhilgupta1093 commented 1 year ago

Connected to this issue: https://github.com/Ribbit-Network/ribbit-network-frog-software/issues/10

Create a local UI to monitor sensor status and present a bit more information about the sensor. UI looks like this--

Frog Sensor Status

Open to feedback!

keenanjohnson commented 1 year ago

Wow this is excellent! I'm traveling for the next few days, but will take a look soon! Thank you for the hardwork!

What features have you implemented here?

akhilgupta1093 commented 1 year ago

It shows the status of each of the sensors and the corresponding information if the sensor is online. At the bottom, it shows a little extra information like the wifi network, golioth host, and golioth user.

Seems like I developed this with a slightly stale version of the code, so I need to do some updates to make it work again!

One thing I'm figuring out is the mdns domain. Right now, the domain is espressif, so "espressif.local" routes to the sensor's webpage, but I'm figuring out how to change that.

akhilgupta1093 commented 1 year ago

Cool, updated! Should work now with the newest data model. I might delay getting frog.local to work to a different MR.

keenanjohnson commented 1 year ago

Great start @akhilgupta1093 ! I've confirmed this runs nicely on my Frog here:

image

I noticed a few small things I will comment on in the code to tweak before merging.

akhilgupta1093 commented 1 year ago

Thanks for the feedback! I'll take a look at it within a few days. @keenanjohnson I made it so the "last updated" time only updates when the values change, but I understand now that that's not super intuitive. Let me change it so the time updates every time we get new data.

akhilgupta1093 commented 1 year ago

@keenanjohnson @damz Made some changes and added some replies, please take a look when you get the chance, thanks!

keenanjohnson commented 1 year ago

Looks like all of my comments were addressed except for the submodule change. If you merge my commit from #26 into this branch, that should resolve that though.

Great work team!

akhilgupta1093 commented 1 year ago

@keenanjohnson @damz Updated based on your comments! One thing-- if possible, we can keep the websocket code for now and iterate to an api request with setInterval() like Damien suggested in the future.

keenanjohnson commented 1 year ago

I had selected web sockets in my original testing as a somewhat arbitrary choice originally in my example, but definitely happy to switch it later if that seems to be a better technical choice for this environment.

However, I'm in favor of merging this now which would allow us to have a first useful base to start iterating on.

keenanjohnson commented 1 year ago

Pending @damz opinion, I can do the merge whenever you are ready @akhilgupta1093 .

akhilgupta1093 commented 1 year ago

I'm good to merge once Damien gives the go ahead as well