Any reason not to use card.location.track just to get 'heartbeat'

Is there any reason not to use card.location.track, just to utilize the heartbeat option to confirm the card is up and running? Power is not an issue. The card will be remote and not moving, but I thought it would be useful to have a ‘heartbeat’ every so often to know that things are ok.

Randy

1 Like

Hey @rksteeves,

You can do that, but if you don’t need the GPS/GNSS location you can achieve the same thing by using {"req":"hub.set","inbound":mins}, where min is how often you want the Notecard to check in with Notehub. When the sync occurs you’ll see a _session.qo event come through in Notehub.

TJ

1 Like

Thanks. I currently use “mode”:“continuous”. Will adding “inbound”:mins, have any side effects?

Oh, actually if you’re using "mode":"continuous" then the inbound will have no effect, as the Notecard is already maintaining a continuous Notehub connection and won’t send _session.qo events.

Could you still me a little more about what you’re going to use the heartbeat for?


One thing you might be interested in: we’re about to release a new firmware version of the Notecard (in the next week or so), and that release will have a way to get regular temperature and voltage readings from the Notecard.

This is how you’ll turn it on.

 {"req":"card.temp","minutes":<minutes-for-ping-interval>,"sync":true}

And this is how you can turn it off.

{"req":"card.temp","stop":true}

Depending on what you’re looking for, that might also give a ping that you could use.

TJ

1 Like

The project is to provide remote control and monitoring of a “cottage” we have north of the city. We turn the furnace and most power off when we are not there. I want to be able to turn the furnace on and monitor the temperature when I turn the furnace on. I will do this maybe once every few weeks in the winter, so I wanted a way to ensure that the notecard has not stopped working between the times I need to use the device for remote control. I am adding the power out project that someone came up with for power outages, but I was thinking about adding something that would confirm all was working which is why I thought of the “heartbeat”. I have another project (not blues), just a raspberry pi and I send a timestamp every hour that I check, I was hoping for something similar, but your new release might kill 2 birds with one stone as the cottage is not heated with the furnace off, it would be nice to know the notecard is still warm and cozy! What is the voltage source, is it the usb, or battery?

Hey @rksteeves,

Yeah this sounds like a great use case for card.temp :slightly_smiling_face: I’ll make a note to reach out when it’s live so you can try it out. In the meantime, it won’t hurt anything to use card.location.track to get the heartbeat you’re looking for—and each track.qo also has a temperature reading from the Notecard.

What is the voltage source, is it the usb, or battery?

The voltage is the voltage level the Notecard is receiving regardless of source. If the Notecard is getting USB power its value will be ~5V in every reading.

TJ

@rksteeves

Actually after doing some checking internally, I found out there’s a version of card.temp that you can use today.

{"req":"card.temp","seconds":3600}

That creates a _temp.qo Note that will be synced to Notehub at your outbound interval. For example if you run {"req":"hub.set","mode":"periodic","outbound":60} along with {"req":"card.temp","seconds":3600}, you should see _track.qo events coming into Notehub hourly.

TJ

Ok, looks like the card.temp solution works. Any chance the new functionality you mentioned has a date stamp contained as well. The current info is ok, but an added date stamp would be nice.

Thanks for your assistance.

Randy

Hey,

Sorry for getting back to this a bit late, but yep, the event will have a timestamp in the when field.

Screen Shot 2022-10-04 at 8.53.00 AM

TJ

Thanks, I tested this out over the weekend. I worked fine. How does this differ from what you indicated was a coming feature?

There are enhancements coming, like the ability to configure how often to send _temp.qo events based on battery levels.

But mostly I just didn’t realize we had this functionality already, so I learned something new :slightly_smiling_face:

TJ

1 Like