Categories
Uncategorised

HSBNE Inc. is not a nice place pt 3 | Hiding the truth, harming volunteers and the post mortem

This is my third, and hopefully final blog post in the series “HSBNE Inc. is not a nice place“. This post is centered around key events relating to the demise of HSBNE. You can read part 1 and part 2 for more context, but this one is mostly self contained.

Context

HSBNE Inc. has a reputation among past members and visitors for harassment, toxic personalities, taking advantage of volunteers, safety problems, questionable executive conduct, and most recently a community leaving in droves. Important disclosure: I quit HSBNE and started an alternative makerspace about 2 years ago. Part 1 has the details.

Back in 2016 I visited the HSBNE Inc. space in Hamilton on a Tuesday open night. It was such an impactful night that I still remember exactly how I got there and who I spoke to. I loved the innovation, the community, and being in a room full of people with unimaginable skill and the generosity to share it. I’m still very good friends with people I met for the first time that night. I felt like I had finally “found my people”. The HSBNE community was instrumental in shaping who I am and what I do today.

However, I want to be very clear that HSBNE is not like this anymore.

My volunteer journey

After a few months I became a very involved volunteer – maintaining the 3D printers, laser cutter etc.; running inductions; and working on the infrastructure. There were also so many cool and quirky home-brew infrastructure projects. This led me to re-write all of our disconnected systems and combine their features into a new open source project called Member Matters.

Eventually I would even sit on the executive committee as the Treasurer, and become the team leader for infrastructure. I wrote policy, climbed through the roof to pull cables, drove the trailer to the tip, etc. There was no part of HSBNE that I didn’t contribute to in some way.

Culture Working Group

In late 2017, a member started a serious discussion which led to a “Culture Working Group”. Problems relating to culture and behaviour were raised and discussed with the intent on fixing them. The forum thread is here. I thought this raised important issues, but in hindsight, nothing really changed.

This was a major turning point. Things could and should have changed, but didn’t. HSBNE should have evaluated every issue that surfaced in that working group, and created an actionable plan with accountable people.

Membership stagnated and started declining

Years went by, HSBNE grew a bit, but struggled to retain new members. Eventually membership numbers stagnated and started slipping. This was a symptom of the endless systemic issues that had been building up, most of which I explained in part 1. We overhauled the sign up process, improved tool documentation/accessibility, and tried to bring the community back together.

This was another major turning point. Things could and should have changed, but didn’t. Not enough was done to fix the problems with tool accessibility, culture, and community.

The story of Mike Ando

Few people have contributed more than Mike in their 8 years of volunteering. Yet, HSBNE ignored and mistreated them, and they ended up exhausting all avenues for support/dispute resolution. Mike felt they had no choice but to raise a complaint with the Human Rights Commission. Mike told their story here, and their partner’s here. In response to this complaint, Mike received a 3 month ban issued by the HSBNE executive committee. Instead of offering support to someone who clearly needed it, they kicked him while he was down and removed him from a support network.

I’m sick of people hiding their actions behind “the executive” so I’m naming them (verify here). People who were on the executive committee at the time this ban was issued include Joshua Hogendorn, Murray Wayper, Eris Ryan, Dave Seff and Ryan Kirkpatrick. A majority of those people supported banning someone in retaliation to them filing a discrimination complaint. Let that sink in.

This was a major inflection point for HSBNE and the start of the downfall. It demonstrated without question, that the executive committee were only concerned with protecting HSBNE and will actively harm volunteers and cover up anything to do so.

The story of Jaimyn Mayer (me)

Now you understand how and why I joined HSBNE, and that HSBNE used to mean everything to me. That is why it took reaching breaking point before I decided to leave. HSBNE was starting to harm me and affected my relationship. I was stressed, anxious and angry all of the time due to the toxic and broken culture. I made what was one of the most significant decisions of my life at that point and quit HSBNE.

At the same time, I missed the early days of HSBNE so much that I started an alternative makerspace (BMS) with a focus on recreating that safe space and friendly community. I bootstrapped this as a social enterprise, and we later transitioned into a not for profit structure.

When I announced my resignation to the existing HSBNE membership, I did so by raising a discussion item at a general meeting. I included a list of all the problems I identified, and called on the membership to fix them. The organisation is legally required to keep accurate records of all matters discussed at a general meeting. Guess what? Joshua Hogendorn later unlisted the forum thread of my discussion items so that it’s hidden and can’t be searched for, and nothing more than “Jaimyn resigned” ever made it into the meeting minutes. More examples of HSBNE hiding stuff that makes them look bad instead of acknowledging and fixing the problems.

The final proposal I raised at that meeting would have required all people who nominate for an executive committee position to disclose any bans or infractions they received at HSBNE within the last 5 years. As if my point about them hiding unfavourable things wasn’t proven enough already, that motion failed by just a few votes. Most of the exec voted against it, allowing people with a history of harassment etc. to continue serving on the executive committee without disclosing that.

After my resignation, the executive committee “invited” me to mediation. The very strong implication was that if I didn’t go they’d cancel my membership. I obliged as I still wanted to stay in touch with my friends and see if HSBNE ever improves things. Unfortunately, their purported mediation was a thinly veiled attempt to silence me.

Another critic of hsbne silenced (me)

By default, mediation discussions are meant to be kept confidential. Due to this exec’s history of hiding things and silencing people, I asked multiple times to make our agreement public. They refused every time.

Since they failed to uphold parts of their agreement, the agreement was broken and I am sharing some of the things I was forced to agree to under threat of having membership cancelled. The non-exhaustive list includes:

  • The fact that mediation had happened was a secret.
  • What was discussed during mediation was a secret.
  • I was not allowed to talk to any current or past hsbne member about HSBNE.
  • I was not allowed to visit hsbne during open nights and similar.
  • I was not allowed to participate in any sort of working bees or social events at hsbne.
  • I was not allowed to participate in any meeting or online voting/discussion threads.
  • I was not allowed to say any negative thing about hsbne even if it were objectively and demonstrably true.
  • Any negative thing I had ever written about HSBNE had to be removed and deleted.
  • I had zero chances and the first instance of a breach of this agreement would result in immediate membership cancellation.

Conclusion

It’s impossible to contain all the nuance and context needed to understand the full picture of what happened over the last 10+ years at HSBNE Inc. but this was an attempt to capture some of it from my perspective. What was once an amazing community is now gone forever due to the actions of a few. They have been homeless for months now (with all their tools in storage) and have less than 20% the members they had at their peak.

They haven’t started formally shutting down yet, but I think it’s unlikely they’ll ever recover. Even if they do, things will never be the same after the years of toxic behaviour, culture of secrecy, and the silencing of anyone who dares criticise them. If you want your [hacker/maker]space to thrive then don’t be like hsbne. Focus heavily on facilitating a friendly and safe culture and the rest will follow.

HSBNE is not a safe space. HSBNE causes harm. HSBNE will go to great lengths to cover this up. You should not go there.

Categories
Uncategorised

HSBNE Inc. is not a nice place pt 2 | Retaliation against public complaints and exec conduct

This is “part 2” (which I hadn’t planned on writing until recent events). Please read part 1 first for important context.

Removing access and not telling people

HSBNE has historically had a bad reputation for removing volunteer’s access to different resources without properly documenting why or even letting them know (even I’m guilty of this). The executive implemented a Privileged Access policy to stop this happening.

Several people have had access to HSBNE resources removed and were not told about it. I don’t really have an issue with the removal itself, as we’d stepped down from volunteer duties. What I do take issue with, is that we weren’t told. This is a clear breach of the executive’s own policy. I spent nearly 4 years and thousands of hours building the membership portal that HSBNE relies on and I even offered to help ensure a smooth transition after I left. I find it extremely disrespectful to not even get a “hey we removed your access, let us know if you have any concerns”.

You might think this is a minor thing to complain about, but is another example of the executive doing what they want and treating volunteers badly. The way I found this out is what frustrates me most. I tried to update the HSBNE member portal as I had just fixed a major bug due to a change canvas made in their API. Going around and removing access to someone who’s volunteering their time is a great way to burn bridges.

Relevant excerpt from the Privileged Access policy:

There is no requirement for notification prior to access removal. However, it’s best practice in non hostile situations to notify beforehand. Notification after the fact must happen within 48 hours.

Not only was I not told before hand (please someone reach out if they think I’ve acted “hostile” towards HSBNE since resigning), but the first time I noticed I had lost access to some resources was well over 48 hours ago.

Accusations of data theft/misuse

Last night both myself and another infrastructure volunteer received an email letting us know that our access was being reviewed/removed (great, but more than 48 hours after it started to happen). The wording in those emails did not match up with their actions and appear to be a way to justify breaching their access policy.

That alone was bad enough, but in the email I received (relevant excerpts below) the executive committee made direct implications that I had, or was going to, misuse HSBNE information/data.

You will be aware you also have access to personal information of HSBNE membership, Security information (surveillance, access systems, logs, and other historic data), documents and documentation, software, passwords, and access codes. We ask that you help us ensure a smooth transition off these systems and that any deactivation of your credentials, accounts or access systems do not jeopardise the operation of HSBNE public and private systems and data operations.

HSBNE requires that you provide assurance that any personal information of members, private documents of the organisation or any privileged information of HSBNE both printed and electronic are returned or destroyed. HSBNE information is not to be retained by yourself nor provided to any organisation or entity without written authorisation of the owner of the information and by HSBNE executive. 

HSBNE Executive, 21st October, 2021 via email

This is grossly inappropriate and offensive, given that I have dedicated thousands of hours, and 5 years of my life contributing to HSBNE to make it better. I was honestly just shocked that they thought it was appropriate to make allegations like these (even if via implication). This made me feel awful, and made me question if I had actually done anything wrong.

Executive retaliation after publicly criticising their actions

No other volunteer who has recently resigned received an email with implications like these despite having access to similar information. In my last blog post, I raised very serious concerns with the conduct of the current executive and the way that Mike was treated. They banned Mike for 3 months after he made a discrimination and harassment complaint to the Human Rights Commission.

Is this another retaliation for someone publicly criticising the executive? I would hope not, but from my perspective it certainly seems like it.

Why have the executive acted like this after my efforts to make this a smooth transition?

Recently I spent nearly an hour on a phone call with the treasurer to help fix/explain some things that he didn’t understand. I also spent hours fixing bugs that I found out about, and fixing the access system when it went down yesterday (which was made more difficult as access to some resources had been removed without telling me). I didn’t have to do any of this, but chose to for a smooth transition for HSBNE members.

After doing all this, my access rights were pulled without being told until well after the fact, then I get an email asking me to confirm that I wouldn’t misuse HSBNE privileged data/documents? This was like a kick in the guts and an attack on my personal character that I was not expecting. It feels like the exec got what they needed from me then gave me the boot.

HSBNE executive, consider this bridge burned. After being treated this way I refuse to engage any further with the current executive committee. I am immediately ceasing all further interactions with HSBNE operations (other than occasional personal use of HSBNE facilities when needed) and will not be volunteering another minute of my time.

I tried to do the right thing by HSBNE, but this has not happened the other way around which seems to be a very common theme. I am very disappointed at some specific members of the exec that seem to support this behaviour as I thought they were friends.

EDIT: I’m not some lone, disgruntled member

For a similar story by another member click here, one by their partner, click here, and a relevant follow up comment click here.

Categories
Uncategorised

HSBNE Inc. is not a nice place part 1 | Harassment & toxic culture

Update: Unfortunately I had to write a part 2 😞. You can view it here. You should read it after this post.


I write this with great sadness in my heart, as I used to care deeply about HSBNE Inc. Unfortunately, that is no longer the case. As of today, I am officially resigning from volunteering at HSBNE and launching my own makerspace. I have included an FAQ at the end with how this will affect HSBNE.

Myself, and several other members that I shared this post with, feel that HSBNE is no longer a welcoming place, and is now dysfunctional. I am of the opinion that the group has passed the point of being able to turn things around, and will continue on a downward trajectory without a drastic correction.

For context, I have been a HSBNE member for over 5 years now. I developed our membership portal, billing, and access system software, have served on the executive and infrastructure committees, have fixed and maintained machines, and have volunteered for thousands of hours. My aim with this post is to publicly bring these systemic issues to light, in order to raise awareness. The public part is important, because several attempts by different people to resolve these issues internally have failed. I’d like to give HSBNE one last chance to improve, but to be honest, I don’t feel confident that this will ever happen.

With this disappointing realisation, I didn’t want to lose what was once an amazing community, an amazing place to make, and a truly unique group of people. I have been working hard over the last few months and am pleased to announce that I have formed Brisbane Makerspace. Brisbane Makerspace (BMS) is a community makerspace centred around digital fabrication, electronics, and arts & crafts. We have 3D printers, a laser cutter, and tonnes of other tools/machines. Brisbane Makerspace is a Pty Ltd company run by me, with assistance from a handful of current/ex HSBNE members. Our focus is on providing a high quality work space free from the systemic problems of HSBNE; professionally maintained and documented tools; running regular classes; and running inductions on demand with on site staff

There are five main reasons I feel HSBNE is no longer a welcoming place. This list is not exhaustive, and is my own personal opinion. Feel free to disagree, but this is how I (and several others) feel.

EDIT: The executive have now breached their own policy they implemented and removed mine and another infrastructure volunteer’s admin access to our membership portal (which I spent 3 years developing) without notifying us. This is extremely rude considering I have offered to help with any problems that pop up after I leave and recently had a long phone conversation with the treasurer to answer some questions/issues he had. Another example of this executive doing what they want and acting inapropriately.

#1 Sexual Harassment

There are allegations of historical sexual harassment involving a current member of the executive committee, and others.

After conducting my own investigation, I am confident that at least some of these allegations can be substantiated. From what I could find out, the allegations involved physically touching other people or invading the personal space without their consent and involved multiple incidents over a period of time. Out of respect for the victims, I will not go into further detail.

I was shocked at Mike Ando’s claims that complaints of this nature would not be dealt with, and initially disagreed that this would happen. However, the executive didn’t release a statement after Mike posted his claims, banned him for filing a complaint with the Human Rights Commission, and didn’t notify members of the ban (which is standard practice). They also ignored a member who asked for a statement (although since raising this they got one). They claim this is because they were overworked and time poor. Regardless of the reasoning, the end result is the same – someone with serious allegations/complaints was silenced and hidden from public view.

I also think it’s extremely inappropriate to ban Mike for 3 months simply for filing a complaint. If he was threatening to file vague “legal” complaints with little reason to suspect he’d follow through, or the human rights commissions determined it was frivolous, it would be different. By banning him, the current executive committee have decided that his complaint to the Human Rights Commission was invalid.

After investigating, it seems that previous executive committees have mostly done a good job at dealing with incidents at the time it was reported to them. However, some of the ones I’ve been made aware of were dealt with in private and kept fairly hidden. This has allowed other inappropriate behaviour to continue and some who were involved are still active in the community without people knowing about their past.

I wouldn’t go so far as to say HSBNE “has a reputation for providing safe harbour to sexual predators“, but I agree with his point that “no action will be taken by the HSBNE executives to protect victims of these (sexual harassment) crimes“. Simply banning someone for a short while, or issuing them with an infraction does little to convince people that they won’t be harassed if they come back. HSBNE needs to take a bold stance on this and issue a public statement acknowledging past wrongdoing, and actively work towards policy and other solutions to make sure inappropriate behaviour never happens again.

#2 Conflict and Toxic Personalities

HSBNE has a long history of infighting and conflict between members. At one point we even ran a “culture working group” which failed to enact any meaningful change. HSBNE has an “us vs them” culture between different cliques/cause groups, and toxic personalities and behaviour (including sexism and trivialising gender identities) regularly goes unchecked.

When I first joined HSBNE, we operated a “cause” system. Each “cause” (e.g. metal shop or electronics) had its own budget, membership, and rules. This created a toxic “us vs them” culture in which most causes operated with the mindset that for them to gain, another cause had to lose. Purchase proposals were often voted down by members of other causes, as one example. This has gotten better recently, but a lot of deeply rooted cultural problems stem from this legacy system, and it drove away a lot of members.

For at least as long as I have been a member, toxic personalities have been “contributing” to HSBNE. There is a membership vetting process which aims to stop this, but this process is ineffective and seldom used. I often class these toxic personalities as a “missing stair” and they cause a lot of conflict within the group. HSBNE takes months to remove these members (if at all), allowing their negative and toxic personalities to drain the whole group.

In addition, there are several members who have a history of making sexist remarks, or treating women poorly. I’ve also personally witnessed several long term members not only making fun of gender identities, but doing so in front of a non-binary member who later resigned.

#2b Toxic Personalities Have Driven Away Most Volunteers

Toxic personalities (in particular a member of the current executive committee) have driven away nearly every long term member who was an active volunteer in the group. This person in particular pushes past reasonable boundaries in trying to make people volunteer. They use up all of someone’s good will and willingness to volunteer, to further their own agenda of “improving” HSBNE in the way they want.

This sort of behaviour is extremely damaging to the mental health of those on the receiving end and leads to severe burn out. As a direct result of this behaviour, several long term volunteers (including myself) have now stopped contributing to HSBNE. Good leadership is different to manipulating and forcing people to work on stuff they don’t want to.

#3 Tool Accessibility, Documentation and Maintenance 

HSBNE promises to people that once they sign up they can use all of our tools and machines. This is not true. Even if a member hangs around long enough to sign up, complete the site induction, then get inducted on the machines they want to use (which often takes weeks), a lot of our machines are not accessible, or just don’t work.

Take for example the laser cutter in digifab. (disclaimer: I was a laser supervisor until today). This machine is one of the worst offenders. Until very recently, it was vigorously gate kept by a select few “laser supervisors”, and less than 5 people were allowed to use it unsupervised. There is still no clear path for new members to move through in order to gain unsupervised access to the machine.

A lot of other machines just straight up don’t work properly or have little to no documentation. This makes it impossible for members to learn how to use it, read about how to safely operate it, or check on its current status/quirks of use. A lot of machines are also hidden behind complicated startup or operation procedures that again, aren’t documented.

HSBNE has been strongly focused on buying new tools/machinery instead of improving our current ones. Take for example the yag laser cutter and the new CNC router. These are amazing capable machines, but have taken months to set up, and have decimated HSBNE resources (both monetarily and volunteer time) This focus on new “toys” has led to HSBNE becoming a graveyard of poorly maintained and badly (if at all) documented tools and machines. It often takes weeks/months for machinery to be repaired because everyone is so focused on buying and playing with new stuff.

I have tried several times to coordinate and help the different areas get a label on every single machine, and to generate a list of all machines we have on site. I’ve never even been able to get this, absolutely bare minimum, level of documentation complete.

#4 Executive Accountability and Conduct

I acknowledge that being elected to the executive committee is a large commitment and a lot work; I have firsthand experience being the treasurer. However, the current executive have not been accountable for their actions (or lack thereof). They have failed to act upon several significant problems that have been bought to their attention and are ignoring issues raised to them by members.

On several occasions this year, myself and other members have directly raised concerns about toxic personalities, serious posts being held in our forum’s moderation queue (which were auto-deleted due to them being ignored), and Mike Ando’s blog postabout sexual harassment allegations. Myself and other members have not received a response to these issues which is quite frankly, unacceptable. I’ve stopped bothering to raise issues with the executive, as I don’t see a point any more.

Standard practice dictates the executive should post notifications of bans issued to a private section in our membership forum. This is in the interests of transparency and to ensure members are aware of people who should not be on site. Since early this year, there have been no publicly announced bans that I can find, and I know of at least one occurring in that time (possibly others). Edit: after raising this publicly the backlog was posted.

I was a HSBNE moderator, and leader of the infrastructure cause. In response to an individual leaking conversations from a private group chat, and the executive not taking action, I chose to remove them. In response, the executive unilaterally removed moderator privileges from all current moderators without consulting them or the membership. They also enacted a sweeping moderation policy that requires previous moderators to apply to regain their lost privileges and follow an overcomplicated policy. As far as I am aware, not a single person has been given their moderator privileges back.

#5 The Community is Dead

This one is hard to explain, and difficult to quantify. However, in the last few months the HSBNE community has completely died. There’s been a steep decline in engagement, and there’s no longer a “community feel”. Conversation is sparse and shallow, and we’ve lost the “buzz” on Tuesday open nights.

I don’t know why exactly, but I suspect a combination of the issues I identified above. This is a real shame, as this was by far the most valuable (and my favourite) part of HSBNE. Several members I’ve spoken to have agreed with me, and have noticed drastic changes.

Out of interest, I pulled the HSBNE membership forum engagement stats going all the way back to 2017 (back when I had just joined). Two of the key metrics I looked at have at least halved since then. The red line is a trend line generated by Google Sheets.

Conclusion

Recently I have not been enjoying my time at HSBNE, and have been asking myself why am I spending so much time doing something I don’t enjoy anymore? I used to love hanging out with the great community, helping people make amazing things, and volunteering to fix and improve things. However, HSBNE is no longer welcoming, and I can’t in good faith recommend it to people anymore without going through the long list of issues.

It saddens me to come to this realisation, but I feel that HSBNE is on an almost certain path to “implosion”. This is due to internal conflict, toxic personalities, historical sexual harassment allegations, poor tool accessibility/documentation, and a current executive committee seemingly determined to ignore issues raised with them and refuse to deal with problems. All of this has resulted in a community that has lost it’s spark, and has long term members leaving in droves.

I really hope HSBNE gets back on track, and if it ever does, I’ll gladly come back with my volunteer hat on. Until that happens though, I’m out.

Update: Unfortunately I had to write a part 2 😞. You can view it here.

Update: I’m not some lone, disgruntled member

For a similar story by another member click here, one by their partner, click here, and a relevant follow up comment click here.

FAQ

What does this mean for HSBNE’s member portal (MemberMatters)?

Some time ago, I split this out into its own open source organisation on GitHub. Several other makerspaces are now using, or experimenting with it. Brisbane Makerspace also needs a member portal, so I will continue to actively develop and maintain it, there will just be less focus on HSBNE specific features. It will be up to HSBNE to upgrade and maintain their own instance.

What does this mean for HSBNE’s infrastructure?

I will no longer be maintaining or upgrading HSBNE infrastructure. This includes networking equipment, interlocks, door controllers, the zigbee system, and cloud/onsite servers. I feel these are mostly documented well enough on our wiki for someone else to take over, and will remain on discord to answer questions if necessary.

What about the new generation of access control hardware you’re working on?

HSBNE currently has a large fleet of sonoff based access control hardware. They also have a stockpile of parts to make many more. I’d suggest HSBNE continue to use these for the time being. I’m continuing to work on the new generation of access control hardware at my own pace, and will be using it for Brisbane Makerspace. Once the design and firmware are finalised in the next few weeks, I’ll be publishing it all under an open source license. Once everything is published, I’d encourage HSBNE to build some and trial them, slowly transitioning to them over time.

Are you terminating your membership?

No. I will remain a paid up and active member of HSBNE in order to stay in touch with people, and keep track of the goings on. I have decided to generally refrain from participating in discussions and voting items however, as I now have a conflict of interest.

I have other question(s), how do I contact you?

If it’s to do with the content of this blog post, or anything else to do with HSBNE, please message me on Discord. If you’re going to write a large message, or it’s about anything else, feel free to send me an email to hello at jaimyn.dev.

Categories
Uncategorised

How to add OVMS (open vehicles) to Home Assistant

OVMS (Open Vehicles) is a great hardware module that connects to my Nissan LEAF and allows me to perform remote functions like turning on the climate control, checking charge status, range, etc. I’m also a big fan of Home Assistant, and have almost everything in my house hooked up to it. There is no official (or unofficial) integration for OVMS to Home Assistant. However, OVMS has a HTTP API, and Home Assistant supports generic RESTful sensors.

Read on to find out how to hook up your OVMS module to Home Assistant!

Getting Started

Firstly, you’ll need your OVMS module to be hooked up, configured correctly, and working with the default OVMS app. Once your app is connected to your OVMS module and you can see live data coming through, it’s time to move on.

Generating an API Token

You’ll need to generate an API Token from the openvehicles.com API. To do this, you’ll need to open up the Terminal on your computer. Once there, type the command below and hit enter, replacing <USERNAME> and <PASSWORD> with your OVMS username/password that you use to login to openvehicles.com.

curl --location --request POST 'https://api.openvehicles.com:6869/api/token?username=<USERNAME>&password=<PASSWORD>'

After you run that command, you will see an output on your screen similar to the one below. You’ll need to copy your API Token (highlighted in bold) to a safe place.

{"application":"notspecified","owner":"<YOUR_USERNAME>","permit":"auth","purpose":"notspecified","token":"RiVINShnbS0wNG5tJUlNYUZJbUNeR1NcYSdwM0l7aDpWOyE2QkQxSCwrLWh8Ow"}

Find your list of metrics

Now you need to find a list of all the metrics that you want available in home assistant. There are 3 main collections of metrics that the OVMS API makes available. These are Status, Charging, and Location. If you have a 2012 era Nissan LEAF like I do, skip below and copy my config file. Otherwise, read on.

To find all of the available metrics, run the following commands in your terminal. Make a note of all the metrics that you want available in Home Assistant. Be sure to replace <USERNAME> with your username, <VEHICLE_ID> with your OVMS vehicle ID, and <YOUR_API_TOKEN> with the token you retrieved earlier.

Status

curl --location --request GET 'https://api.openvehicles.com:6869/api/status/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_TOKEN>'

Charging

curl --location --request GET 'https://api.openvehicles.com:6869/api/charge/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_TOKEN>'

Location

curl --location --request GET 'https://api.openvehicles.com:6869/api/charge/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_TOKEN>'

Home Assistant Configuration

Now you’ll need to configure Home Assistant to retrieve data from the OVMS API and pull out the metrics that you want. Add a configuration to your configuration.yaml in the sensor section like below. You can update the scan_interval to whatever you’d like, but be considerate and don’t go lower than when your OVMS sends updates, or at a minimum every 60 seconds.

sensor:
  - platform: rest
    scan_interval: 120
    name: car_status
    resource: https://api.openvehicles.com:6869/api/status/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_KEY>
    value_template: "{{ value_json.soc }}"
    json_attributes:
      - soh
      - soc
      - etc...

  - platform: rest
    scan_interval: 120
    name: car_location
    resource: https://api.openvehicles.com:6869/api/location/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_KEY>
    value_template: "{{ value_json.longitude }},{{ value_json.latitude }}"
    json_attributes:
      - longitude
      - latitude
      - etc...

  - platform: rest
    scan_interval: 60
    name: car_charging
    resource: https://api.openvehicles.com:6869/api/charge/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_KEY>
    value_template: "{{ value_json.chargestate }}"
    json_attributes:
      - battvoltage
      - cac100
      - carawake
      - caron
      - etc...

Save and validate

Save the new configuration, and use the handy “Check Configuration” button on the Configuration > Server Controls page. If there are no errors, then restart your home assistant server.

When the server starts back up, you should see some new entities called sensor.car_status, sensor.car_location, and sensor.car_charging. Use this in your automations or expose them via HomeKit like I did! Check below for my full configuration, including HomeKit friendly template sensors (although HomeKit does not support this very well as it doesn’t have native EV support).

HomeKit Example

You can see what this looks like in the screenshot from my iPhone below. I’ve configured the SoC as a humidity sensor so it reads as a percentage, and the range as an illuminance sensor. Unfortunately, HomeKit lacks an EV entity type, so this is the best I could come up with.

If you name the sensors something appropriate, you can even ask Siri to tell you the state of charge or range, if you can deal with the annoying response as it thinks they’re different types of sensors. Hopefully Apple adds an EV entity to HomeKit in the future, so a proper integration can be made!

Example config for a 2012 Nissan LEAF

- sensor:
    - name: car_soc_homekit
      state: "{{ state_attr('sensor.car_status', 'soc') }}"
      icon: "mdi:car-electric"
      device_class: humidity
      unit_of_measurement: "%"

    - name: car_range_homekit
      state: '{{ (float(state_attr("sensor.car_status", "estimatedrange")) * 1.25) | int }}'
      icon: "mdi:speedometer-slow"
      device_class: illuminance

    - name: car_soc
      state: "{[ state_attr('sensor.car_status', 'soc') }}"
      icon: "mdi:car-electric"
      device_class: battery

    - name: car_range
      state: '{{ (float(state_attr("sensor.car_status", "estimatedrange")) * 1.25) | int }}'
      icon: "mdi:speedometer-slow"

- binary_sensor:
    - name: car_charging
      state: "{{ state_attr('sensor.car_status', 'charging') }}"
      icon: "mdi:ev-station"

- platform: rest
  scan_interval: 60
  name: car_status
  resource: https://api.openvehicles.com:6869/api/status/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_KEY>
  value_template: "{{ value_json.soc }}"
  json_attributes:
    - alarmsounding
    - bt_open
    - cac100
    - carawake
    - carlocked
    - caron
    - chargestate
    - charging
    - charging_12v
    - cooldown_active
    - cp_dooropen
    - estimatedrange
    - fl_dooropen
    - fr_dooropen
    - handbrake
    - idealrange
    - idealrange_max
    - mode
    - odometer
    - parkingtimer
    - pilotpresent
    - soc
    - soh
    - speed
    - staleambient
    - staletemps
    - temperature_ambient
    - temperature_battery
    - temperature_charger
    - temperature_motor
    - temperature_pem
    - tr_open
    - tripmeter
    - units
    - valetmode
    - vehicle12v
    - vehicle12v_current
    - vehicle12v_ref

- platform: rest
  scan_interval: 60
  name: car_location
  resource: https://api.openvehicles.com:6869/api/location/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_KEY>
  value_template: "{{ value_json.longitude }},{{ value_json.latitude }}"
  json_attributes:
    - altitude
    - direction
    - drivemode
    - energyrecd
    - energyused
    - gpslock
    - invefficiency
    - invpower
    - latitude
    - longitude
    - power
    - speed
    - stalegps
    - tripmeter

- platform: rest
  scan_interval: 30
  name: car_charging
  resource: https://api.openvehicles.com:6869/api/status/<VEHICLE_ID>?username=<USERNAME>&password=<YOUR_API_KEY>
  value_template: "{{ value_json.chargestate }}"
  json_attributes:
    - battvoltage
    - cac100
    - carawake
    - caron
    - charge_estimate
    - charge_etr_full
    - charge_etr_limit
    - charge_etr_range
    - charge_etr_soc
    - charge_limit_range
    - charge_limit_soc
    - chargeb4
    - chargecurrent
    - chargeduration
    - chargekwh
    - chargelimit
    - chargepower
    - chargepowerinput
    - chargerefficiency
    - chargestarttime
    - chargestate
    - chargesubstate
    - chargetimermode
    - chargetimerstale
    - chargetype
    - charging
    - charging_12v
    - cooldown_active
    - cooldown_tbattery
    - cooldown_timelimit
    - cp_dooropen
    - estimatedrange
    - idealrange
    - idealrange_max
    - linevoltage
    - mode
    - pilotpresent
    - soc
    - soh
    - staleambient
    - staletemps
    - temperature_ambient
    - temperature_battery
    - temperature_charger
    - temperature_motor
    - temperature_pem
    - units
    - vehicle12v
    - vehicle12v_current
    - vehicle12v_ref
Categories
Home Automation

How to add Brilliant Series II (20925) smart plug to local tuya in home assistant

I recently bought a few smart plugs from Officeworks (link) so I can detect when my washing machine and dryer are finished running and notify me. The plugs have energy monitoring so I can tell when they are actively running. They run Tuya, and once connected to the WiFi using the Tuya app, they are compatible out of the box with local tuya for fast control over the local network.

This post will not show you how to set them up and link them to local tuya (see the official documentation here), but provides the necessary DPS mapping in order to get the right energy monitoring data.

Start the process of adding your smart plug using the local tuya integration from the integrations page. Fill in the key, then click submit. You’ll want to select the type as “switch”, then click submit again.

Using the drop down items, select the same numbers as the screenshot below. Once you are done, you’ll have all the energy monitoring data available in home assistant under the switch entity. Easy!

Categories
Docker Software

How to build x86 (and others!) Docker images on an M1 Mac

TLDR;

Want a set of commands you can copy/paste? Jump to the TLDR; at the bottom.

Background

I jumped on the Apple Silicon band wagon as soon as I heard how awesome they were and I was not disappointed. My Apple Silicon MacBook Air is now my daily driver that I use for work as a software engineer and for personal projects.

I extensively use Docker in the projects I work on, so this led to a unique problem. When I build a Docker image on my Mac – it builds an ARM version (specifically arm64). This means this image can’t run on any other device like a raspberry pi (linux/arm/v7) or a typical server (linux/amd64) as the application binaries inside are not compatible.

Fortunately, Docker has supported cross CPU architecture builds for a while now through an experimental feature called buildx. It’s a CLI plugin that integrates the Moby BuildKit toolkit. This allows you to build a Docker Image for a variety of different CPU architectures and it uses QEMU under the hood to do the emulation.

How to build a multi-architecture Docker Image on Apple Silicon

This guide assumes you have an Apple Silicon equipped Mac running macOS Big Sur. It was written with an Apple M1 equipped MacBook Air so results may vary across devices.

Step 1: enable experimental Docker Desktop features

The Docker buildx feature is currently “experimental” so we need to enable Docker Desktop’s experimental feature support.

To do so, open up Docker Desktop then navigate to Preferences.

Once you’re there, select “Experimental Features” and toggle the slider to on. Click on “Apply & Restart” to save the changes and restart the Docker daemon.

If you can’t see an “Experimental Features” option, you may have to sign up for the Docker developer program at this link. I suspect it’s a new thing which is why only recently created accounts seem to need to sign up.

Once you’ve enabled experimental features, you can close the Docker Desktop preferences. In your terminal, open the folder that contains the Dockerfile you wish to build for multiple architectures. Run the docker buildx ls command to list the current builder instances. You should see something similar to below.

$ docker buildx ls              
NAME/NODE DRIVER/ENDPOINT STATUS  PLATFORMS
default * docker                  
  default default         running linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/arm/v7, linux/arm/v6

Next create a new builder instance with docker buildx create --use so we can perform multiple builds in parallel. Without this step, you’ll have to use the default Docker one which only supports a single platform per build. You’ll see it created if you run docker buildx ls again.

$ docker buildx lsNAME/NODE          DRIVER/ENDPOINT             STATUS  PLATFORMS
reverent_banach *  docker-container                    
  reverent_banach0 unix:///var/run/docker.sock running linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/arm/v7, linux/arm/v6
default            docker                              
  default          default                     running linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/arm/v7, linux/arm/v6

Now you can use buildx like below to start a multi-architecture build. You’ll have to push it straight to a registry (either the public or a private one) with --push if you want Docker to automatically manage the multi-architecture manifest for you. Don’t forget to tag it (the example is using the open source MemberMatters software I wrote) and add a list of all the platforms that you wish to build for. You can see the compatible platforms from the previous docker buildx ls command. The command below will build an image for both Apple Silicon Macs (linux/arm64), and standard x86 platforms (linux/amd64).

$ docker buildx build --platform linux/amd64,linux/arm64 --push -t membermatters/membermatters .

The first time you run a build, you’ll have to wait for the Moby BuildKit image to download so you’ll see something like this.

$ docker buildx build --platform linux/amd64,linux/arm64 --push -t membermatters/membermatters .
[+] Building 16.5s (7/43)                                                                                                                                 
 => [internal] booting buildkit                                                                                                                     10.4s
 => => pulling image moby/buildkit:buildx-stable-1                                                                                                   8.1s
 => => creating container buildx_buildkit_admiring_shirley0 

Once the build is finished, it will be automatically uploaded to your configured registry. Docker will also automatically manage the manifest list for you. This allows Docker to combine the separate builds for each architecture into a single “manifest”. This means users can do a normal docker pull <image> and the Docker client will automatically work out the correct image for their CPU architecture – pretty neat!

TLDR; Version

  1. Open the Docker Desktop dashboard then open up Preferences (cog icon). Go to “Experimental Features” then turn it on and apply it.
  2. Next create a new builder instance with docker buildx create --use. This lets you specify multiple docker platforms at once.
  3. To build your Dockerfile for typical x86 systems and Apple Silicon Macs, run docker buildx build --platform linux/amd64,linux/arm64 --push -t <tag_to_push> .
  4. Done. Please note that you have to push directly to a repository if you want Docker Desktop to automatically manage the manifest list for you (this is probably something you want). Read the paragraph above to find out why. 😉

Categories
Uncategorised

Update to my electric motorcycle project

For those who don’t know, I’ve been blogging about my electric motorcycle conversion over at https://ebandit.bike. I’ve gotten back into the swing of things now that a lot of places are opening back up after COVID mandated shut downs. I’ve put together a really detailed post explaining all about the BMS, the motor I selected and the ELV system. You can read all about it on my other blog right here.

Categories
3D Printing Electric Skateboard Electronics

Custom lighting system for my electric skateboard

Recently I’ve joined a local electric skateboard group that goes on regular group rides. Unfortunately most of these are at night and I don’t have any sort of lights. It’s dangerous to ride at night as I can’t see what’s ahead of me and others can’t see me.

Instead of forking out a large amount of money for some pretty basic (and boring) lights I decided to make my own. I purchased some 300 LED/m WS2812B strip and a 15W LED light bar off eBay. The light bar requires 12v so I built a 3s3p (12.6v, ~6Ah) battery pack out of 18650 Li-ion batteries. This means I needed a 5v power supply to run the LED strips and ESP8266 micro controller. Products on eBay tend to be overrated so I normally aim for something rated much higher than necessary.

The 5v, 5A power supply used.

I designed and 3D printed a case to fit all of the batteries and electronics inside. It’s a bit bigger than necessary but I wasn’t certain on the size of everything when I made it. I designed it so the light bar attaches onto the front so it’s easier to mount on the board. The cables come out via two waterproof glands for the light bar, and charger (red, black) / led strip (yellow, green, white).

The controller box and light bar mount.

The adhesive that comes on the LED strip isn’t very good. I 3D printed some little plastic holders for the strip instead. Using some tiny screws, these screwed into the board for a really solid mount. Near the back wheels it was easier to use zip ties for mounting the strip.

The underside of the board with the light strips held in place by some 3D printed plastic clips.

The final result is great! It makes a huge difference while riding at night. I can clearly see what’s in front of me, and everyone can see me coming from ages away due to the fancy light show going on underneath the board and huge light bar on the front. 😉

Categories
Uncategorised

My smart home system

I’ve been an eager smart home (or home automation) enthusiast for a number of years now. My end goal is always changing, but it’s generally been to automate as many things as possible and make it as convenient as possible to control all of my lighting and appliances. My smart home system has grown to be quite complex so I’ve started documenting it.

To start with, I’ve put together a system diagram showcasing all of the different components and how everything is connected.

Smart%20Home%20Diagram
A diagram of my smart home system as of January 2020.

Here is a quick summary of all the different protocols and the different components that rely on them.

ZigBee – CC2531 Dongle (zigbee2mqtt)

Zigbee2mqtt is a fantastic open source project. It aims to bring together all the products from various companies so they can all use a single hub. Currently most vendors have a proprietary hub and there’s little compatibility between. This is surprising given ZigBee is an open standard just like WiFi. Zigbee2mqtt has a set of converters that allow you to add support for almost any device and expose a control/status API over MQTT.

ZigBee is “created on IEEE’s 802.15.4 using the 2.4GHz band and a self-healing true mesh network”. It’s especially ideal for sensor and IoT networks as it is a true mesh network that re-organises itself and relays messages between nodes. It’s also extremely low powered which makes it great for tiny battery powered sensors.

I’m slowly moving all of my ZigBee devices onto this network. This allows me to benefit from having less hubs and a bigger, more reliable ZigBee network. Most of my fixed LED downlights have ZigBee light switches that act as repeaters as they’re always powered.

ZigBee – Phillips Hue

Although they’re great, I’m migrating away from the Phillips hue lineup to the IKEA range for consistency reasons. Otherwise, the hue range is the best quality and functioning smart bulbs I’ve used.

ZigBee – IKEA TRÅDFRI

IKEA’s range of smart lighting products is absolutely fantastic. They are incredibly good value, great quality and work well. You can get a dimmable smart bulb for about $15 AUD!

IPv4 – WiFi/Ethernet

All of the ZigBee hubs connect back to hass.io (or home assistant) over a standard IP network using WiFi or Ethernet. There are also various other devices like my air purifier, robot vacuum cleaner, smart thermostat and a couple of WiFi based relays (sonoff). I try to avoid adding WiFi based IoT devices as a lot of them have serious security vulnerabilities. ZigBee is generally much more secure as a breach from any ZigBee device generally can’t give access to the entire IP network.

Raspberry Pi 4

Home Assistant (or hass.io) runs on my raspberry 4 and exposes all of the devices in my smart home system to HomeBridge. This makes everything available to the Apple ecosystem via HomeKit. This allows me to use Siri or the Home app on my watch, iPhone, MacBook, iPad or HomePod to control everything that’s part of my smart home system. This is really convenient and Siri is now the primary way I interact with my smart home system and control lights/other devices.

The Raspberry Pi 4 also hosts several services such as a plex media server and download server. It’s mapped to our NAS which has 8tb of network accessible storage for media, backups and other files.

Conclusion

My smart home system is a lot of fun to build and maintain but it’s not for everyone. Hopefully this post has given you some ideas on how to get started or improve your own smart home.

Categories
3D Printing Linux Raspberry Pi Software

How to get great webcam quality with Octoprint

I have OctoPrint set up to help me manage my 3D printer, record timelapses and remotely monitor it. OctoPrint is a great tool and something I strongly recommend to everyone. I’ve also setup a webcam so that OctoPrint can stream the footage in real time, and also create awesome timelapses. I have a Logitech C920 – one of the highest regarded webcams available, and yet I was still getting poor results. Read on to find out how I fixed this.

The Logitech C920 is a great webcam and can be had for as little as $100. However, in the case of mounting it up close on a 3D printer with a quickly moving subject, the auto focus and exposure really struggles. I’ve got a fixed mount, and a consistent lighting set up in my printer’s enclosure so there’s no reason for the focus or exposure to be adjusted once it’s correct.

Luckily, it’s easy enough to manually configure these settings. These commands were tested on a Raspberry Pi 3+ Model B with a Logitech C920 webcam. Results may vary on other setups.

First of all, you’ll want to turn off auto exposure by running the following command on your OctoPrint Pi:

v4l2-ctl -c exposure_auto=1

Once you have turned off auto exposure, it’s time to play around with the exposure value. A good starting value is probably around 600, but it varies with your specific set up. You should play around with this number by adding or subtracting 100 at a time until you get a good quality image. You can open up the OctoPrint webcam stream while you’re doing this. Run the command below to set your exposure to a value of 600:

v4l2-ctl -c exposure_absolute=600

Now your exposure is dialed in, it’s time to move onto the focus. This was the biggest problem for me as the webcam was hunting for focus all the time resulting in a near constant blurry image. Turn off auto focus by running the command below:

v4l2-ctl -c focus_auto=0
A picture of my 3D printer (CR-10 v2) webcam setup. The printer control box and OctoPrint Pi are off to the left out of frame.

With auto focus off, we can now play around with the focus settings. My webcam is mounted above my 3D printer towards the front, and is about 50cm away from the build plate (pictured above). Start with a focus value of 1 and then work your way up from there by adding 1 at a time. If you’re not seeing much difference between the values, try jumping up 5 at a time then fine tuning it when it’s almost there. Set the focus value to 1 with this command:

v4l2-ctl -c focus_absolute=1

Putting it all together

Now that we’ve got all the settings dialed in, it’s time to make them stick. By default, these settings won’t persist if you reboot your OctoPrint Pi. First you should combine all the commands together like the code snippet below, be sure to replace with your dialed in values:

v4l2-ctl -c exposure_auto=1 && v4l2-ctl -c exposure_absolute=600 && v4l2-ctl -c focus_auto=0 && v4l2-ctl -c focus_absolute=2

You’ll need to open a config file called /home/pi/mjpg-streamer/start.sh. Note, some users have reported that /etc/rc.local is now the correct place (you’ll need to use sudo when editing this). You may have to try both. Use your favourite text editor. If you’re new to editing files on the command line, you should look up how to use nano and come back here once you’re familiar. Create a new line at the very end of the file and the code snippet from above there. Save and exit. Now whenever OctoPrint starts up the mjpg-streamer service your custom camera settings will take affect.

Following these steps helped me dramatically boost the quality of the live stream, and timelapse footage of my prints. It went from over exposed and fuzzy to nice and clear with a good exposure.

Note: I’ve been using the excellent “octolapse” plugin recently which has similar functionality (and a GUI!) built right in. So I’d recommend to give that a go if you don’t mind the extra plugin and complexity.