Arubinu
05/02/2025, 10:24 AMfloitsch
05/15/2025, 7:32 AMfloitsch
05/15/2025, 7:34 AMtoit toitdoc serve
it will probably not render correctly. You generally use this.foo
to access instance fields. That's not necessary (assuming there is no name-collision): just foo
works as well.Arubinu
05/15/2025, 9:29 PMtoit-simple-config
is really interesting — I was actually looking for a way to separate credentials from the code, so thank you for that.
Regarding Telegram, I actually have very limited network access, but I understand its usefulness.
My main control center is Home Assistant, and I was hoping to use MQTT Discovery so my home automation setup could detect this new device automatically. But I haven’t managed to get that working properly yet (it’s kind of depressing).
You're right about this.foo — it’s unnecessary in many languages. But I figured it would improve readability by making it obvious at a glance that the variable comes from the instance itself.
On the other hand, I haven’t been able to try toit toitdoc serve
since my only access is through jag
.
I could easily find where the toit executable is and add it to the PATH, but I don’t really feel comfortable adding a whole paragraph about that to the GitHub project just so other users can get toit-simple-config
working.kaxori
05/22/2025, 4:39 PMArubinu
05/23/2025, 8:09 PMkaxori
05/24/2025, 7:30 AMhass.create-sensor-entity --data-label="button" --data-category="measure"
--device-class=""
--data-unit="#"
- set value:
publish-mqtt "?measure/button" "$(%d button-counter)"
- message data in MQTT explorer:
- published: manually set RAW value !
- received:
? hope it helps ...?kaxori
05/24/2025, 7:41 AMArubinu
05/24/2025, 11:26 AM/availability
containing {"state":"offline"}
that is not taken into account even though I have the following in `/config`:
json
"availability_mode": "all",
"availability_topic": [
{
"topic": "toit/64e8338a3e1c/state",
"value_template": "{{ value_json.state }}"
},
{
"topic": "toit/64e8338a3e1c/binary_sensor/low-battery/availability",
"value_template": "{{ value_json.state }}"
}
]
kaxori
05/24/2025, 1:10 PMArubinu
05/24/2025, 7:35 PMbpmct
05/25/2025, 12:31 AMkasperl
05/25/2025, 5:51 AMkaxori
06/03/2025, 6:02 PM// setup a cyclic heartbeat task
heartbeat-task = task :: heart-beat_
heart-beat_ :
publish-mqtt "$(TOPIC-AVAILABILITY-BASE)" "online" --retain
sleep --ms=HEARTBEAT-INTERVAL
...
// add this to component definition
...
"expire_after": 90,
"availability": {
"topic": "$(TOPIC-AVAILABILITY-BASE)",
"payload_available": "online",
"payload_not_available": "offline"
},
... hope, this will help you ...Arubinu
06/03/2025, 6:04 PMkaxori
06/03/2025, 6:16 PMdavidg238
06/28/2025, 1:42 AMwrite-on-stdout_
turned into an exercise with coding assistants. You can see the logs here https://github.com/davidg238/fft , resulting in jag run -d host sample.toit
floitsch
06/28/2025, 10:06 AM