Month: December 2017

Logging OpenHAB’s Karaf Console To A File

With OpenHAB2, there is a console where information is displayed. You can copy/paste from the console to save information, but if you are reproducing an issue and expect something to be logged, you can also dump the information from the console into a text file. This is done by ssh’ing into the Karaf console and using tee to write output to a file. Since the SSH server is bound to 127.0.0.1, you will need to use localhost or 127.0.0.1. This cannot be done remotely without some sort of firewall port redirection or OpenHAB change

     ssh UserName@localhost -p 8101 | tee -a /tmp/test.txt

So what’s the username? Karaf uses karaf as the username and password. OpenHAB uses the users.properties file (./openhab2/userdata/etc) to store users. Our file has the user openhab. You can google the default password or put your own crypt string in there and know the password.

Now everything that comes across the Karaf console (system output and stuff you type) will be in the /tmp/test.txt file.

[root@fedora01 ~]# tail -f /tmp/test.txt

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.2.0-SNAPSHOT
                               Build #1114

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
 ID │ State    │ Lvl │ Version                │ Name
────┼──────────┼─────┼────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────────────────
 15 │ Active   │  80 │ 2.2.0.201712061711     │ ZWave Binding
 16 │ Active   │  80 │ 2.2.0.201712052342     │ ZigBee Binding
 17 │ Active   │  80 │ 5.3.1.201602281253     │ OSGi JAX-RS Connector
 18 │ Active   │  80 │ 2.4.5                  │ Jackson-annotations
 19 │ Active   │  80 │ 2.4.5                  │ Jackson-core
 20 │ Active   │  80 │ 2.4.5                  │ jackson-databind
 21 │ Active   │  80 │ 2.4.5                  │ Jackson-dataformat-XML
 22 │ Active   │  80 │ 2.4.5                  │ Jackson-dataformat-YAML
 23 │ Active   │  80 │ 2.4.5                  │ Jackson-module-JAXB-annotations
 24 │ Active   │  80 │ 2.7.0                  │ Gson
 25 │ Active   │  80 │ 18.0.0                 │ Guava: Google Core Libraries for Java
 26 │ Active   │  80 │ 3.0.0.v201312141243    │ Google Guice (No AOP)
 27 │ Active   │  80 │ 3.12.0.OH              │ nrjavaserial
 28 │ Active   │  80 │ 1.5.8                  │ swagger-annotations
 29 │ Active   │  80 │ 3.19.0.GA              │ Javassist
 31 │ Active   │  80 │ 3.5.2                  │ JmDNS
 34 │ Active   │  80 │ 1.1.0.Final            │ Bean Validation API
 36 │ Active   │  80 │ 2.0.1                  │ javax.ws.rs-api

Recognizing Jerusalem

I subscribed to the daily propaganda message from the White House. Some are actually informative, a lot are such over the top propaganda that they’re funny. This one … wow. Trump randomly announced that he recognizes Jerusalem as the capital of Israel?!

And the objections I see relate to how poorly this plays within the peace process (how neutral is the US if it’s declaring Israel in the right?), how Muslims will react, or how this will foment violence in already volatile regions. But how about how the move violates UN resolutions, and how acting contrary to UN resolutions undermines confidence that the US will follow through on any UN resolutions.

Now I assume Trump is completely unaware of the 70 years of UN resolutions that deem Israel’s use of the city as its capital a violation of international law. Say UN Security Council Resolution 478. I’m sure there are people at the White House who are aware of the city’s history, of the US’s abstentions on votes condemning Israeli occupation of East Jerusalem. He knows the popular story, and probably from Israel’s perspective. And he doesn’t care to know more. But this message proves to me that whatever “adults” Trump may manage to retain absolutely cannot control he man. Maybe military staff can prevent the most egregious offensive actions he might take, but no one can stop him from provoking others.

 

Everyone Is An Attorney At Heart?

Alternative Fact: From Trump Jr, attorney client privilege protects a conversation he had with his father because attorneys were present with both parties. Seriously.

Real Fact: FRE Rule 501 makes privilege a little difficult to figure out in federal cases. And privilege may not even apply to Congressional testimony. But considering attorney client privilege in general — Attorney client privilege restricts what the attorney can divulge. A reasonable protection, otherwise people wouldn’t be able to have frank conversations with their attorneys. There is precedent for the witness invoking privilege regarding a conversation they had with their attorney. But that doesn’t mean every utterance a lawyer hears instantaneously becomes top secret information that cannot be disclosed by either party.

First of all, the communication has to be for the purpose of obtaining legal advice. Iffy, but you might be able to sell that. Wanting to understand the legal ramifications of publicizing information.

Having a conversation with ones attorney in the presence of a third party can nullify the privilege. There’s a joint defense privilege which allows parties with common interest in the litigation to share information without waiving privilege. This applies for parties “sharing a common interest in the outcome of a particular claim” [United States v. LeCroy, 348 F. Supp. 2d 375, 381 (2004)]. Common interest in the outcome doesn’t mean “daddy cares what happens to me” or “I was working on daddy’s campaign when I did this”. It means a legal interest. So they’ll need to sell that there’s a joint defense going on (which admits that Trump Sr has some involvement in these events of which he claims ignorance).

Furthermore, there’s an exception to privilege when the communication is itself seeking to commit a crime or fraud. Even if Jr rang up his lawyer to discuss what false narrative should be presented under oath to Congress, that is not privileged communication.

There’s a legal principal that the parade of horrors shouldn’t be considered when adjudicating a case — essentially you need to ignore the ramifications of the order — but if the presence of a lawyer in a conversation makes the conversation privileged, wouldn’t a whole bunch of rich dudes just have a lawyer go with them everywhere?

The Santa Myth

Anya’s preschool is writing letters to Santa and otherwise celebrating the secular commercial iteration of Christmas. I just don’t get why this myth is perpetuated in any setting where you don’t know everyone’s financial situation and religious beliefs. Or even their views on commercialism and manufacturing practices.

Religious beliefs, to some degree, are obvious … it’s not a really big Sikh holiday, for instance. But even within the subset of Christian Americans … the secular version of Christmas can be offensive. And, hell, when I was a kid I thought Christmas absolutely sucked for Jesus – could you imagine how bad your birthday would be if it was celebrated by giving everyone ELSE presents?

Financial situation — the Santa story is that you won’t get what you want if you aren’t good. All the good behaviour in the world isn’t going to make a hundred bucks show up for a family with an empty bank account. Maybe their income and expenses mean the family barely subsists. Maybe an emergency sucked up the family’s spare money. If good behaviour means you get the toys you want, not getting the toys means you were bad. And that’s a terrible lesson to be conveying to young kids who are already disadvantaged due to financial circumstances.

Commercialism — this is the one that applies to me. I don’t like thing presents. Some are thoughtful and well used, but a lot of wastes of resources that take up space. I much prefer to plan a special experience for a celebration. Spend time together, do something unique, and you don’t have to find storage space for anything when you’re done. Telling my kid that presents should be tangible things — and that you can consult this toy flyer for ideas — is offensive. This isn’t to say Anya has never gotten a tangible present from us, but it’s part of an experience. Go ice skating and here are some ice skates.

Manufacturing — beyond the “be good or else”, Santa has elves that spend the year making all of the stuff that constitutes Christmas presents. Baring incredibly conscientious purchasing decisions that are not the norm … the elf is some kid in a third world country, victims of debt bondage … sure you got the toy for a pittance, but that’s because the labor didn’t even get a pittance. The image of cute elves singing and making toys in some gingerbread cottage looking room is not the reality of international manufacturing. Your kid may not be old enough to understand the socioeconomic ramifications of globalization … but that doesn’t mean you need to tell them elves make their toys.

Net Neutrality And Infrastructure Investments

Ajit Pai claims eliminating net neutrality will spur carriers to invest in network infrastructure. And he’s not exactly wrong – there’s equipment required to QOS traffic to allow companies who have paid access extortion to have their traffic move faster. There’s equipment required to block services for subscribers who haven’t opted to pay for, say, the “Social Media Bundle”. Billing systems will need to be updated, which means more work for developers.

Turning all of the public roadways over to private corporations and allowing them to elect to operate them as free or toll roadways would spur a lot of investment or hiring too. There’s not an automated toll collecting barricade at the end of my street today, or a human toll collector. Imprisoning half a percent of the entire US population spurred a lot of investment and hiring too – new prisons, guards, support staff.

Investment or hiring is not, eo ipso, a boon. Sure it’s great for the company whose products are being purchased. Sure it’s great for the person who just got a job. But for society some impetus for investment and hiring is outright detrimental.

Since Pai has outright stated that he cares naught for public opinion, I am appealing to my members of Congress to enact legislation to enact principals similar to the existing net neutrality regulations. That’s the point of checks and balances in government – the courts could deem the reclassification of Internet providers to be unconstitutional (it isn’t, so not gonna happen). Congress can pass laws changing that which the executive branch needs to enforce. The executive branch can veto the legislative net neutrality bill, but a 2/3 majority in Congress can override the veto. Courts can rule those laws unconstitutional (since the existing regulations have already passed legal challenges, that’s doubtful too).

Insurance And Medical Billing

 

There’s been a lot of talk about health care reform – years ago when the ACA was written, over the summer when the Republicans were working on a replacement bill, and again now that health care is trying to get slid in with tax changes. At no point has any politician addressed the real problems in health care costs: medical billing.

Scott went to his doctor for a routine checkup — a preventative service that is 100% covered by insurance. The doctor asked him if there’s anything else. He mentioned back pain, and his primary care physician referred him to a back pain specialist. We get the bill and he got billed for both the routine checkup and a medical appointment. Evidently, when the doctor asks if there’s anything else during a routine checkup … the answer is NO WAY IN HELL, otherwise you get billed a couple hundred bucks. Didn’t look at his back, didn’t prescribe any medication. Just said “yeah, you’ll need to see a specialist”.

The worst part is, in talking to the medical billing people, a doctor doesn’t know at what point a conversation will be deemed sufficiently in depth as to incur an additional code on the bill. There is absolutely no other situation where people would accept blindly accepting a service without knowing the charges involved. Could you imagine taking a University course and getting a bill at the end based on some financial department worker’s interpretation of how much interaction you had with faculty and educational resources for the duration of the class? A restaurant meal where the bill comes six months later and is based on the time you spent at the table, each interaction with a server, you chatted for a few minutes with the guy who brought the beer and that’s an extra fee because you discussed the IBU of their different offerings. Could have just said hoppy bitter flavor, but you used a technical term and incurred a consulting fee. Hell, you take your car in for service and they’ll provide an estimate before performing maintenance.

What I don’t understand is why we accept this billing model for medical services. I saw someone on SharkTank a week or two ago selling at-home medical testing kits. Her sales pitch wasn’t just the convenience (or privacy) of testing for medical problems at home. It was that there was a known cost for each test. You want to know your cholesterol levels? That’s 80$. Thyroid problem? Measuring TSH, TPO, free T3, and free T4 levels costs 150$. You pay in advance, you know how much it costs, and you don’t get a bill thirteen months later for services you never consented to receive.

What recourse do you have when the Cleveland Clinic screws up your appointment and you end up with expensive bills you didn’t anticipate receiving? Or a quick comment to a doctor garners another 150$ charge? Not a lot. Leave messages for their ombudsman who never returns calls. Pay the bill and appeal to the credit card company? Take them to small claims court?