Project

General

Profile

Logger Gadget

Added by danward79 almost 3 years ago

Hi,

I’ve noticed while I have been finding my way round housemon in it’s latest form, that the logger is placed in the rfdata folder.

Does this imply that the logger is for RF logging only? If not would it be better placed in a logger folder?

I have been working on a gadget for Belkin Wemo switches, and it was when I was looking at logging the status, that I noticed the above. I am using the logger to log the status of the Wemo output. So it looks like below, in the logs. Is this ok?

L 20:20:45.902 - OK 17 204 224 0 209 142 1 0 188 12
L 20:20:51.981 - OK 11 2 9 143
L 20:20:55.479 - OK 16 34 95 2 194 0 81
L 20:20:55.774 - Wemo 192.168.0.15:49153 Status 1

Cheers

Dan


Replies (3)

RE: Logger Gadget - Added by lightbulb almost 3 years ago

@danward76,

Logger takes a ‘directory’ parameter, and can be used in more than one circuit.
i.e You can log rfm12 data to say ‘rflogs’ folder and other things to other folders, like ‘wemologs’ etc.

Its best not to mix log lines across concerns as for instance, with the RF12DEMO data, this log can be used to ‘play back’ the log data
an another system, however, although not tested, I think the rf replay circuit may/would just ignore the !OK lines. However if your wemo log lines contained a legit OK… this would then be attempted to be re-interpreted by the playback (if you used it).

—lightbulb

RE: Logger Gadget - Added by danward79 almost 3 years ago

Hi,

I think your right about not mixing logs. I’ll change that.

My question was more around the position of the logger gadget in the structure of the app. It would appear to be in rfdata. This to me implies that it was/is intended for use in rf logging only. Is that correct?

If it is intended as a general logger, it would be better outside the rfdata folder and perhaps in a logger folder.

Does that make sense?

Cheers

Dan

RE: Logger Gadget - Added by lightbulb almost 3 years ago

@danward79,

Yes Dan, I do concur - as the logger is pretty ‘generic’ it should be relocated outside of ‘rf’ and even perhaps out of housemon, and put into say ‘jeebus’.
This way, if you built say an ardulogger style app, you dont need to bring in the rfdata from housemon.

Not withstanding the above, I simply think that its still where it is because no one has had time to relocate it.

I think it was placed there in the first place as jcw’s thrust for adding it was to get the rf stuff back and working from the 0.8 builds, and that focus was all about jeenodes/rf12demo/jeeboot etc.

logically - (from within a running app) it actually makes no difference where it is because its added the the flow registry as ‘Logger’, and takes its position as a ‘peer’ gadget.

—lightbulb

    (1-3/3)