IoT Nostr Events

56 views
Skip to first unread message

Isaac Eiter

unread,
Jul 24, 2023, 9:51:06 PM7/24/23
to nostr-protocol
Hi,

I've been working on a bounty submitted by fiatjaf, in the process of which I've started working on a library that will make nostr note creation easier using Rust on a microcontroller (repo here), where there isn't access to the standard library.

I'm wondering if Kind 1 notes are the most appropriate choice for doing something like the weather station implementation? And also, I've been wondering what it would look like to include location info in tags vs in the actual note, and things like units etc. I'm not sure what best practices look like for where to put info and don't want to shove it all in the content field if putting tags in would make it easier to parse

William Casarin

unread,
Jul 27, 2023, 10:36:17 AM7/27/23
to Isaac Eiter, nostr-protocol, public...@w3.org
Hey Isaac,

On Mon, Jul 24, 2023 at 06:51:05PM -0700, Isaac Eiter wrote:
>Hi,
>
>I've been working on a bounty
><https://nostrbounties.com/b/naddr1qq9rzd3cxqunjwfsxqcsygpm7rrrljungc6q0tuh5hj7ue863q73qlheu4vywtzwhx42a7j9n5psgqqqw4rsgwpsta>
>submitted by fiatjaf, in the process of which I've started working on a
>library that will make nostr note creation easier using Rust on a
>microcontroller (repo here <https://github.com/isaac-asdf/nostr-nostd>),
>where there isn't access to the standard library.
>
>I'm wondering if Kind 1 notes are the most appropriate choice for doing
>something like the weather station implementation?

kind1 notes are not meant for application data. They are meant to be
micro-blogging, comments, and twitter-like applications. You should use
a custom note kind for weather data.

>And also, I've been wondering what it would look like to include
>location info in tags vs in the actual note, and things like units etc.

Anything you want humans to read should be in the contents, tags are for
applications. For example, you could add a geohash tag `g` (see NIP12)
for specifying the location. Then apps would be able to use your custom
kind for finding the weather near a certain location.

Cheers,
Will

Isaac Eiter

unread,
Jul 29, 2023, 1:16:09 PM7/29/23
to nostr-protocol
That makes sense, thanks Will! NIP16 specifies the range 1000 <= n < 10000 for regular events. What's the process for choosing an actual n? Should I draft a NIP specific to this?

William Casarin

unread,
Jul 29, 2023, 1:50:46 PM7/29/23
to Isaac Eiter, nostr-protocol
On Sat, Jul 29, 2023 at 10:16:09AM -0700, Isaac Eiter wrote:
>On Thursday, July 27, 2023 at 9:36:17 AM UTC-5 William Casarin wrote:
>> Anything you want humans to read should be in the contents, tags are for
>> applications. For example, you could add a geohash tag `g` (see NIP12)
>> for specifying the location. Then apps would be able to use your custom
>> kind for finding the weather near a certain location.
>>
>That makes sense, thanks Will! NIP16 specifies the range 1000 <= n < 10000
>for regular events. What's the process for choosing an actual n? Should I
>draft a NIP specific to this?

You can choose whatever you want. You should first see if there are any
defined in the NIPs repo though so you don't have collisions. It's also
a good idea to query the relays for that kind to see if anyone else is
using it.

Cheers,

Will

Melvin Carvalho

unread,
Jul 29, 2023, 1:52:55 PM7/29/23
to William Casarin, Isaac Eiter, nostr-protocol


so 29. 7. 2023 v 19:50 odesílatel William Casarin <jb...@jb55.com> napsal:
I tried to keep track of kinds here, but it's not hugely up to date


However I'll merge PRs if sent, until we get get a bot to automate submission
 

Cheers,

        Will

--
You received this message because you are subscribed to the Google Groups "nostr-protocol" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nostr-protoco...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nostr-protocol/wx2x5wxxckpv7ob6voobwgar6vvpxj2wvjd723kn6hbhj3h4mb%40dsulnuc6jcfd.
Reply all
Reply to author
Forward
0 new messages