diy solar

diy solar

Recent content by venquessa

  1. V

    JK-BMS + Grafana in one evening.

    A perfect example of an anti-idempotent operation would be a call to an "increment counter". A more real example from real world day to day code.... using a call to get the current date and time inside the scope of the operation. No matter when you call that method/operation you will get a...
  2. V

    JK-BMS + Grafana in one evening.

    Adding... Always consider "idempotency". It's a fancy term for saying repeated requests should have no additional effect.(many caveats). If a light needs to be ON. There should be no concern sending it an ON if it already is on. The output state satisfies the requirement. If the light is...
  3. V

    JK-BMS + Grafana in one evening.

    Start with the basic "ITTT". If this then that. Subscribe to an MQTT topic of choice. Write an on_message() handler for it. Run blocking. In the on_message() send another message to a device to do something. Lights in the most simple sense are a motion sensor on MQTT. You subscribe to that...
  4. V

    JK-BMS + Grafana in one evening.

    A hypothetical synchronous operation, a REQUEST->RESPONSE call using a message bus is not 'that' difficult. Publish the request to a specific topic with a specific request ID. Store this request in the service state. Subscribe to the response topic and filter until you get a payload with your...
  5. V

    JK-BMS + Grafana in one evening.

    REST API with micro-services is a valid approach. Along with RMI (Remote method invocation). The advantages of using "middleware" like a message bus (MQTT) is that services do not need to know of each other's existence, nor do they need to "discover" them. In a traditional, non-message bus...
  6. V

    JK-BMS + Grafana in one evening.

    I think I intended the MIT license. The original messy repo is MIT I believe. The new tidier repo is unlicensed I think. I don't recall applying one in gitlab for it. So basically public domain. It's a "one man band project", just my ideas and efforts over the past 6 years or so. Many of...
  7. V

    JK-BMS + Grafana in one evening.

    Absolutely. Especially focusing on the later. In fact I tend towards only the later. When I went through some architectural design for this, I kept finding "state machines". State machines and concurrency is a recipe which will make me sit up and listen in work as it's either a bad, bad idea...
  8. V

    JK-BMS + Grafana in one evening.

    Also. Those git repos are open source, so feel free to borrow or steal. I'd prefer you fork it and pass back anything you do that's cool, but I don't mind you even copy and pasting it, just don't take credits and do try and let me know what you use it for, for my own curiosity.
  9. V

    JK-BMS + Grafana in one evening.

    Oh. Of uptmost importance with the "push" model and on_message() callbacks. With Paho, they are "in paho thread". It uses one main thread. If you spend 2 minutes in your on_message handler, then 2 minutes of all messages will cue up. If you can respond immediately you can. If you can't...
  10. V

    JK-BMS + Grafana in one evening.

    Regarding while(true) loops versus event handlers. I think you are describing what I call the "dynamics" or "cadence drivers". Basically, what invokes the code to do something? As you (?) are exploring MQTT the natural answer is... the message receive event for a topic. The "on_message"...
  11. V

    JK-BMS + Grafana in one evening.

    Sorry for late reply. Absolutely there was "prior work" in my 'core systems' which helped me alone the way. You are not far off from what I have, by the sounds of it. On Paho. If you look into my code base for the mqtt-lib you will see how I wrap it in something a bit more "fit for purpose"...
  12. V

    DIY Solar project No. 2.

    tldr; "Permanently temporary, lean-to awning, roofed with solar, is it wise? Any guides, useful references?" Last year I built my first DIY off-grid system and it has generated close to 0.5MWh of off grid power to my single office circuit. Garage roof: 3x330W panels. 3xMPPT controllers...
  13. V

    I'm not saying the weather is miserable, but...

    ... my automatic lights are coming on all day. How does this relate to solar? The interior lights determine if it's daylight or not by asking the solar power system what it thinks. The weather is so **** the solar power system isn't quite sure. LOL Some times the upstairs hallway lights come...
  14. V

    JK-BMS + Grafana in one evening.

    Fixation and low power. Mine is the 0.6Amp balancer model, which isn't enough in many cases. It also fixates on a pair of cells and will only balance that pair until it's done. Even if there is another cell approaching or even hitting LVC.
  15. V

    JK-BMS + Grafana in one evening.

    I believe the BLE protocol is just basic serial coms on top. The UART code seems identical to the BLE. https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms/switch/__init__.py This includes the registers for the "switches". The command code for write register is static const...
Back
Top