Node Spot Heating: verschil tussen versies
(→Important for maintainers) |
|||
(65 tussenliggende versies door 3 gebruikers niet weergegeven) | |||
Regel 1: | Regel 1: | ||
− | [[ | + | [[Category:Nodes & network devices]][[Categorie:PaymentSystem]] |
+ | [[Bestand:Spotheater-full.jpeg|miniatuur|Spotheat Node - showing 0.45 euro for 15 minutes of heat]] | ||
+ | [[Bestand:Spot heater control as mounted.jpg|miniatuur]] | ||
− | + | Node for paying for spot heating in the Metal area (the thing `high up'). Part of the [[SpaceTegoed|Space tegoed payment system]]. | |
− | + | = What does it do? = | |
− | + | The display normally displays a static price. The price is for 15 minutes of heating. | |
− | Swipe | + | Swipe your door tag just once to get 15 minutes of heating. |
− | Once you've swiped - the display changes from the price to a countdown | + | Once you've swiped - the display changes from the price to a countdown timer; starting at 15:00. |
− | + | At this point you can use the remote control to switch the actual heater. | |
− | + | The box then starts counting down; showing every second to 14:59, 14:58 and so on. During this time the heating is ON. Once it reaches 00:00 - the heating switches OFF. | |
− | + | You can swipe at any time - and if your payment clears; you simply get another 15 minutes added to the `on time' counter. | |
− | The descriptive name of the node in | + | = Hardware vervangen/repareren = |
+ | |||
+ | See [[SpaceTegoed]] for technical information, [[Payment and Paring REST protocol]] for the protocol and [[https://github.com/dirkx/makerspaceleiden-payment-node github for code]]. De node is een variant van de [[Payment Terminal with 4 seven segment displays]] - maar heeft een extra relay op pin 12 met een NPN register en 10k pull down / 1k feed. | ||
+ | |||
+ | Note that you *must* unseat the power connector before plugging in the USB (or take out the ESP32). For this reason; the green powerplug has been mounted in such a way that it is almost impossible to plug in the USB without unplugging that connector (i.e. as a gentle reminder). Once it is programmed for the first time - it can be reprogrammed over OTA; and does not need the USB anymore. You can `see' the serial output by telnet-ing in (see below), watching MQTT, the build in webserver, etc. | ||
+ | |||
+ | == Important for maintainers == | ||
+ | |||
+ | The descriptive name of the node in [https://mijn.makerspaceleiden.nl mijn.makerspaceleiden.nl] needs to '''start''' with the minutes of heating provided; as digitas; as the '''very first thing in the descriptive text'''. E.g. "15 minutes of heating" or "15 minuutjes warmte". As the software picks up this as the countdown value (together with the price). It interprets this as minutes. | ||
+ | |||
+ | If the descriptive text does not start with a (non zero) number -- the unit becomes a normal payment terminal. That does not count down. | ||
+ | |||
+ | Main code at https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/ | ||
+ | |||
+ | === known bugs in version 1.07 /CC2AF4 === | ||
+ | |||
+ | Deployed is https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/tree/1.07 | ||
+ | |||
+ | # <strike>Pin 25/26 swapped</strike> | ||
+ | # <strike> PSU a bit bare, top relay needs captontape</strike> | ||
+ | # <strike>Needs grounding</strike> | ||
+ | # <strike>Glands may be too small</strike> | ||
+ | # No LED on relay | ||
+ | # Need to also use remote not quite ideal | ||
+ | |||
+ | = Versions build = | ||
+ | |||
+ | == Node Spot Heating == | ||
+ | |||
+ | [[Bestand:Spotheater-inside-3.jpg|100px|front - waiting to be connected]] | ||
+ | [[Bestand:Spotheater-inside-2.jpg|100px|inside - bottom]] | ||
+ | [[Bestand:Spotheater-inside-1.jpg|100px|inside back of display]] | ||
+ | |||
+ | * Wifi-Mac address ends with <code> CC2AF4 </code> | ||
+ | |||
+ | Current software: https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/ | ||
+ | |||
+ | Extra circuit to switch off and on the 220v to the heater. | ||
+ | |||
+ | [[Bestand:Schematic-spotheater.png|200px|additional circuit for spot heater]] | ||
+ | |||
+ | The diode is drawn the wrong way round in above circuit. | ||
= Trouble shooting = | = Trouble shooting = | ||
Regel 23: | Regel 66: | ||
It is possible to 'telnet' into these units (on the normal telnet port #23) and see what normally would come out of the serial port. The units also sent their logging to syslog (to the spaceserver, 192.168.6.1). | It is possible to 'telnet' into these units (on the normal telnet port #23) and see what normally would come out of the serial port. The units also sent their logging to syslog (to the spaceserver, 192.168.6.1). | ||
− | Check the firewall, use a [[https://en.wikipedia.org/wiki/Multicast_DNS MDNS]] [[https://www.win.tue.nl/~johanl/educ/IoT-Course/mDNS-SD%20Tutorial.pdf resolver]] (or simply the Arduino IDE) to discover their IP address. You can do this from the RaspPi next to the [[ | + | Check the firewall, use a [[https://en.wikipedia.org/wiki/Multicast_DNS MDNS]] [[https://www.win.tue.nl/~johanl/educ/IoT-Course/mDNS-SD%20Tutorial.pdf resolver]] (or simply the Arduino IDE) to discover their IP address. You can do this from the RaspPi next to the [[Vinyl Cutter / Vinylsnijder / Snijplotter|Vinyl Cutter]]. On the Mac [[https://apps.apple.com/us/app/discovery-dns-sd-browser/id1381004916?mt=12 Discovery]] is ideal. |
+ | |||
+ | The most recent IP address is shown below. Update this if you replace the hardware; or if you find it has moved IP address. | ||
{| class="wikitable" | {| class="wikitable" | ||
Regel 29: | Regel 74: | ||
! MAC !! Versie !! Mac address !! IP address | ! MAC !! Versie !! Mac address !! IP address | ||
|- | |- | ||
− | | NodeSpotHeating || 1. | + | | NodeSpotHeating || 1.07 || C8:C9:A3:CC:2A:F4 || 192.168.6.125 |
|} | |} | ||
− | Version deployed as of September 2022: https://github.com/ | + | Version deployed as of September 2022: https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/ |
A typical session looks like: | A typical session looks like: | ||
<pre> | <pre> | ||
− | $ telnet | + | $ telnet 192.168.6.125 23 |
− | 4x7- | + | Spotheater@4x7-1-07-cc2af4 Serial connected C8:C9:A3:CC:2A:F4 |
Good scan | Good scan | ||
Payment completed successfully. | Payment completed successfully. | ||
− | |||
</pre> | </pre> | ||
Regel 49: | Regel 93: | ||
<pre> | <pre> | ||
TOPIC: ac/log/tft-1.04-cbb67c | TOPIC: ac/log/tft-1.04-cbb67c | ||
− | + | Spotheater { | |
− | "rfid_scans": | + | "rfid_scans": 2, |
"rfid_misses": 0, | "rfid_misses": 0, | ||
"ota": true, | "ota": true, | ||
"state": 3, | "state": 3, | ||
− | "IP_address": "192.168.6. | + | "IP_address": "192.168.6.125", |
− | "Mac_address": "C8:C9:A3: | + | "Mac_address": "C8:C9:A3:CC:2A:F4", |
− | "Paid": 0, | + | "Paid": 0.45, |
− | "Version": " | + | "PaidSeconds": 900, |
− | "Firmware": " | + | "Version": "F1-07", |
− | "heap": | + | "Firmware": "4x7-1-07-cc2af4", |
+ | "heap": 213732, | ||
+ | "coreTemp": 56.7, | ||
+ | "loopRate": 19.9 | ||
} | } | ||
</pre> | </pre> | ||
Regel 77: | Regel 124: | ||
## <code>no prices</code> - price list could not be fetched. Will retry for a few minutes every 15 seconds; then reboot. | ## <code>no prices</code> - price list could not be fetched. Will retry for a few minutes every 15 seconds; then reboot. | ||
# In normal payment mode | # In normal payment mode | ||
− | ## <code>X.YY</code> - price to pay when you swipe | + | ## <code>X.YY</code> - price to pay when you swipe. ''There is no leading zero.'' |
## <code>[--]</code> - in the process of paying | ## <code>[--]</code> - in the process of paying | ||
+ | ## <code>FAIL</code> - payment failed | ||
## <code>paid</code> - you have paid | ## <code>paid</code> - you have paid | ||
− | ## <code>MM:SS</code> -- a minute and second countdown. Once at zero - the heating switches off. | + | ## <code>MM:SS</code> -- a minute and second countdown. Once at zero - the heating switches off. ''There is always a leading zero.'' |
− | |||
## <code>any error message</code> - scrolling error message. | ## <code>any error message</code> - scrolling error message. | ||
### <code>FAIL -1</code> - netwerk/wifi error. '''Powercyle de unit.''' | ### <code>FAIL -1</code> - netwerk/wifi error. '''Powercyle de unit.''' | ||
Regel 92: | Regel 139: | ||
## <code>DONE</code> - successful end of OTA. Unit will reboot. | ## <code>DONE</code> - successful end of OTA. Unit will reboot. | ||
## <code>any error message</code> - scrolling error message & after which the device will switch back to the old/current firmware | ## <code>any error message</code> - scrolling error message & after which the device will switch back to the old/current firmware | ||
+ | ### <code>FO:AF</code> - OTA authentication failed | ||
+ | ### <code>FO:BF</code> - OTA begin failed | ||
+ | ### <code>FO:CF</code> - OTA connect failed | ||
+ | ### <code>FO:RF</code> - OTA receive failed | ||
+ | ### <code>FO:EF</code> - OTA end failed | ||
+ | ### <code>FO:OF</code> - OTA 'other' failure | ||
# During initial pairing / post an OTA | # During initial pairing / post an OTA | ||
## <code>REG</code> Registering with the server | ## <code>REG</code> Registering with the server | ||
Regel 104: | Regel 157: | ||
# ESP32: 7 euro - https://www.amazon.nl/AZDelivery-Development-opvolger-compatibel-Inclusief/dp/B074RG86SR/ref=sr_1_9 | # ESP32: 7 euro - https://www.amazon.nl/AZDelivery-Development-opvolger-compatibel-Inclusief/dp/B074RG86SR/ref=sr_1_9 | ||
− | # PVC Doosje: | + | # PVC Doosje - 7 euro - wat groter dan normaal; https://www.amazon.nl/Lon0167-200x120x75mm-doorzichtige-Kunststoffabdeckung-Anschlussdose/dp/B0842J3HLW/ref=sr_1_30 (hoewel die vrij groot is). |
# 7 segment display: 2.50 euro - https://www.amazon.nl/Youmile-Display-Gemeenschappelijke-Digitale-Man-vrouw/dp/B082193P1V/ref=sr_1_33 | # 7 segment display: 2.50 euro - https://www.amazon.nl/Youmile-Display-Gemeenschappelijke-Digitale-Man-vrouw/dp/B082193P1V/ref=sr_1_33 | ||
# 1 RFID reader; ~2.50 Euro; (https://www.amazon.nl/gp/product/B074S9FZC5) | # 1 RFID reader; ~2.50 Euro; (https://www.amazon.nl/gp/product/B074S9FZC5) | ||
# AC/5V transformer: 1.00 euro - https://www.aliexpress.com/item/33012749903.html | # AC/5V transformer: 1.00 euro - https://www.aliexpress.com/item/33012749903.html | ||
− | # 1 relays - 5 Volt, voor 230 VAC / | + | # 1 relays - 5 Volt, voor 230 VAC / 30 Ampere, lots of watt (herkomst https://www.baco-army-goods.nl - prijs onbekend) |
− | # | + | # 2 doorvoerwartel; 12mm: 0.35 euro (voorraad space, https://www.aliexpress.com/item/32866592761.html) |
+ | # restje print (https://www.benselectronics.nl/experimenteer-printplaat-12-x-18-cm.html) | ||
+ | # stukjes dik koper draad (VD draad) om het 220v pad via relays de heater wat op te dikken. | ||
+ | # 10k weerstand 1/8 watt ((https://www.baco-army-goods.nl/) | ||
+ | # 1k weerstand 1/8 watt ((https://www.baco-army-goods.nl/) | ||
+ | # BC5476 transistor, NPN (https://www.bitsandparts.nl/Transistor-BC547-NPN-45V-0-1A-p115143) | ||
+ | # printconnector met steker, 4 pins | ||
+ | # kroonsteentje voor aarde. | ||
# netsnoer - weggooikast space | # netsnoer - weggooikast space | ||
# draadjes - electronica hoek | # draadjes - electronica hoek | ||
− | # | + | # 4x korte nylon boutjes voor de RFID lezer met moer (ook nylon ivm radio interference) |
+ | # twee dunne boutjes/moertjes voor het display (1.5mm) | ||
+ | # epoxy voor lijmen boutjes aan doorzichtig frontje | ||
+ | # labels uit de label printer | ||
− | Totaal: < | + | Totaal: < 30 euro; 60 minuten solderen/assemblage en wachten tot de epoxy droog is. |
= Compileren software = | = Compileren software = | ||
Regel 123: | Regel 186: | ||
# Installeer via de 'Library' optie de bibliotheken MFRC522-spi-i2c-uart-async, TM1637TinyDisplay en Arduino_JSON | # Installeer via de 'Library' optie de bibliotheken MFRC522-spi-i2c-uart-async, TM1637TinyDisplay en Arduino_JSON | ||
# Haal een git/zip versie op van https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/ | # Haal een git/zip versie op van https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/ | ||
− | # Zet de #defines met de netwerk namen goed. Kies een unique terminal naam. | + | # Zet de #defines met de netwerk namen goed. Check ook <code>global.h</code> Kies een unique terminal naam. |
# <strike>Overleg met noc@ voor een 'bearer token' voor toegang als je de productie versie maakt.</strike> | # <strike>Overleg met noc@ voor een 'bearer token' voor toegang als je de productie versie maakt.</strike> | ||
# Idem voor het OTA wachtwoord. | # Idem voor het OTA wachtwoord. | ||
# Compiler & flash via serial (daarna kan het via OTA). | # Compiler & flash via serial (daarna kan het via OTA). | ||
## Nota bene: with the cheaper boards; it may be needed to press 'BOOT' during the start of the programming. | ## Nota bene: with the cheaper boards; it may be needed to press 'BOOT' during the start of the programming. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Huidige versie van 17 nov 2024 om 23:41
Node for paying for spot heating in the Metal area (the thing `high up'). Part of the Space tegoed payment system.
Inhoud
What does it do?
The display normally displays a static price. The price is for 15 minutes of heating.
Swipe your door tag just once to get 15 minutes of heating.
Once you've swiped - the display changes from the price to a countdown timer; starting at 15:00.
At this point you can use the remote control to switch the actual heater.
The box then starts counting down; showing every second to 14:59, 14:58 and so on. During this time the heating is ON. Once it reaches 00:00 - the heating switches OFF.
You can swipe at any time - and if your payment clears; you simply get another 15 minutes added to the `on time' counter.
Hardware vervangen/repareren
See SpaceTegoed for technical information, Payment and Paring REST protocol for the protocol and [github for code]. De node is een variant van de Payment Terminal with 4 seven segment displays - maar heeft een extra relay op pin 12 met een NPN register en 10k pull down / 1k feed.
Note that you *must* unseat the power connector before plugging in the USB (or take out the ESP32). For this reason; the green powerplug has been mounted in such a way that it is almost impossible to plug in the USB without unplugging that connector (i.e. as a gentle reminder). Once it is programmed for the first time - it can be reprogrammed over OTA; and does not need the USB anymore. You can `see' the serial output by telnet-ing in (see below), watching MQTT, the build in webserver, etc.
Important for maintainers
The descriptive name of the node in mijn.makerspaceleiden.nl needs to start with the minutes of heating provided; as digitas; as the very first thing in the descriptive text. E.g. "15 minutes of heating" or "15 minuutjes warmte". As the software picks up this as the countdown value (together with the price). It interprets this as minutes.
If the descriptive text does not start with a (non zero) number -- the unit becomes a normal payment terminal. That does not count down.
Main code at https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/
known bugs in version 1.07 /CC2AF4
Deployed is https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/tree/1.07
Pin 25/26 swappedPSU a bit bare, top relay needs captontapeNeeds groundingGlands may be too small- No LED on relay
- Need to also use remote not quite ideal
Versions build
Node Spot Heating
- Wifi-Mac address ends with
CC2AF4
Current software: https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/
Extra circuit to switch off and on the 220v to the heater.
The diode is drawn the wrong way round in above circuit.
Trouble shooting
It is possible to 'telnet' into these units (on the normal telnet port #23) and see what normally would come out of the serial port. The units also sent their logging to syslog (to the spaceserver, 192.168.6.1).
Check the firewall, use a [MDNS] [resolver] (or simply the Arduino IDE) to discover their IP address. You can do this from the RaspPi next to the Vinyl Cutter. On the Mac [Discovery] is ideal.
The most recent IP address is shown below. Update this if you replace the hardware; or if you find it has moved IP address.
MAC | Versie | Mac address | IP address |
---|---|---|---|
NodeSpotHeating | 1.07 | C8:C9:A3:CC:2A:F4 | 192.168.6.125 |
Version deployed as of September 2022: https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/
A typical session looks like:
$ telnet 192.168.6.125 23 Spotheater@4x7-1-07-cc2af4 Serial connected C8:C9:A3:CC:2A:F4 Good scan Payment completed successfully.
Any error message (post joining the Wifi network) will show up here. If the issue is prior to joining WiFi - you will have to connect a USB cable (Baudrate 115200, 8N1). The Raspi has the right drivers installed.
Furthermore - if you connect to space.makerspaceleiden.nl
via MQTT - then you can also see the output:
TOPIC: ac/log/tft-1.04-cbb67c Spotheater { "rfid_scans": 2, "rfid_misses": 0, "ota": true, "state": 3, "IP_address": "192.168.6.125", "Mac_address": "C8:C9:A3:CC:2A:F4", "Paid": 0.45, "PaidSeconds": 900, "Version": "F1-07", "Firmware": "4x7-1-07-cc2af4", "heap": 213732, "coreTemp": 56.7, "loopRate": 19.9 }
Display messages
- During startup
F X-YY
- version number firmware during booting.CONN
- connecting to WiFiNTP
- getting the timeF CA
- Fetching the Certificate AuthorityF PL
- Fetching the price listFAIL
- failed to connect to WiFi; will reboot.any error message
- scrolling error message & after which either reboot or hang if it unrecoverable.
- At the end of startup (from this point onwards OTA is possible).
----
- fully started up; but have not yet gotten the pricelistno prices
- price list could not be fetched. Will retry for a few minutes every 15 seconds; then reboot.
- In normal payment mode
X.YY
- price to pay when you swipe. There is no leading zero.[--]
- in the process of payingFAIL
- payment failedpaid
- you have paidMM:SS
-- a minute and second countdown. Once at zero - the heating switches off. There is always a leading zero.any error message
- scrolling error message.FAIL -1
- netwerk/wifi error. Powercyle de unit.FAIL -4
- netwerk/wifi error. Powercyle de unit.FAIL 40X
Gebruik je een geldige tag ?FAIL 500
Error op de server; mail noc@.
- During Over the Air reprogramming.
PROG
- start of OTA updateF XX
- OTA; uploading new firmware; XX is the percentage fetchedDONE
- successful end of OTA. Unit will reboot.any error message
- scrolling error message & after which the device will switch back to the old/current firmwareFO:AF
- OTA authentication failedFO:BF
- OTA begin failedFO:CF
- OTA connect failedFO:RF
- OTA receive failedFO:EF
- OTA end failedFO:OF
- OTA 'other' failure
- During initial pairing / post an OTA
REG
Registering with the serverPAIR
requesting to pair; swipe an admin tag.any error message
- scrolling error message.
Code is at https://github.com/MakerspaceLeiden/makerspaceleiden-payment-node-7segments.
Bill of materials
Materialen; duurste onderdelen eerst:
- ESP32: 7 euro - https://www.amazon.nl/AZDelivery-Development-opvolger-compatibel-Inclusief/dp/B074RG86SR/ref=sr_1_9
- PVC Doosje - 7 euro - wat groter dan normaal; https://www.amazon.nl/Lon0167-200x120x75mm-doorzichtige-Kunststoffabdeckung-Anschlussdose/dp/B0842J3HLW/ref=sr_1_30 (hoewel die vrij groot is).
- 7 segment display: 2.50 euro - https://www.amazon.nl/Youmile-Display-Gemeenschappelijke-Digitale-Man-vrouw/dp/B082193P1V/ref=sr_1_33
- 1 RFID reader; ~2.50 Euro; (https://www.amazon.nl/gp/product/B074S9FZC5)
- AC/5V transformer: 1.00 euro - https://www.aliexpress.com/item/33012749903.html
- 1 relays - 5 Volt, voor 230 VAC / 30 Ampere, lots of watt (herkomst https://www.baco-army-goods.nl - prijs onbekend)
- 2 doorvoerwartel; 12mm: 0.35 euro (voorraad space, https://www.aliexpress.com/item/32866592761.html)
- restje print (https://www.benselectronics.nl/experimenteer-printplaat-12-x-18-cm.html)
- stukjes dik koper draad (VD draad) om het 220v pad via relays de heater wat op te dikken.
- 10k weerstand 1/8 watt ((https://www.baco-army-goods.nl/)
- 1k weerstand 1/8 watt ((https://www.baco-army-goods.nl/)
- BC5476 transistor, NPN (https://www.bitsandparts.nl/Transistor-BC547-NPN-45V-0-1A-p115143)
- printconnector met steker, 4 pins
- kroonsteentje voor aarde.
- netsnoer - weggooikast space
- draadjes - electronica hoek
- 4x korte nylon boutjes voor de RFID lezer met moer (ook nylon ivm radio interference)
- twee dunne boutjes/moertjes voor het display (1.5mm)
- epoxy voor lijmen boutjes aan doorzichtig frontje
- labels uit de label printer
Totaal: < 30 euro; 60 minuten solderen/assemblage en wachten tot de epoxy droog is.
Compileren software
- Installeer een recente versie van [[1]].
- Installeer een stable versie van de SDK voor de ESP32 volgens https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
- Selecteer in tools het platform ESP32 en dan het board dat je gebruikt (WRover, Devkit)
- Installeer via de 'Library' optie de bibliotheken MFRC522-spi-i2c-uart-async, TM1637TinyDisplay en Arduino_JSON
- Haal een git/zip versie op van https://github.com/MakerSpaceLeiden/makerspaceleiden-payment-node-7segments/
- Zet de #defines met de netwerk namen goed. Check ook
global.h
Kies een unique terminal naam. Overleg met noc@ voor een 'bearer token' voor toegang als je de productie versie maakt.- Idem voor het OTA wachtwoord.
- Compiler & flash via serial (daarna kan het via OTA).
- Nota bene: with the cheaper boards; it may be needed to press 'BOOT' during the start of the programming.