Button+ topic

Pagina: 1 ... 16 17 Laatste
Acties:

Onderwerpen


  • stijn1309
  • Registratie: December 2007
  • Laatst online: 23:06
Afbeeldingslocatie: https://tweakers.net/i/vuYq5XyMF5qeILZ9KWVhLQj-90g=/x800/filters:strip_icc():strip_exif()/f/image/927uTm8IbnHqInmJLXlywCAJ.jpg?f=fotoalbum_large

Vorige week ook de Button+ binnen gekregen en mee zitten spelen.

Enige wat ik niet voor elkaar kreeg was simpel een datum tonen. Ik deed een MQTT post naar het value topic van het display met 18-6-2026 en dan kreeg ik alleen 18 te zien (in MQTTExplorer zie ik wel gewoon de gehele datum). Doe ik "18-6-2026" dan zie ik ook op de display de " terug, maar dan wel de gehele datum... wat natuurlijk ontzettend lelijk is. Dus als iemand daar de manier of methode voor heeft hoor ik dat graag.


En ja ik doe inspriatie op vanuit dit topic, dus wellcht hier en daar wat herkensbaars ;)

  • Tovenaar
  • Registratie: Januari 2002
  • Laatst online: 18-06 17:15
stijn1309 schreef op donderdag 18 juni 2026 @ 08:58:
[Afbeelding]

Vorige week ook de Button+ binnen gekregen en mee zitten spelen.

Enige wat ik niet voor elkaar kreeg was simpel een datum tonen. Ik deed een MQTT post naar het value topic van het display met 18-6-2026 en dan kreeg ik alleen 18 te zien (in MQTTExplorer zie ik wel gewoon de gehele datum). Doe ik "18-6-2026" dan zie ik ook op de display de " terug, maar dan wel de gehele datum... wat natuurlijk ontzettend lelijk is. Dus als iemand daar de manier of methode voor heeft hoor ik dat graag.


En ja ik doe inspriatie op vanuit dit topic, dus wellcht hier en daar wat herkensbaars ;)
Ik weet niet of je ook Home Assistant gebruikt voor de MQTT publishing maar ik gebruik onderstaande voor een 'generiek' setje gegevens om te tonen op de Button+, wellicht heb je er wat aan.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
alias: MQTT - ButtonPlus - Publish default display data
triggers:
  - minutes: /1
    trigger: time_pattern
actions:
  - action: mqtt.publish
    data:
      topic: buttonplus/global/date
      payload: >
        {% set dagen = {
          'Monday':'ma',
          'Tuesday':'di',
          'Wednesday':'wo',
          'Thursday':'do',
          'Friday':'vr',
          'Saturday':'za',
          'Sunday':'zo'
        } %}

        {% set maanden = {
          1:'jan',
          2:'feb',
          3:'mrt',
          4:'apr',
          5:'mei',
          6:'jun',
          7:'jul',
          8:'aug',
          9:'sep',
          10:'okt',
          11:'nov',
          12:'dec'
        } %}

        {{ dagen[now().strftime('%A')] }} {{ now().day }} {{
        maanden[now().month] }} '{{ now().strftime('%y') }}
  - action: mqtt.publish
    data:
      topic: buttonplus/global/time
      payload: |
        {{ now().strftime('%H:%M') }}
  - action: mqtt.publish
    data:
      topic: buttonplus/global/temperature
      payload: >
        {{ state_attr('weather.knmi_bergstraat','temperature') | default(0)}}{{
        state_attr('weather.knmi_bergstraat','temperature_unit') }}
  - action: mqtt.publish
    data:
      topic: buttonplus/global/weather_icon
      payload: |
        {% set condition = states('weather.knmi_bergstraat') %} {% set icons = {
          'sunny':'<svg viewBox="0 0 50 50"><ellipse cx="25" cy="25" rx="8" ry="8" fill="#ff0" stroke="#ffe927" stroke-width="3"></ellipse><line x1="25" y1="5" x2="25" y2="9" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="25" y1="41" x2="25" y2="45" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="25" x2="9" y2="25" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="41" y1="25" x2="45" y2="25" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="10.4" y1="10.4" x2="13.2" y2="13.2" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="36.8" y1="36.8" x2="39.6" y2="39.6" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="39.6" y1="10.4" x2="36.8" y2="13.2" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="13.2" y1="36.8" x2="10.4" y2="39.6" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line></svg>',
          'clear-night':'<svg viewBox="0 0 50 50"><path d="M32,8 C20,10 14,20 16,30 C18,40 28,46 38,42 C28,44 18,36 18,26 C18,16 26,9 32,8Z" fill="#c8d8ff" stroke="#a0b8ff" stroke-width="1.5" stroke-linejoin="round"></path><circle cx="12" cy="12" r="1.5" fill="#fff"></circle><circle cx="40" cy="8" r="1" fill="#fff"></circle><circle cx="45" cy="20" r="1.5" fill="#fff"></circle><circle cx="8" cy="35" r="1" fill="#fff"></circle></svg>',
          'cloudy':'<svg viewBox="5 10 38 32"> <path d="M36 17h-1.2c-1.2-3.8-5.8-6.1-10.3-5.1C19 13 16 17 17.3 21.3c1 3.2 4.3 5.3 8.1 5.3h10.4c3 0 5.4-2 5.4-4.6s-2.4-4.5-5.4-4.5Z" fill="#555" stroke="#444" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M33 24h-2c-1.6-5.2-8-8.3-14.3-6.9C10 18.6 6 23.8 7.8 29.2c1.4 4.3 6.1 7.2 11.5 7.2h13.7c4 0 7.3-2.7 7.3-6.1S37 24 33 24Z" fill="#fff" stroke="#dfdfdf" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path> </svg>',
          'partlycloudy':'<svg viewBox="0 0 50 50"><path d="M49 1v48H1V1h48M50 0H0v50h50V0h0Z"></path><ellipse cx="30.58" cy="19.57" rx="7.88" ry="8.04" fill="#ff0" stroke="#ffe927" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"></ellipse><path d="M30.58 1.89v3.22M30.58 34.03v3.22M18.3 7.07l2.25 2.28M40.6 29.79l2.25 2.28M13.23 19.57h3.16M44.76 19.57h3.16M18.3 32.07l2.25-2.28M40.6 9.35l2.25-2.28" fill="none" stroke="#ffe927" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"></path><path d="M37.49 30.26h-2.63c-2.3-7.52-11.4-12.03-20.32-10.09C5.62 22.11.25 29.77 2.55 37.28c1.91 6.21 8.55 10.54 16.17 10.54h18.77c5.76 0 10.42-3.93 10.42-8.78s-4.67-8.78-10.42-8.78h-.01Z" fill="#fff" stroke="#dfdfdf" stroke-miterlimit="10" stroke-width="3"></path></svg>',
          'rainy':'<svg viewBox="6 10 40 40"><path d="M36 24h-2c-1.8-5.8-8.8-9.3-15.7-7.8C11 17.8 7 23.2 8.8 28.9c1.5 4.8 6.6 8.1 12.5 8.1h14.7c4.4 0 8-3 8-6.8s-3.6-6.8-8-6.8Z" fill="#b8c8d8" stroke="#8aa0b8" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><line x1="16" y1="40" x2="13" y2="47" stroke="#5599ff" stroke-width="3" stroke-linecap="round"></line><line x1="24" y1="40" x2="21" y2="47" stroke="#5599ff" stroke-width="3" stroke-linecap="round"></line><line x1="32" y1="40" x2="29" y2="47" stroke="#5599ff" stroke-width="3" stroke-linecap="round"></line></svg>',
          'pouring':'<svg viewBox="5 10 40 40"><path d="M36 22h-2c-1.8-5.8-8.8-9.3-15.7-7.8C11 15.8 7 21.2 8.8 26.9c1.5 4.8 6.6 8.1 12.5 8.1h14.7c4.4 0 8-3 8-6.8s-3.6-6.8-8-6.8Z" fill="#000" stroke="#6680a0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><line x1="14" y1="38" x2="12" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line><line x1="21" y1="38" x2="19" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line><line x1="28" y1="38" x2="26" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line><line x1="35" y1="38" x2="33" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line></svg>',
          'snowy':'<svg viewBox="6 10 40 40"><path d="M36 24h-2c-1.8-5.8-8.8-9.3-15.7-7.8C11 17.8 7 23.2 8.8 28.9c1.5 4.8 6.6 8.1 12.5 8.1h14.7c4.4 0 8-3 8-6.8s-3.6-6.8-8-6.8Z" fill="#d8eaf8" stroke="#a8c8e8" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><circle cx="16" cy="42" r="2.5" fill="#a8d8ff"></circle><circle cx="25" cy="44" r="2.5" fill="#a8d8ff"></circle><circle cx="34" cy="42" r="2.5" fill="#a8d8ff"></circle></svg>',
          'fog':'<svg viewBox="5 10 40 40"><line x1="5" y1="16" x2="44" y2="16" stroke="#b0b8b0" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="23" x2="44" y2="23" stroke="#c0c8c0" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="30" x2="36" y2="30" stroke="#b0b8b0" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="37" x2="28" y2="37" stroke="#909890" stroke-width="3" stroke-linecap="round"></line></svg>',
          'windy':'<svg viewBox="8 8 40 40"><path d="M6 18 Q20 14 34 18" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path><path d="M6 25 Q22 21 38 25 Q44 27 42 32 Q40 36 35 34" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path><path d="M6 32 Q18 28 30 32 Q38 36 36 42 Q34 46 28 44" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path><path d="M30 12 Q40 8 44 13 Q48 18 42 22" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path></svg>'
        } %} {{ icons.get(condition, '❓') }}
Afbeeldingslocatie: https://tweakers.net/i/zkKMckqMDHKpx1qpFqkqHBeGFIg=/800x/filters:strip_exif()/f/image/cEwxaVPYIPXNbMJqSkfNCCNh.png?f=fotoalbum_large


Afbeeldingslocatie: https://tweakers.net/i/Kv7rqPKHwi4rZOUmgLFp15tj-cU=/800x/filters:strip_exif()/f/image/yKxxXFSiB78myQtPUoSovVan.png?f=fotoalbum_large

  • stijn1309
  • Registratie: December 2007
  • Laatst online: 23:06
Tovenaar schreef op donderdag 18 juni 2026 @ 09:38:
[...]

Ik weet niet of je ook Home Assistant gebruikt voor de MQTT publishing maar ik gebruik onderstaande voor een 'generiek' setje gegevens om te tonen op de Button+, wellicht heb je er wat aan.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
alias: MQTT - ButtonPlus - Publish default display data
triggers:
  - minutes: /1
    trigger: time_pattern
actions:
  - action: mqtt.publish
    data:
      topic: buttonplus/global/date
      payload: >
        {% set dagen = {
          'Monday':'ma',
          'Tuesday':'di',
          'Wednesday':'wo',
          'Thursday':'do',
          'Friday':'vr',
          'Saturday':'za',
          'Sunday':'zo'
        } %}

        {% set maanden = {
          1:'jan',
          2:'feb',
          3:'mrt',
          4:'apr',
          5:'mei',
          6:'jun',
          7:'jul',
          8:'aug',
          9:'sep',
          10:'okt',
          11:'nov',
          12:'dec'
        } %}

        {{ dagen[now().strftime('%A')] }} {{ now().day }} {{
        maanden[now().month] }} '{{ now().strftime('%y') }}
  - action: mqtt.publish
    data:
      topic: buttonplus/global/time
      payload: |
        {{ now().strftime('%H:%M') }}
  - action: mqtt.publish
    data:
      topic: buttonplus/global/temperature
      payload: >
        {{ state_attr('weather.knmi_bergstraat','temperature') | default(0)}}{{
        state_attr('weather.knmi_bergstraat','temperature_unit') }}
  - action: mqtt.publish
    data:
      topic: buttonplus/global/weather_icon
      payload: |
        {% set condition = states('weather.knmi_bergstraat') %} {% set icons = {
          'sunny':'<svg viewBox="0 0 50 50"><ellipse cx="25" cy="25" rx="8" ry="8" fill="#ff0" stroke="#ffe927" stroke-width="3"></ellipse><line x1="25" y1="5" x2="25" y2="9" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="25" y1="41" x2="25" y2="45" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="25" x2="9" y2="25" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="41" y1="25" x2="45" y2="25" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="10.4" y1="10.4" x2="13.2" y2="13.2" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="36.8" y1="36.8" x2="39.6" y2="39.6" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="39.6" y1="10.4" x2="36.8" y2="13.2" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line><line x1="13.2" y1="36.8" x2="10.4" y2="39.6" stroke="#ffe927" stroke-width="3" stroke-linecap="round"></line></svg>',
          'clear-night':'<svg viewBox="0 0 50 50"><path d="M32,8 C20,10 14,20 16,30 C18,40 28,46 38,42 C28,44 18,36 18,26 C18,16 26,9 32,8Z" fill="#c8d8ff" stroke="#a0b8ff" stroke-width="1.5" stroke-linejoin="round"></path><circle cx="12" cy="12" r="1.5" fill="#fff"></circle><circle cx="40" cy="8" r="1" fill="#fff"></circle><circle cx="45" cy="20" r="1.5" fill="#fff"></circle><circle cx="8" cy="35" r="1" fill="#fff"></circle></svg>',
          'cloudy':'<svg viewBox="5 10 38 32"> <path d="M36 17h-1.2c-1.2-3.8-5.8-6.1-10.3-5.1C19 13 16 17 17.3 21.3c1 3.2 4.3 5.3 8.1 5.3h10.4c3 0 5.4-2 5.4-4.6s-2.4-4.5-5.4-4.5Z" fill="#555" stroke="#444" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M33 24h-2c-1.6-5.2-8-8.3-14.3-6.9C10 18.6 6 23.8 7.8 29.2c1.4 4.3 6.1 7.2 11.5 7.2h13.7c4 0 7.3-2.7 7.3-6.1S37 24 33 24Z" fill="#fff" stroke="#dfdfdf" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path> </svg>',
          'partlycloudy':'<svg viewBox="0 0 50 50"><path d="M49 1v48H1V1h48M50 0H0v50h50V0h0Z"></path><ellipse cx="30.58" cy="19.57" rx="7.88" ry="8.04" fill="#ff0" stroke="#ffe927" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"></ellipse><path d="M30.58 1.89v3.22M30.58 34.03v3.22M18.3 7.07l2.25 2.28M40.6 29.79l2.25 2.28M13.23 19.57h3.16M44.76 19.57h3.16M18.3 32.07l2.25-2.28M40.6 9.35l2.25-2.28" fill="none" stroke="#ffe927" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"></path><path d="M37.49 30.26h-2.63c-2.3-7.52-11.4-12.03-20.32-10.09C5.62 22.11.25 29.77 2.55 37.28c1.91 6.21 8.55 10.54 16.17 10.54h18.77c5.76 0 10.42-3.93 10.42-8.78s-4.67-8.78-10.42-8.78h-.01Z" fill="#fff" stroke="#dfdfdf" stroke-miterlimit="10" stroke-width="3"></path></svg>',
          'rainy':'<svg viewBox="6 10 40 40"><path d="M36 24h-2c-1.8-5.8-8.8-9.3-15.7-7.8C11 17.8 7 23.2 8.8 28.9c1.5 4.8 6.6 8.1 12.5 8.1h14.7c4.4 0 8-3 8-6.8s-3.6-6.8-8-6.8Z" fill="#b8c8d8" stroke="#8aa0b8" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><line x1="16" y1="40" x2="13" y2="47" stroke="#5599ff" stroke-width="3" stroke-linecap="round"></line><line x1="24" y1="40" x2="21" y2="47" stroke="#5599ff" stroke-width="3" stroke-linecap="round"></line><line x1="32" y1="40" x2="29" y2="47" stroke="#5599ff" stroke-width="3" stroke-linecap="round"></line></svg>',
          'pouring':'<svg viewBox="5 10 40 40"><path d="M36 22h-2c-1.8-5.8-8.8-9.3-15.7-7.8C11 15.8 7 21.2 8.8 26.9c1.5 4.8 6.6 8.1 12.5 8.1h14.7c4.4 0 8-3 8-6.8s-3.6-6.8-8-6.8Z" fill="#000" stroke="#6680a0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><line x1="14" y1="38" x2="12" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line><line x1="21" y1="38" x2="19" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line><line x1="28" y1="38" x2="26" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line><line x1="35" y1="38" x2="33" y2="48" stroke="#3377ff" stroke-width="3" stroke-linecap="round"></line></svg>',
          'snowy':'<svg viewBox="6 10 40 40"><path d="M36 24h-2c-1.8-5.8-8.8-9.3-15.7-7.8C11 17.8 7 23.2 8.8 28.9c1.5 4.8 6.6 8.1 12.5 8.1h14.7c4.4 0 8-3 8-6.8s-3.6-6.8-8-6.8Z" fill="#d8eaf8" stroke="#a8c8e8" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path><circle cx="16" cy="42" r="2.5" fill="#a8d8ff"></circle><circle cx="25" cy="44" r="2.5" fill="#a8d8ff"></circle><circle cx="34" cy="42" r="2.5" fill="#a8d8ff"></circle></svg>',
          'fog':'<svg viewBox="5 10 40 40"><line x1="5" y1="16" x2="44" y2="16" stroke="#b0b8b0" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="23" x2="44" y2="23" stroke="#c0c8c0" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="30" x2="36" y2="30" stroke="#b0b8b0" stroke-width="3" stroke-linecap="round"></line><line x1="5" y1="37" x2="28" y2="37" stroke="#909890" stroke-width="3" stroke-linecap="round"></line></svg>',
          'windy':'<svg viewBox="8 8 40 40"><path d="M6 18 Q20 14 34 18" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path><path d="M6 25 Q22 21 38 25 Q44 27 42 32 Q40 36 35 34" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path><path d="M6 32 Q18 28 30 32 Q38 36 36 42 Q34 46 28 44" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path><path d="M30 12 Q40 8 44 13 Q48 18 42 22" fill="none" stroke="#ccd8d0" stroke-width="3" stroke-linecap="round"></path></svg>'
        } %} {{ icons.get(condition, '❓') }}
[Afbeelding]


[Afbeelding]
Dank je!
Jouw code toegepast en het werkt inderdaad.

Voor mijn gevoel struikelt die over de -

  • Mattie112
  • Registratie: Januari 2007
  • Laatst online: 18-06 16:49
stijn1309 schreef op donderdag 18 juni 2026 @ 10:10:
[...]

Dank je!
Jouw code toegepast en het werkt inderdaad.

Voor mijn gevoel struikelt die over de -
Misschien even escapen?
code:
1
01\-01\-2001

3780wP (18x 210wP EC Solar) | 2x Marstek Venus E (5.12kWh)


  • B_sHoRtY
  • Registratie: September 2010
  • Laatst online: 21-06 22:13
Ook ik ben begonnen aan mijn Button+V2 projectje. Erg interessant! Eigenlijk werkt alles wel prima, maar ik kan nog niet zo goed achterhalen hoe ik het beste een tweede pagina kan maken zodat de drie bars weer “blanco” worden voor nieuwe acties. Heb ik documentatie gemist of een tip hoe ik dit het beste kan aanpakken? Dank!

  • pOZOR jED
  • Registratie: April 2001
  • Nu online
Even een Mount plate ontworpen (printer draait, foto's volgen) om mijn huidige thermostaat iets op te dikken en de Button+ er boven te hangen.

Het device kost wel een hoop automations voor MQTT publishen en afhandeling van de knoppen, maar al met al erg blij mee!

  • pOZOR jED
  • Registratie: April 2001
  • Nu online
B_sHoRtY schreef op vrijdag 19 juni 2026 @ 14:53:
Ook ik ben begonnen aan mijn Button+V2 projectje. Erg interessant! Eigenlijk werkt alles wel prima, maar ik kan nog niet zo goed achterhalen hoe ik het beste een tweede pagina kan maken zodat de drie bars weer “blanco” worden voor nieuwe acties. Heb ik documentatie gemist of een tip hoe ik dit het beste kan aanpakken? Dank!
Je kunt bij de buttons de pagina aangeven? Tip: export de config, plak de json in VS Code en formateer hem netjes, dan is het editen zo gedaan, import, save en klaar!

  • B_sHoRtY
  • Registratie: September 2010
  • Laatst online: 21-06 22:13
pOZOR jED schreef op vrijdag 19 juni 2026 @ 15:16:
[...]

Je kunt bij de buttons de pagina aangeven? Tip: export de config, plak de json in VS Code en formateer hem netjes, dan is het editen zo gedaan, import, save en klaar!
Dit had ik gezien inderdaad. Maar ik zie de logica even niet hoe ik deze dan laat wisselen naar pagina 2. Ik zou graag de twee buttons die in het grote display zitten gebruiken om alle bars te laten wisselen naar pagina 2. Ik heb hiervoor duplicaten aangemaakt en pagina 1 aangepast naar pagina 2. Nu mis ik alleen de logica om de bars te laten wisselen naar pagina 2.

EDIT: als ik in de GUI op de webpagina van de Button+ op de twee buttons klik dan zie ik in de preview dat de bars eronder wisselen naar pagina 2. Als ik dit doe op de Buttoon+ zelf, dan gebeurt er niks. Ik verwacht dat ik iets mis...

[ Voor 15% gewijzigd door B_sHoRtY op 19-06-2026 16:14 ]


  • pOZOR jED
  • Registratie: April 2001
  • Nu online
B_sHoRtY schreef op vrijdag 19 juni 2026 @ 16:05:
[...]

Dit had ik gezien inderdaad. Maar ik zie de logica even niet hoe ik deze dan laat wisselen naar pagina 2. Ik zou graag de twee buttons die in het grote display zitten gebruiken om alle bars te laten wisselen naar pagina 2. Ik heb hiervoor duplicaten aangemaakt en pagina 1 aangepast naar pagina 2. Nu mis ik alleen de logica om de bars te laten wisselen naar pagina 2.

EDIT: als ik in de GUI op de webpagina van de Button+ op de twee buttons klik dan zie ik in de preview dat de bars eronder wisselen naar pagina 2. Als ik dit doe op de Buttoon+ zelf, dan gebeurt er niks. Ik verwacht dat ik iets mis...
Even wat json plakken dan:
"buttons": [
        {
            "buttonid": "1-0",
            "position": 1,
            "page": 0,
            "toplabel": "",
            "svg": "",
            "longdelay": 40,
            "longrepeat": 15,
            "leds": [],
            "topics": [
                {
                    "brokerid": "home",
                    "topic": "buttonplus/btn_xxxxxx/page/set",
                    "payload": "previous",
                    "eventtype": 0
                }
            ]
        },
        {
            "buttonid": "2-0",
            "position": 2,
            "page": 0,
            "toplabel": "",
            "svg": "",
            "longdelay": 40,
            "longrepeat": 15,
            "leds": [],
            "topics": [
                {
                    "brokerid": "home",
                    "topic": "buttonplus/btn_xxxxxx/page/set",
                    "payload": "next",
                    "eventtype": 0
                }
            ]
        },
Door de knoppen 1 en 2 (die bij het display) op pagina 0 te zetten, blijven ze op elke pagina (0 is gewoon default)

De topics voor buttonplus/btn_xxx/page/set stellen de pagina in. kan op nummer, of met next/previous

  • B_sHoRtY
  • Registratie: September 2010
  • Laatst online: 21-06 22:13
pOZOR jED schreef op vrijdag 19 juni 2026 @ 16:35:
[...]

Even wat json plakken dan:
"buttons": [
        {
            "buttonid": "1-0",
            "position": 1,
            "page": 0,
            "toplabel": "",
            "svg": "",
            "longdelay": 40,
            "longrepeat": 15,
            "leds": [],
            "topics": [
                {
                    "brokerid": "home",
                    "topic": "buttonplus/btn_xxxxxx/page/set",
                    "payload": "previous",
                    "eventtype": 0
                }
            ]
        },
        {
            "buttonid": "2-0",
            "position": 2,
            "page": 0,
            "toplabel": "",
            "svg": "",
            "longdelay": 40,
            "longrepeat": 15,
            "leds": [],
            "topics": [
                {
                    "brokerid": "home",
                    "topic": "buttonplus/btn_xxxxxx/page/set",
                    "payload": "next",
                    "eventtype": 0
                }
            ]
        },
Door de knoppen 1 en 2 (die bij het display) op pagina 0 te zetten, blijven ze op elke pagina (0 is gewoon default)

De topics voor buttonplus/btn_xxx/page/set stellen de pagina in. kan op nummer, of met next/previous
Kijk, nu kom ik wat verder. Ik heb denk ik gewoon over het topic heengelezen om van pagina te wisselen. Dit werkt gewoon perfect.

Dank voor je input, je bent de beste!

  • pOZOR jED
  • Registratie: April 2001
  • Nu online
B_sHoRtY schreef op vrijdag 19 juni 2026 @ 16:46:
[...]

Kijk, nu kom ik wat verder. Ik heb denk ik gewoon over het topic heengelezen om van pagina te wisselen. Dit werkt gewoon perfect.

Dank voor je input, je bent de beste!
Op de documentatie valt nog wel wat aan te merken, maar met wat gepuzzel kom je een heel eind. Vooral omdat er tussen HA en Button+ geen API wordt gebruikt, krijg je best veel edge-cases.
Dus je moet echt heel goed over automations nadenken en hoe je data afhandelt en op MQTT pusht.

Neem HUE scenes, deze komen 1:1 door, dus die kun je mooi in je HA en dus Button+ gebruiken. Maar zet je ze aan buiten HA om, met de app/knop/FoH schakelaar/Spraaksysteem, dan krijgt HA niet dor dat er van scene wordt gewisseld. Dus spring maar in de developer mode van HA en check je light.woonkamer groep etc, past die helderheid zich aan, zit je in een andere scene, match de helderheid aan je scenes en je kunt je display weer vullen ;)

Dus ja, mooi device, maar je moet erg goed blijven opletten op wat je doet!

  • B_sHoRtY
  • Registratie: September 2010
  • Laatst online: 21-06 22:13
pOZOR jED schreef op vrijdag 19 juni 2026 @ 16:54:
[...]

Op de documentatie valt nog wel wat aan te merken, maar met wat gepuzzel kom je een heel eind. Vooral omdat er tussen HA en Button+ geen API wordt gebruikt, krijg je best veel edge-cases.
Dus je moet echt heel goed over automations nadenken en hoe je data afhandelt en op MQTT pusht.

Neem HUE scenes, deze komen 1:1 door, dus die kun je mooi in je HA en dus Button+ gebruiken. Maar zet je ze aan buiten HA om, met de app/knop/FoH schakelaar/Spraaksysteem, dan krijgt HA niet dor dat er van scene wordt gewisseld. Dus spring maar in de developer mode van HA en check je light.woonkamer groep etc, past die helderheid zich aan, zit je in een andere scene, match de helderheid aan je scenes en je kunt je display weer vullen ;)

Dus ja, mooi device, maar je moet erg goed blijven opletten op wat je doet!
Helemaal waar! ik moet zeggen dat je 80% in een paar uurtjes wel geconfigureerd hebt. Maar omdat je letterlijk ieder ledje individueel kunt schakelen/helderheid/rgb, maakt dat het geheel wel erg bewerkelijk is om op te zetten. Die andere 20% is veel zoekwerk of gewoon even vragen op een forum met mede-gebruikers:).

  • _eLMo_
  • Registratie: Juni 1999
  • Niet online
Ik moet wel zeggen dat ik graag had gezien dat de Button+ (ik heb een v1) voor €10 meer gewoon een fatsoenlijke hoeveelheid CPU/RAM aan boord had, het is allemaal kantje boord.

Ik (en Codex) heb een TinySVG renderer geschreven voor HomeAssistant op basis van Nordpool. Best geinig, grafiekje dat de uurprijzen over de loop van de dag enigszins laat zien, en de nacht kleurt.. Publiceert op MQTT.

Afbeeldingslocatie: https://tweakers.net/i/kxfwaSI4j7aqkVlD71E8F-Ezsjs=/x800/filters:strip_icc():strip_exif()/f/image/ZJcSf483r3CMg1yGz9x0Esvb.jpg?f=fotoalbum_large

Je kan deze code natuurlijk ook misbruiken om andere statistiek mee te plotten. Er zitten wat truukjes in om de SVG zo klein mogelijk te houden, bijvoorbeeld het groeperen van lijn segmenten ipv punten, integer coordinaten, alleen SVG primitives, geen gebruik van transparantie, de kwartieren zijn uitgemiddeld tot uren om punten te besparen.

Ik had eerst een gewone 24 uur grafiek, met een bewegende "nu" lijn, maar vond ik minder dan dit, een sliding window van X uur achteruit en X uur vooruit.

Afhankelijk van hoeveel je al op je layout hebt staan of niet gaat hij het renderen. Eerst renderde ik 25 uur en een stepline (2 punten per uur) ipv linegraph, en dat vond hij niet geweldig leuk. Hij renderd nu nog een raar grijs blokjes links van de kwh prijs. Dus beetje mee prutsen.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{%- set svg_width = 100 -%}
{%- set svg_height = 42 -%}
{%- set stroke_width = 4 -%}
{%- set past_hours = 6 -%}
{%- set future_hours = 12 -%}
{%- set night_color = '#3c4246' -%}

{%- set today = state_attr('sensor.nordpool_including_tax', 'raw_today') | default([], true) -%}
{%- set tomorrow = state_attr('sensor.nordpool_including_tax', 'raw_tomorrow') | default([], true) -%}
{%- set raw = today + tomorrow -%}

{%- set now_hour = now().hour -%}
{%- set start_hour = now_hour - past_hours -%}
{%- set end_hour = now_hour + future_hours -%}
{%- set point_count = past_hours + 1 + future_hours -%}

{%- set ns = namespace(hours=[], prices=[], nights=[], paths=[]) -%}

{%- for hour in range(start_hour, end_hour + 1) -%}
  {%- if hour >= 0 -%}
    {%- set values = namespace(items=[]) -%}
    {%- for index in range(hour * 4, hour * 4 + 4) -%}
      {%- if raw[index] is defined and raw[index].value is defined -%}
        {%- set values.items = values.items + [raw[index].value | float] -%}
      {%- endif -%}
    {%- endfor -%}

    {%- if values.items | count > 0 -%}
      {%- set price = (values.items | sum) / (values.items | count) -%}
      {%- set ns.hours = ns.hours + [{'hour': hour, 'price': price}] -%}
      {%- set ns.prices = ns.prices + [price] -%}
    {%- endif -%}
  {%- endif -%}
{%- endfor -%}

{%- set min_price = ns.prices | min -%}
{%- set max_price = ns.prices | max -%}
{%- set price_range = max_price - min_price -%}

{%- set padding = stroke_width / 2 -%}
{%- set x_step = (svg_width - stroke_width) / (point_count - 1) -%}
{%- set max_y = svg_height - padding -%}
{%- set y_range = svg_height - stroke_width -%}

{%- set plotted = namespace(points=[]) -%}
{%- for item in ns.hours -%}
  {%- set relative_hour = item.hour - start_hour -%}
  {%- set x = (padding + (relative_hour * x_step)) | round(0) | int -%}
  {%- set y = ((svg_height / 2) if price_range == 0 else max_y - (((item.price - min_price) / price_range) * y_range)) | round(0) | int -%}
  {%- set plotted.points = plotted.points + [{'x': x, 'y': y, 'hour': item.hour, 'price': item.price}] -%}
{%- endfor -%}

{%- set night = namespace(active=false, start=0) -%}
{%- for hour in range(start_hour, end_hour + 2) -%}
  {%- set is_night = hour >= 0 and hour <= end_hour and (hour % 24) < 7 -%}

  {%- if is_night and not night.active -%}
    {%- set night.active = true -%}
    {%- set night.start = hour -%}
  {%- elif not is_night and night.active -%}
    {%- set x1 = padding + ((night.start - start_hour) * x_step) - (x_step / 2) -%}
    {%- set x2 = padding + ((hour - start_hour) * x_step) - (x_step / 2) -%}
    {%- set x = 0 if x1 < 0 else x1 -%}
    {%- set x_end = svg_width if x2 > svg_width else x2 -%}
    {%- set width = x_end - x -%}

    {%- if width > 0 -%}
      {%- set x = x | round(0) | int -%}
      {%- set width = width | round(0) | int -%}
      {%- set ns.nights = ns.nights + ['<path fill="' ~ night_color ~ '" d="M' ~ x ~ ' 0h' ~ width ~ 'v' ~ svg_height ~ 'H' ~ x ~ 'z"/>'] -%}
    {%- endif -%}

    {%- set night.active = false -%}
  {%- endif -%}
{%- endfor -%}

{%- set group = namespace(color='', d='') -%}
{%- for point in plotted.points[1:] -%}
  {%- set previous = plotted.points[loop.index0] -%}
  {%- set is_past = point.hour <= now_hour -%}
  {%- set color =
    '#13272d' if is_past and point.price < 0 else
    '#224c47' if is_past and point.price < 0.26 else
    '#7d7040' if is_past and point.price < 0.4 else
    '#6a3627' if is_past else
    '#264d59' if point.price < 0 else
    '#43978d' if point.price < 0.26 else
    '#f9e07f' if point.price < 0.4 else
    '#d46c4e'
  -%}

  {%- if group.color == color -%}
    {%- set group.d = group.d ~ 'L' ~ point.x ~ ' ' ~ point.y -%}
  {%- else -%}
    {%- if group.d != '' -%}
      {%- set ns.paths = ns.paths + ['<path d="' ~ group.d ~ '" stroke="' ~ group.color ~ '"/>'] -%}
    {%- endif -%}
    {%- set group.color = color -%}
    {%- set group.d = 'M' ~ previous.x ~ ' ' ~ previous.y ~ 'L' ~ point.x ~ ' ' ~ point.y -%}
  {%- endif -%}
{%- endfor -%}

{%- if group.d != '' -%}
  {%- set ns.paths = ns.paths + ['<path d="' ~ group.d ~ '" stroke="' ~ group.color ~ '"/>'] -%}
{%- endif -%}

{%- set now_x = (padding + (past_hours * x_step)) | round(0) | int -%}

<svg width="{{ svg_width }}" height="{{ svg_height }}"><path d="M0 0h{{ svg_width }}v{{ svg_height }}H0z"/>{{ ns.nights | join('') }}<path stroke="red" stroke-width="2" d="M{{ now_x }} 0v{{ svg_height }}"/><g fill="none" stroke-width="{{ stroke_width }}" stroke-linecap="round" stroke-linejoin="round">{{ ns.paths | join('') }}</g></svg>
Voorbeeld output (zonder "minify")
code:
1
2
3
4
5
6
7
8
9
10
<svg width="100" height="42">
  <path d="M0 0h100v42H0z"/>
  <path fill="#3c4246" d="M63 0h37v42H63z"/>
  <path stroke="red" stroke-width="2" d="M34 0v42"/>
  <g fill="none" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
    <path d="M2 40L7 40L13 39L18 32L23 24" stroke="#224c47"/>
    <path d="M23 24L29 21L34 18" stroke="#7d7040"/>
    <path d="M34 18L39 10L45 2L50 5L55 12L61 16L66 17L71 19L77 20L82 20L87 20L93 21L98 21" stroke="#f9e07f"/>
  </g>
</svg>
Achtergrond rect, nacht rect (of twee), line voor "current hour", en dan de uurtarieven paths.

Het is ook wat onderdoorzichtig hoe hoog/breed de Button+ daadwerkelijk rendert. Breedte kan je instellen, maar hoogte gaat op basis van fontsize. Ik vond 100x42 goed passen in 42 breed bij fontsize 3.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
        {
            "displayitemid": "10",
            "x": 65,
            "y": 23,
            "page": 1,
            "boxtype": 1,
            "fontsize": 3,
            "align": 1,
            "width": 42,
            "unit": "",
            "round": null,
            "topics":
            [
                {
                    "brokerid": "brk1",
                    "topic": "tariefsvg",
                    "payload": "",
                    "eventtype": 46
                }
            ]
        },

[ Voor 35% gewijzigd door _eLMo_ op 19-06-2026 18:57 ]

SFPC - Motorrijder - EV - PV - L/L WP - Star Citizen


  • Toppe
  • Registratie: Januari 2004
  • Laatst online: 09:10

Toppe

Oké ✅

Is er iemand die V1 en V2 naast elkaar heeft? Ik heb een V1 maar twijfel wel heel erg om die V2 te bestellen gezien de kwaliteit van de V1 mij echt tegenviel. En dan vind ik €100 toch best wel een boel geld voor iets wat in de kast komt te liggen…

Is de V2 echt zoveel beter?

[ Voor 5% gewijzigd door Toppe op 20-06-2026 10:48 ]

🏁 F1HUB.APP | De essentie van Formule 1. Geen ruis, geen advertenties, alleen pure data en statistieken. Real-time racing insights.


  • TKroon
  • Registratie: December 2006
  • Niet online
Toppe schreef op zaterdag 20 juni 2026 @ 10:47:
Is er iemand die V1 en V2 naast elkaar heeft? Ik heb een V1 maar twijfel wel heel erg om die V2 te bestellen gezien de kwaliteit van de V1 mij echt tegenviel. En dan vind ik €100 toch best wel een boel geld voor iets wat in de kast komt te liggen…

Is de V2 echt zoveel beter?
De V2 ziet er veel verfijnder en een stuk mooier uit. Geen glimmende voorkant meer, mooie afgeronde hoeken en een mat scherm. Ook de LED's zien er mooier uit. Of het de upgrade waard is, is aan jou, maar de V2 is zeker een vooruitgang en opzichte van de V1 :)

Daikin Altherma 3 LT 8 kW + 14,2 kWp PV


  • B_sHoRtY
  • Registratie: September 2010
  • Laatst online: 21-06 22:13
Ik weet niet of er in dit forum al eens gesproken is over het design van de Button+ in een standaard Europese inbouwdoos?

De "basis" van de Button+ is precies zo breed als een Europese inbouwdoos. Het is op deze manier toch praktisch onvermijdelijk dat je oneffenheden van je muur of zelfs een randje van je in bouwdoos gaat zien vanaf de zijkant?

Ik snap niet zo goed waarom de base smaller is dan de buttons en display zelf, wat ons wat extra vlees had gegeven om over je inbouwdoos te plaatsen.

Wanneer je een stopcontact of schakelaar koopt, dan heb je altijd zo'n mooi raampje als afwerking rondom zodat je imperfecties rondom je inbouwdoos kunt afdekken.

Ik ben benieuwd naar jullie ervaringen!

  • rob-bo
  • Registratie: April 2007
  • Nu online
pOZOR jED schreef op vrijdag 19 juni 2026 @ 15:15:
Het device kost wel een hoop automations voor MQTT publishen en afhandeling van de knoppen, maar al met al erg blij mee!
Ik heb uiteindelijk een aantal generieke automations gemaakt. Deze bijvoorbeeld voor de button afhandeling:
YAML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
alias: Button+ dynamic light toggle
description: Handles all button clicks and maps them to lights
triggers:
  - trigger: mqtt
    topic: buttonplus/btn/button/+/pushbutton
conditions:
  - condition: template
    value_template: |
      {{ trigger.payload_json.event_type == 'click' }}
actions:
  - variables:
      button_map:
        3-1: light.woonkamer_bol_light
        4-1: light.tower
        5-1: light.woonkamer_arch_light
        6-1: light.ikea_trio
        7-1: group.woonkamer_lights
        5-3: switch.shelly_espressomachine_relay
      button_id: |
        {{ trigger.topic.split('/')[-2] }}
      target_light: |
        {{ button_map.get(button_id) }}
  - condition: template
    value_template: "{{ target_light is not none }}"
  - action: homeassistant.toggle
    target:
      entity_id: "{{ target_light }}"
mode: single
En deze om niet-native mqtt device statussen te publishen:
YAML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
alias: Publish states to MQTT
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.now_playing_song
      - sensor.now_playing_artist
      - sensor.rotelmini_volume
      - switch.coolcam_plug_1_relay
      - switch.shelly_espressomachine_relay
      - sensor.harmony_current_activity
  - trigger: state
    entity_id: climate.woonkamer_thermostaat
    attribute: temperature
conditions: []
actions:
  - variables:
      entity_map:
        sensor.now_playing_song:
          topic: media/woonkamer/playing/song
        sensor.now_playing_artist:
          topic: media/woonkamer/playing/artist
        sensor.rotelmini_volume:
          topic: media/woonkamer/media/volume
        switch.coolcam_plug_1_relay:
          topic: esphome/tvmeubel/relay/state
        switch.shelly_espressomachine_relay:
          topic: esphome/espressomachine/relay/state
        climate.woonkamer_thermostaat:
          topic: thermostat/woonkamer/temperature
        sensor.harmony_current_activity:
          topic: media/woonkamer/media/activity
      entry: "{{ entity_map[trigger.entity_id] }}"
  - choose:
      - conditions:
          - condition: template
            value_template: >
              {{ trigger.entity_id in ['switch.coolcam_plug_1_relay',
              'switch.shelly_espressomachine_relay'] }}
        sequence:
          - action: mqtt.publish
            data:
              qos: "0"
              retain: true
              topic: "{{ entry.topic }}"
              payload: "{{ 'Aan' if trigger.to_state.state == 'on' else 'Uit' }}"
      - conditions:
          - condition: template
            value_template: "{{ trigger.entity_id == 'climate.woonkamer_thermostaat' }}"
        sequence:
          - action: mqtt.publish
            data:
              qos: "0"
              retain: true
              topic: "{{ entry.topic }}"
              payload: "{{ state_attr('climate.woonkamer_thermostaat', 'temperature') }}"
    default:
      - action: mqtt.publish
        data:
          qos: "0"
          retain: true
          topic: "{{ entry.topic }}"
          payload: "{{ states(trigger.entity_id) }}"
mode: queued
max: 5
Ik heb er nog een paar voor specifieke dingen (zoals media control) maar het is redelijk beperkt.
Pagina: 1 ... 16 17 Laatste

Let op:
Vragen/opmerkingen die gerelateerd zijn aan de ontwikkeling en gebruik van de onofficiële Button+ backend initiatieven graag in dit topic.