SBFSpot

Done, I think, just in time for the weekend.

When the SD card image has been rebuilt for 3B+ I’ll look at using MySQL instead of SQLite. The existing users of sbfspot.3 will probably be using SQLite.

“I think”…
I had to change something. Needs testing a little longer and I’ll report back :slight_smile:

Seems to be working. :star_struck:
https://emoncms.org/graph/embed?graphid=13478

How do I point the HTTP request to localhost within the Pi?

http://localhost usually works

On the odd chance localhost isn’t defined in the /etc/hosts file, http://127.0.0.1 will work.

It worked although took a moment to figure out, instead of https://emoncms.org/, I had to enter http://localhost/emoncms/

I asked because I saw reference to webhost defined as 127.0.1.1 somewhere in the docs, which didn’t work for clear reasons now.

I’ve my script sending to both local and remote with a tidy extra couple of lines of code.

If you can remember where you saw it, let us know so it can be corrected.

Thanks for the push.
I’d seen it a few times in the clipboard posts as

Host	emonpi emonpi (127.0.1.1)

and notice that localhost is in fact listed correctly as 127.0.0.1.

I thought I saw it in the docs, but twas’ probably a trick of the memory.

Been there, done that. :wink: :grin:

1 Like

I see that in your “clipboard copy” output in the “RPi running Hot” thread as well, is this another case of the “copy to clipboard” feature of the admin page not representing truth?
@danbates can you confirm that the clipboard and the screenshot differ for the “Host” row on your system?

[EDIT] github issue HERE, if confirmed, suggest adding this to the github issue as well…

Morning @Greebo
That’s from a random page I found searching the forums.

The clipboard info represents host, which could be named webhost I guess, for a bit more clarity.

Localhost is also listed on clipboard info and is correct.

What confused me is that I’m familiar with 127.0.0.1 being localhost, so when glanced at 127.0.1.1 in the admin page I assume “oh, emoncms uses a slightly different localhost” not reading the real local host further down as I had no reason to read the info further down the list at the time.

It’s also from one of your posts :slight_smile: So you pasted it from the “copy to clipboard” feature of your “Running hot” RPi. Can you check the web interface as well to see if it matches?

How about an .sh script to install SBF (with MariaSQL/MySQL settings) along with my script?

Also keen to make an emonHub entry that simply activates the python script. How would I go about this?

I think users should choose to install SBF separately from activating the script on emonHub.

I see in the emonHub directory a folder ‘examples’… I just want to rename it ‘scripts’… I feel like emonHub deserves next level treatment with some doco on creating scripts, and how to make a simple addition to emonHub config file to activate it.

A timing option in emonHub, like cron has, could be a nice feature too. Can I help to create this?

I’d like to update [this] (Learn | OpenEnergyMonitor) ? I’ve got the install to finish later this week so cross fingers :slight_smile:

I can see more clearly now how I was confused. ‘Server’ I consider to be the most important and is where I expected to find localhost, not knowing much about these things anyway.
The headings mysql, redis, mqtt I saw as less relevant, and although they contained the localhost information, because I’m not deep into what these things are (yet?) I just ignored them.

I just checked my EmonBase (low-write 9.8.31 | 2018.06.21) and it shows the same thing for “Server → Host”
Looks like a bug!

Your saying Host emonpi emonpi is meant to show 127.0.0.1?!

pi@emonpi(ro):~$ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:88:b2:99
          inet addr:192.168.20.22  Bcast:192.168.20.255  Mask:255.255.255.0
          inet6 addr: fe80::1402:419c:d0e7:841b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:49890 errors:0 dropped:287 overruns:0 frame:0
          TX packets:10586 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6075197 (5.7 MiB)  TX bytes:1774870 (1.6 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:42935992 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42935992 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3165986621 (2.9 GiB)  TX bytes:3165986621 (2.9 GiB)

I see no 127.0.1.1 there!

! :blush:
I think we’ve another github issue to make. I’ll set it up.