A Plugin Rookie - Basics

Trying to figure out how to create plugins using examples and documentation on this site, but I am having hard time getting the basics.
I’d like to poll two variables (called “BatteryLevel” and “Distance”) from https://sequematic.com/variable-get/2019/ID/BatteryLevel and https://sequematic.com/variable-get/2019/ID/Distance
and display them on my Home Remote. (URLs shown here don’t work, I altered them for privacy reason).
The links work, but I can’t figure out how to include them in a script.
Can someone possibly show me a plugin that results in what I’m trying to do, or give me some pointers how to write the script?
I’ll be forever grateful.

I created a VirtualDevice with two variables: BatteryLevel and Distance. I can display these variables on a Label with device binding. So I realize that I may not need for plugin (although I’d like that variable to change as it changes at the URL source). I rephrase my question: How can I set a device variable with a URL?

You need to poll the result, ive not used Virtual Devices since the older versions of HR but it may still work. A simple HTTP plugin polling the 2 states and assiging to a device object would be the way I would do it. Check out Bills Plugin example to see how its done.

Yes, I’ll go through some sample plugins to get myself more familiar with them. I understand frustratingly little of their structure, and that’s holding me back.

I honestly opened the most basic example 50 times trying to understand it but without any coding experience it was double Dutch. I came across a JS for beginners by free codecamp on YouTube and I’ve never looked back.

1 Like