{"id":18074189,"url":"https://github.com/maxlaverse/mumbi-fs300","last_synced_at":"2026-04-29T22:36:25.954Z","repository":{"id":150769100,"uuid":"95911004","full_name":"maxlaverse/mumbi-fs300","owner":"maxlaverse","description":"This project aims to help automate the control over Mumbi m-FS300 switches (compatible with Home Assistant)","archived":false,"fork":false,"pushed_at":"2017-10-19T22:48:24.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T13:05:35.278Z","etag":null,"topics":["arduino","fs300","home-assistant","mqtt","mumbi","pwm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxlaverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-30T17:43:01.000Z","updated_at":"2017-07-01T15:42:24.000Z","dependencies_parsed_at":"2023-08-31T02:40:00.332Z","dependency_job_id":null,"html_url":"https://github.com/maxlaverse/mumbi-fs300","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxlaverse/mumbi-fs300","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fmumbi-fs300","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fmumbi-fs300/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fmumbi-fs300/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fmumbi-fs300/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxlaverse","download_url":"https://codeload.github.com/maxlaverse/mumbi-fs300/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fmumbi-fs300/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273832460,"owners_count":25176262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","fs300","home-assistant","mqtt","mumbi","pwm"],"created_at":"2024-10-31T10:11:34.360Z","updated_at":"2026-04-29T22:36:25.911Z","avatar_url":"https://github.com/maxlaverse.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project aims to help automate the control over Mumbi m-FS300 switches.\n\nIt provides two software components:\n* an Arduino program controlled over a serial connection that emits signals to the switches and received the ones from the remote control\n* a Go daemon connected to an MQTT broker that controls the Arduino\n\n## Hardware\n* an Arduino (tested on a *nano* model)\n* a 433.92 MHz RF emitter and receiver\n* a Raspberry Pi (works on any computer)\n* an antenna (optional)\n\n## Cabling\nThe Arduino program expects your RF receiver to be connected on the digital port 2,\nand the emitter to the digital port 3. Of course you can modify this by changing the value of the constants at the top of the code.\n\n```c\nconst int PIN_RECV=2;\nconst int PIN_XMIT=3;\n```\n\nThe reception of signal is done using interrupts. For an Arduino\nNano it means that you can only use port 2 or 3 for this program (see [AttachInterrupt](https://www.arduino.cc/en/Reference/AttachInterrupt)).\n\nIt's also recommended to use an antenna as it really improves the reception range.\n\n## Emitting and receiving signals\nThe Arduino program is a very basic [pwm emitter/receiver](https://en.wikipedia.org/wiki/Pulse-width_modulation) for 1200μs long pulses. It reads the serial port for strings composed of `0`, `1` and ending with a return line `\\n`.\nIt then sends a 15μs RF low signal followed by 8 repetitions of the data using pwm modulation ending with a 10μs low signal.\n\nFor the reception it uses interrupts and starts analyzing data when the 15μs sync signal is detected.\nThe program only support signals shorter than 40bits and it will consider a signal as valid\nif it was at least detected two times during the same transmission.\n\nCompile and upload [the Arduino program](arduino-pwm/arduino-pwm.ino) on your board.\nThen connect to the Arduino using the usb-to-serial port. You should see 34bits long codes when pressing buttons of your remote control.\n\nOn Linux:\n```\n$ cat \u003c /dev/ttyUSB0\n\u003c1110000110000100000011110001100100\u003e\n\u003c1110000110000100000011100001100000\u003e\n\u003c1110000110000100000011110001100100\u003e\n```\n\nIf you re-emit one of those code ending with a return line, you should see your switches be turned on and off.\n\n```\n$ echo -n \"\u003c1110000110000100000011110001100100\u003e\" \u003e /dev/ttyUSB0\n$ echo -n \"\u003c1110000110000100000011100001100000\u003e\" \u003e /dev/ttyUSB0\n```\n\n## Configuring udev\nEvery time you plug your Arduino into your Raspberry, it might or might not end up with the same device name. You can configure your Linux system to symlink the USB device to a fixed name. Have a look at this [Arduino guide](http://playground.arduino.cc/Linux/All) to find out how to do so.\n\n\n## Installing the daemon\n\n### Compile and install the software\n```bash\n$ cd mumbid\n$ go get\n$ go build\n$ sudo cp mumbid /usr/local/bin/mumbid\n```\n\n### Configuration\nThis is an example of configuration that you could write to `/etc/mumbid.json`.\n```json\n{\n  \"device\": \"/dev/arduino\",\n  \"broker\": \"your-broker:1883\",\n  \"echoState\": false,\n  \"switches\":{\n    \"living_room/_all\":{\n      \"on\": \"1110000110000100000001000001001100\",\n      \"off\": \"1110000110000100000010000001110100\"\n    },\n    \"living_room/corner\":{\n      \"on\": \"1110000110000100000011010001101000\",\n      \"off\": \"1110000110000100000011000001101100\"\n    },\n    \"living_room/sofa\":{\n      \"on\": \"1110000110000100000011110001100100\",\n      \"off\": \"1110000110000100000011100001100000\"\n    },\n    \"living_room/table\":{\n      \"on\": \"1110000110000100000010110001111000\",\n      \"off\": \"1110000110000100000010100001111100\"\n    }\n  }\n}\n```\n\nThe `_all` device is a special device. When those `on` or `off` signal are received ,it will  update the internal state of all the  switches (nothing surprising).\n\nWhen `echoState` is true, `mumbid` will automatically send an MQTT message saying that the state has been changed successfully, regardless if the corresponding RF signal has been received or not.\n\n### systemd\nYou can configure the daemon to start automatically on boot with `systemd`.\nCreate a file at `/etc/systemd/system/mumbid.service`:\n```ini\n[Unit]\nDescription=Mumbi daemon\nAfter=network.target\n\n[Service]\nType=simple\nUser=root\nExecStart=/usr/local/bin/mumbid -c /etc/mumbid.json\n\n[Install]\nWantedBy=multi-user.target`\n```\n_Note:_ This examples runs the software as root but it doesn't need root privileges at all. Just make sure that the user you use is member of the `dialout` group to have access to the serial port.\n\nMake sure your MQTT broker is started. This was tested with `mosquitto` (v1.3.4) but any compatible broker would work.\n\nEnable and start the Mumbi daemon:\n```bash\n$ systemctl enable mumbid\n$ systemctl start mumbid\n```\n\n### Testing the daemon\nListen to one of the switches state change and press buttons on the remote control:\n```bash\n$  mosquitto_sub -t '/home/living_room/corner'\nOFF\nON\n```\n\nYou should see the state change being published on the broker.\n\nNow publish a message to change the state of one of the switches:\n```bash\n$ mosquitto_pub -t 'home/living_room/corner/set' -m 'OFF'\n```\n\n## Home assistant\nYou have everything in place to control your switches over [Home Assistant](https://home-assistant.io/).\n\n### Configuration\nThis is an example of configuration to publish and listen to the MQTT broker.\n```yaml\nmqtt:\n  broker: 127.0.0.1\n\nswitch:\n  - platform: mqtt\n    name: \"Living room corner\"\n    state_topic: \"home/living_room/corner\"\n    command_topic: \"home/living_room/corner/set\"\n  - platform: mqtt\n    name: \"Living room sofa\"\n    state_topic: \"home/living_room/sofa\"\n    command_topic: \"home/living_room/sofa/set\"\n  - platform: mqtt\n    name: \"Living room table\"\n    state_topic: \"home/living_room/table\"\n    command_topic: \"home/living_room/table/set\"\n```\n\n## More about the signal\nThe m-FS300 switches are controlled using [pwm modulation](https://en.wikipedia.org/wiki/Pulse-width_modulation).\nAn `on` or `off` command consists of:\n* a low sync signal of 15μs\n* 8 repetitions of a 34bits pulse signal with a length of 1200μs, followed by 10μs low signal\n\n_Example:_\n\n| Channel | Command  | Prefix               | Payload      | Suffix |\n| --------| -------- | -------------------- | ------------ | ------ |\n| A       | on       | 11100001100001000000 | 111100011001 | 00     |\n| A       | off      | 11100001100001000000 | 111000011000 | 00     |\n| B       | on       | 11100001100001000000 | 110100011010 | 00     |\n| B       | off      | 11100001100001000000 | 110000011011 | 00     |\n| C       | on       | 11100001100001000000 | 101100011110 | 00     |\n| C       | off      | 11100001100001000000 | 101000011111 | 00     |\n| D       | on       | 11100001100001000000 | 011100010001 | 00     |\n| D       | off      | 11100001100001000000 | 100001000000 | 00     |\n| All     | on       | 11100001100001000000 | 010000010011 | 00     |\n| All     | off      | 11100001100001000000 | 100000011101 | 00     |\n\nThe algorithm to convert a channel and state to the payload is unknown to me.\n\nYou can analyze the signal using a DVB-T RTL2832u key, [Gqrx](http://gqrx.dk/) (or [SDRSharp](http://airspy.com/))\nand [Audacity](http://www.audacityteam.org/). There is a good article from Paul King,   [\"mimicking-rf-remote-light-signals-with-arduino\"](http://nrocy.com/2014/08/02/mimicking-rf-remote-light-signals-with-arduino/),\nthat explains more in details how to analyze pwm signals.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlaverse%2Fmumbi-fs300","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxlaverse%2Fmumbi-fs300","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlaverse%2Fmumbi-fs300/lists"}